I need to produce an Ethernet-capable embedded device (including TCP/IP stack) for about $50 in low quantities (think perhaps qty 100). I can get a 2-layer board in these quantities for $13, so that leaves only about $40 for everything that goes on the board. The good news is that by far, the dominating resource consumption will be from the TCP/IP stack, and whatever OS overhead there may be; my application actually does very little. I don't need a full 10Mbps throughput through the stack; in fact, 500kbps average would be plenty. The other components on the board for my particular I/O requirements are very cheap. Reliability and convenience (for me, the developer) is more important than blazing-fast performance.
I have a fair amount of experience with AVR chips, but have always rolled my own "OS" (put in quotes because these are hardly real operating systems, more like development libraries). I've never hooked an AVR up to Ethernet or tried to implement any protocol as complex or resource-intensive as TCP/IP on it.
So after a bit of searching around my first inclination is to use Nut/OS, the operating system designed for the Ethernut
But then there's also the option of beefing the whole thing up a bit and going for Linux on an ARM chip, and given my experience with Atmel, my first choice would be an AT91 chip, probably something very cheap in the 55MHz range, where there seem to be several choices priced comparably to the AVR Mega128, which is what I would use for the Nut/OS route. I have a lot of experience with desktop/server Linux, but no experience at all with embedded Linux. So, I have a few questions:
1) How much hardware is necessary to run Linux with a TCP/IP stack, in terms of off-chip RAM and Flash storage (for the OS and applications)? How many support chips would I need? Can I do it on a 2-layer board? Is this going to totally blow my budget?2) I have no money, nor personal desire, for commercial software liscensing or proprietary development environments. How much of a pain is it to get free Linux running on an ARM7 chip, assuming a Linux-based PC development environment with the right cross-compilers? Are there particular support components (Ethernet chips, memory chips, etc.) I can choose that will make it work out of the box? Do I have to roll my own distro, or is there a good free distro for highly constrained environments? (I just need something that handles basic system initialization and starts my application processes. Something that manages firmware updates would be nice but not essential.)
3) Is there really any advantage to Linux vs. the AVR+Nut/OS solution, which seems a bit simpler to me? If Linux ends up being more reliable, that would be a good enough reason for me. But bigger is not always better, as I'm sure many on this group would agree.Thanks very much for any advice. Recommendations of options I haven't considered would be welcome as well.