Reducing the size of an RTEMS application

Chris Johns chrisj at rtems.org
Tue Nov 1 17:51:26 UTC 2016


On 31/10/16 10:36 pm, Oyake, Amalaye (398F) wrote:
> 
> I am building a Leon-3 application for a resource constrained platform
> (very little RAM). How can I reduce the size of the RTEMS application?
> Beyond normal RTEMS kernel configuration, turning off debugging and
> optimizing with –O, are there ways to strip out any unnecessary symbols
> after compilation.

Which version of RTEMS? The master for up coming 4.12 supports function
sections and that may help.

I think reducing the size will be an exercise in isolating each part and
removing it. The static sizes can be reviewing using something like:

 $ sparc-rtems4.12-nm --size-sort --print-size --reverse-sort \
    sparc-rtems4.12/c/sis/testsuites/samples/ticker/ticker.exe | less

and to look at just the RAM usage:

 $ sparc-rtems4.12-nm --size-sort --print-size --reverse-sort \
    sparc-rtems4.12/c/sis/testsuites/samples/ticker/ticker.exe | \
    grep " [BDdb] "

The dynamic memory will be a little more difficult.

The memory usage will depend on the services you use. It would be nice
to know the effect the new RTEMS printer interface would make.

Chris


More information about the users mailing list