Reducing the size of an RTEMS application

Gedare Bloom gedare at rtems.org
Tue Nov 1 16:32:44 UTC 2016


There is now an aggressive optimization that I believe is enabled in
leon3 on master, I don't recall if it is in 4.11, but you can check
your leon3.cfg file. The optimization uses the two flags to gcc,
-ffunction-sections and -fdata-sections, to group functions and data
in separate sections of the object file, and then used along with
link-time -gc-sections to garbage-collect unused sections. This
appears to provide a quite nice reduction in size for unused
code/data. In order to go smaller, you are best recommended to shrink
the CONFIGURE_* options to the minimum your application needs in order
to reduce the size of the pre-allocated workspace.

On Tue, Nov 1, 2016 at 1:36 AM, Oyake, Amalaye (398F)
<amalaye.oyake at jpl.nasa.gov> wrote:
> Hello all,
>
>
>
> 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.
>
>
>
> Regards,
>
> -----------
>
> * Amalaye Oyake                                       *
>
> * Instrument Product Software Development Group  */\  *
>
> * Jet Propulsion Laboratory, Pasadena            *||  *
>
> * CA 91109                                       /||\ *
>
> **************************************************^^***
>
>
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users



More information about the users mailing list