Forums

AVR+Nut/OS vs. AT91+Linux

Started by Randall Nortman September 2, 2005
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
(http://www.ethernut.de/).  I would not use the Ethernut hardware
design exactly, since I need different types of I/O on my board, but I
would do essentially the same thing with respect to the Ethernet
MAC/transceiver and external SRAM.  Anybody have experience with the
reliability of Nut/OS?

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.

-- 
Randall
Randall Nortman wrote:
> 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,
Sound expensive for 2 layers (qty 100), unless you have a very big board. But, you would probably need at least 4 layers for ARMs. Mult-layers will be smaller, so end up with similar cost.
> 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)?
128M SDRAM preferred. They can be recycled from old PCs for peanuts.
> How many support chips would I need?
One data flash, Two SDRAM chips and Three voltage regulators, etc.
> Can I do it on a 2-layer board?
Diffcult and inefficient use of PCB space.
> Is this going to totally blow my budget?
Multi-layers are not that expensive for productions, but more for prototypes.
"Randall Nortman" <usenet8189@wonderclown.com> wrote in message 
news:oX_Re.5674$9i4.3877@newsread2.news.atl.earthlink.net...
>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.
check freescales NE64 micro controler with lan interface.. Kasper
In article <4318b600$0$18639$14726298@news.sunsite.dk>,
 "Repzak" <repzak@GEDhotmail.com> wrote:

> check freescales NE64 micro controler with lan interface..
I'm currently going down this exact same path. Happy with AVR but published price for the NE64 of $9ea/1000 via dependable distribution vs. questionable sources for Realtek and everything other than CS8900. Ethernut and kin present a license problem. Decided it would require a non-trivial effort to sort out the parts infected with GPL to ensure my finished product hand none. Its perfectly fine to build with GPL tools or link LGPL code, but not GPL code. Freescale OpenTCP was a big disappointment. After downloading, registering, install, update, of the free 32k version of CW 3.1 for '12, opening the FSOTCP project complained that its 2004-dated files were created with newer tools than I had. So it reset those parameters to default. And didn't tell me what it thought it was changing. Wading thru compile errors and warnings the worst was a missing .h file. The forums at Viola (home of OpenTCP) are broken, full of porn, and useless. Their contact email address bounces as non-existent. The same email address used to send your registration welcome. And for using their abandon-ware you have to list their copyright along with your own. As if its not bad enough having to fix their software first. Pretty much committed to the NE64. Its a good part. Two commercial TCP/IP protocol stacks are available starting at $5500. Free evaluation copies are available, in source. Much better looking & organized code than Viola's OpenTCP which uses Freescale's driver for touching the hardware. My need for networking is minimal. Just got to get a little bit of command data in and result data out. No embedded web server. No embedded mail server. No filesystems. Just a little data. And it has to be on a VLAN. So today I took Freescale's good NE64 Drivers, which loads without error in CW31, but compiles with some warnings which code comments say will happen. Ran it thru GNU indent with my .indent.pro to bring it into my style. And finally checked it into my CVS server. Freescale's NE64 example driver has little more than ARP and enough ICMP to ping. I expect to do UDP and TCP myself, doesn't look that hard in the Stevens books. :-) The default project included in the NE64 drivers includes an ANSI library at 7k bytes and everything else is about 3k. Its built for banked memory, which I intend to disable. Also intend to remove the ANSI library. But maybe not. I don't plan on needing all of the 64k. Now if you can wait 6 months things should get interesting with Microchip's 28J60 MAC/PHY. When it finally ships. When there is some body of non-Microchip software to make it sing. I really wish I could stay with my Unix Makefile and avr-gcc rather than Codewarrior bloat and eye-candy.
David Kelly wrote:
> Pretty much committed to the NE64. Its a good part. Two commercial > TCP/IP protocol stacks are available starting at $5500. Free evaluation > copies are available, in source. Much better looking & organized code > than Viola's OpenTCP which uses Freescale's driver for touching the > hardware.
Thanks for the commentary - I've been very interested in this MCU, and this is good info. Perhaps you know... can you actually buy the tiny PCB they use in the marketing photos? Thats about all I need for one project, but according to TI it doesn't actually exist as a product / demo board. As for Microchip's upcoming Ethernet controller, take a look in this newsgroup for posts at the time of their announcement. One of the very telling facts was the power consumption, which seems to be way out of line. But if your power budget isn't tight and you don't need a lot of speed, it sure will cut down on the number of pins and the size / complexity of your boards. A large section of my current project is just bus traces for the Ethernet controllers... Richard
Randall Nortman wrote:
> I need to produce an Ethernet-capable embedded device (including > TCP/IP stack) for about $50 in low quantities (think perhaps qty 100).
Check out http://www.protoexpress.com for 4-layer ($122 for 2 proto boards, and they get good feedback from folks that should know). Does the packaging (enclosure, etc.) need to come out of your $50 budget? How about assembly? Check out the Lantronix XPort and Digi ME. Expensive, but nearly turnkey. If you can tailor their code to drive your other components, you may not need much else. http://www.digi.com/products/embeddedmodules/digiconnectme.jsp http://www.lantronix.com/device-networking/embedded-device-servers/xport.html Cheers, Richard
On Fri, 02 Sep 2005 16:18:28 GMT, Randall Nortman
<usenet8189@wonderclown.com> wrote:

>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.
[snipped] What about a Wiznet 3100A based module together with an AVR ? You can get a module NM7000 (W3100A + Phy) for US$ 26 is single quantities. The NM7010B (W3100A + Phy +Mag-Jack) for US$ 34. Add a small AVR for US$ 6, and you should have enough for a 2 layer PCB. To get basic TCP/IP going with the Wiznet module is trivial. Products such as Bascom-AVR and Codvision already has libraries to support this chip. Regards Anton Erasmus

> > But then there's also the option of beefing the whole thing up a bit > and going for Linux on an ARM chip,
Maybe something like eCos would be more appropriate - you wouldn't need to beef up the hardware as much as you would to run Linux. I can't think of anything linux would give you that eCos wouldn't for the sort of thing that you are looking to do. http://sources.redhat.com/ecos/ Regards, Paul. -- Remove _rem_ before replying by email.
On Fri, 02 Sep 2005 16:18:28 GMT, Randall Nortman
<usenet8189@wonderclown.com> wrote:

>Thanks very much for any advice. Recommendations of options I haven't >considered would be welcome as well.
Try this: http://www.zilog.com/products/partdetails.asp?id=eZ80F910200ZCO with this microcontroller: http://www.zilog.com/products/partdetails.asp?id=eZ80F91 Development is very easy - the developer kit (99$) comes with everything you need - including JTAG/ZDS debugger, IDE with compiler/assembler and RTOS with TCP/IP, HTTP/SMTP/FTP/SNMP/... The controller is about 12$ and gives you Fast Ethernet. Mit freundlichen Gr&#2013266172;&#2013265951;en Frank-Christian Kr&#2013266172;gel
"David Kelly" <n4hhe@yahoo.com> wrote in message 
news:n4hhe-EC1D0E.20031202092005@ispnews.usenetserver.com...
> In article <4318b600$0$18639$14726298@news.sunsite.dk>, > "Repzak" <repzak@GEDhotmail.com> wrote: > >> check freescales NE64 micro controler with lan interface.. > > I'm currently going down this exact same path. Happy with AVR but > published price for the NE64 of $9ea/1000 via dependable distribution > vs. questionable sources for Realtek and everything other than CS8900. > > Ethernut and kin present a license problem. Decided it would require a > non-trivial effort to sort out the parts infected with GPL to ensure my > finished product hand none. Its perfectly fine to build with GPL tools > or link LGPL code, but not GPL code. > > Freescale OpenTCP was a big disappointment. After downloading, > registering, install, update, of the free 32k version of CW 3.1 for '12, > opening the FSOTCP project complained that its 2004-dated files were > created with newer tools than I had. So it reset those parameters to > default. And didn't tell me what it thought it was changing.
Hey I am using Uip on my NE64 and have my homepage on a MMC card... There is not added write support, but the configuration of the server is placed in a file on the mmc card s&#2013265925; IP adress etc can be changed without changeing firmware :) Kasper