RTEMS with ARM LPC2138

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Tue Dec 13 15:28:44 UTC 2005


Ian Caddy wrote:
> Hi Sam,
> 
>  From a quick look at the datsheet, the main thing I would be worried 
> about is the amount of RAM (32KBytes) that is available.  The RTEMS 
> TCP/IP stack comes from the FreeBSD envinronment and is not friendly to 
> small memory footprints if you want to do any serious network 
> applications.  I would guess that you need somewhere between 50K-150K of 
> RAM to allow enough memory for the IP stack that is used in RTEMS.  This 
>  is just really for the mbufs (packet buffers and clusters) required 
> since every packet transmitted or received is going to take a single 
> 1500 byte buffer.  Have a few sockets open at one time and this number 
> quickly rises.

There is a port of the LWIP stack to RTEMS which is intended for
smaller footprint systems.  But if you are trying to fit into 32KB,
life is going to be tough no matter what you do.

Check out how much just referencing printf in newlib pulls in:

$ /opt/rtems-4.7/bin/arm-rtems4.7-ld -r -u printf  \
     /opt/rtems-4.7/arm-rtems4.7/lib/libc.a
$ /opt/rtems-4.7/bin/arm-rtems4.7-size a.out
    text    data     bss     dec     hex filename
   23960    1048      12   25020    61bc a.out

So in 32K of RAM, you really have to be careful.  That had 1K of DATA
so 3% of your RAM is gone for printf.  I am assuming that code can
be placed in Flash so that much is not an issue.

Each task stack uses some RAM.  So 32K is not a lot of tasks.

32K of on-CPU fast RAM is GREAT if you can just put critical data
in it but restricting yourself to that much RAM total is going to be
tough with or without RTEMS.

Just stuff to think about.

> Also, the device looks to only have one Ethernet MAC onboard.
> 
> We use the Coldfire family with external SDRAM which is cheap and 
> provides a large amount of space for networking type applications.
> 
> I have also had a look at the Atmel AT91 series, although they seem to 
> now only just getting their ARM implementations going.  The single chip 
> ones also have RAM memory size issues, but you could go for one of the 
> ARM9 cores, which have external memory access, but then I am sure the 
> Phillips also have these sorts of processors.
> 
> I hope this helps.
> 
> regards,
> 
> Ian Caddy
> 
> 
> 
> Sam wrote:
> 
>> Hi,
>>
>> I want to purchase ARM  LPC2138 and develop some network application 
>> based on RTEMS.
>> See below for reference of ARM LPC2138 product.
>> http://www.embeddedartists.com/products/boards/lpc2138_100eth.php
>>
>> Can anyone please tell me whether RTEMS compatible with this device?
>>
>> In this webpage, I also found that their Developer Kit is very 
>> expensive - 395 EUR.
>> Is there other recommendation of embedded hardware device I can use 
>> for RTEMS development? I basically need 2 ethernet ports on the device.
>>
>> Sam
>>
>>
> 
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list