Reducing the size of an RTEMS application
Oyake, Amalaye (398F)
amalaye.oyake at jpl.nasa.gov
Tue Nov 1 18:01:20 UTC 2016
Thank you for the replies Chris, Joel and Gedare:
I read the following: https://docs.rtems.org/releases/rtemsdocs-4.6.2/share/rtems/html/FAQ/FAQ00069.html
And using sparc-rtems4.12-strip (I am using RTEMS ‘4.12’ pulled from git), I got a reduction from 7.3M to 754K, which is more in line with what I expected. However, I am interested in reducing things more.
Are the options -ffunction-sections and -fdata-sections turned on by default? Also what determines the size of the in-memory file system?
I will look at the gcc optimization options.
I will look at the configure options.
Regards,
-----------
* Amalaye Oyake *
* Instrument Product Software Development Group */\ *
* Jet Propulsion Laboratory, Pasadena *|| *
* CA 91109 /||\ *
**************************************************^^***
On 11/1/16, 10:51 AM, "Chris Johns" <chrisj at rtems.org> wrote:
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