Forum Discussion
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by vava+oct 28 2005, 10:21 am--><div class='quotetop'>quote (vava @ oct 28 2005, 10:21 am)</div>
--- quote start ---
(1) would ecos be appropriate for this application?[/b]
--- quote end ---
it could do it. i'm not sure exactly how much work it would be, since i've never tried to mess with the routing layer of ip; i just do things from the application level.
one caveat: your bandwidth will be limited by your cpu speed. expect 300-400 kbytes/sec. for 50 mhz.
--- quote start ---
originally posted by vava@oct 28 2005, 10:21 am
(2) since i don’t know that much about ecos how can i get it configured with my nios ii hw and ide
--- quote end ---
start with the tutorial that comes with the ecos download. that should give you a good idea what it's going to take.
--- quote start ---
originally posted by vava@oct 28 2005, 10:21 am
(3) how can i get my sw to run automatically at bootup through ecos?
--- quote end ---
unlike other os's like windows and linux, ecos isn't executable all by itself. when you build ecos, you'll get a library. you need to provide a cyg_user_start function, along with the rest of your code, and link your code with the ecos library to form the final executable, which you program to flash and execute just like a program with no os.
<!--quotebegin-vava@Oct 28 2005, 10:21 AM (4) where can i find example sw demonstrating ip sockets, ip routing, and writing to an external memory? --- Quote End --- Writing to external memory is simple. main memory operates like any other memory; you can malloc() it, or create globals and use them. If you have other memories that aren't part of the main heap, you can get their base addresses from <cyg/hal/system.h> in your generated library. As far as sockets goes, eCos' "net" template sets up with the FreeBSD stack, so you just use sockets the same way BSD does. The classic text is unix network programming: networking apis: sockets and xti, by W. Richard Stevens, ISBN 0-13-490012-X. By the way, it wouldn't be that hard to do a web interface with eCos. I use the simple HTTP server that comes with it to generate a set of web pages for system diagnostics and configuration.