RTEMS BSD Net on Atmel SAM Board

Pavel Pisa pisa at cmp.felk.cvut.cz
Mon Jun 6 08:36:11 UTC 2016


Hello Isaac,

On Thursday 02 of June 2016 17:09:31 Isaac Gutekunst wrote:
> On 06/01/2016 07:18 PM, Pavel Pisa wrote:
> > Hello Isaac,
> >
> > On Wednesday 01 of June 2016 23:09:39 Isaac Gutekunst wrote:
> >> I believe I solved all my problems. Not enough memory. After updating
> >> the linker script to use SDRAM, everything appears to be working well!
> >> (Knock on wood).
> >
> > I think that SAM V71 setup with 2 MB of external SDRAM is not much
> > above minimal limit for use of RTEMS with BSD networking.
> > If the single chip solution with only 128kB of internal SRAM
> > is considered (may be with additional 128kB which can be borrow
> > for some buffer from the instruction TCM) then it cannot
> > be used with libBSD based networking. So it would worth
> > to consider lwIP. I hope that it would be integrated to
> > the RTEMS file operations API as part of this year GSoC.
> > So this option worth to be considered to support
> > networking on the small systems.
>
> Hi Pavel,
>
> Thanks for the info.
>
> We will definitely be adding the largest SDRAM chip we can find to our
> final board, so I imagine we will be okay.
>
> Based on the weirdness I've experienced, not having enough RAM doesn't
> necessarily result in a nice error message. What do you think is a good
> amount of RAM to give the stack, and how can I be sure it's enough?

I have no experience with libBSD on RTEMS. But I would expect that
mentioned 2 MB are minimum for stack of this level/complexity.
When I compare that with Linux then 8 MB SDRAM has been successfully
used in many wireles routers etc. It has been minimum and I consider
that it is not enough for latest kernel versions and full GLibC.
Then 32 MB is OK for Linux.

I expect that 8 MB should be OK for RTEMS and libBSD but some
statistic about amount of allocated memory for example for
4 and 10 TCP/IP connections from Chris or Sebastian would
be interresting. From my experience with LPC, we have
found that 512 kB of Flash is too small for complete
system code+initialization data if we want full RTEMS
support for networking (TCP, TFTP, remote shell)
even if we have 32 MB of external SDRAM.
1 MB of Flash should be enough for reasonable size application.
2 MB even for larger application.

As for classical RTEMS stack, it has lower memory demand
then libBSD, so I expect that 2 MB would be probably OK.

As for lwIP, we have some experience with TMS570.
1 or 2 MB of Flash is OK. 256 kB of internal SRAM
is OK for something like 4 to 10 TCP/IP connections.

Best wishes,

             Pavel


  


More information about the devel mailing list