Reducing the size of an RTEMS application
Joel Sherrill
joel at rtems.org
Tue Nov 1 18:28:19 UTC 2016
On Tue, Nov 1, 2016 at 1:01 PM, Oyake, Amalaye (398F) <
amalaye.oyake at jpl.nasa.gov> wrote:
> 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.
>
>
Is this a C++ application by any chance? That reduction sounds
similar to something reported by another C++ user. I haven't heard
of a reduction that large from a C project.
> Are the options -ffunction-sections and -fdata-sections turned on by
> default? Also what determines the size of the in-memory file system?
>
> Yes on sections on by default for RTEMS itself. It may or may not
be on for your application and support libraries.
There is a configure option to determine the block size for the IMFS.
Total size is dependent on your content.
> I will look at the gcc optimization options.
>
> As big as 754K is, even a few percentage points is useful.
> I will look at the configure options.
>
Look at the symbols and see if there is anything that surprises you.
Sometimes you have a dependency on something you don't
realize.
>
> 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
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20161101/03cdd25b/attachment-0002.html>
More information about the users
mailing list