<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 1, 2016 at 11:32 AM, Gedare Bloom <span dir="ltr"><<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">There is now an aggressive optimization that I believe is enabled in<br>
leon3 on master, I don't recall if it is in 4.11, but you can check<br>
your leon3.cfg file. The optimization uses the two flags to gcc,<br>
-ffunction-sections and -fdata-sections, to group functions and data<br>
in separate sections of the object file, and then used along with<br>
link-time -gc-sections to garbage-collect unused sections. This<br>
appears to provide a quite nice reduction in size for unused<br>
code/data. In order to go smaller, you are best recommended to shrink<br>
the CONFIGURE_* options to the minimum your application needs in order<br>
to reduce the size of the pre-allocated workspace.<br>
<div><div class="gmail-h5"><br></div></div></blockquote><div><br></div><div>I just checked. It was enabled on 4.11. I thought so since the SPARC BSPs</div><div>were where I tested this initially.</div><div><br></div><div>You can change -O2 to -Os which can drop 10-15 percent if you are lucky.</div><div><br></div><div>The master has a different initialization scheme and you might want to</div><div>see how much you can gain by switching to the master. This change improved</div><div>size considerably in some cases.</div><div><br></div><div>Gedare is right. If you are really low on memory, then you need to decide</div><div>whether you are focusing on Flash or RAM. If code is in RAM, then you</div><div>get to look at options impacting code size and data usage.  The examples-v2</div><div>ticker series uses a series of changes to drop the size. But the change</div><div>against master isn't nearly as dramatic in code size as it used to be. But</div><div>the RAM usage can drop. </div><div><br></div><div>Ultimately, this is tuning RTEMS for a specific application and we need to</div><div>know what you don't need that is in this executable. For example, you can </div><div>decrease minimum task  stack size and lower the number of priorities in</div><div>the default uniprocessor scheduler but you HAVE to know the application</div><div>in order to get those settings right.</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5">
On Tue, Nov 1, 2016 at 1:36 AM, Oyake, Amalaye (398F)<br>
<<a href="mailto:amalaye.oyake@jpl.nasa.gov">amalaye.oyake@jpl.nasa.gov</a>> wrote:<br>
> Hello all,<br>
><br>
><br>
><br>
> I am building a Leon-3 application for a resource constrained platform (very<br>
> little RAM). How can I reduce the size of the RTEMS application? Beyond<br>
> normal RTEMS kernel configuration, turning off debugging and optimizing with<br>
> –O, are there ways to strip out any unnecessary symbols after compilation.<br>
><br>
><br>
><br>
> Regards,<br>
><br>
> -----------<br>
><br>
> * Amalaye Oyake                                       *<br>
><br>
> * Instrument Product Software Development Group  */\  *<br>
><br>
> * Jet Propulsion Laboratory, Pasadena            *||  *<br>
><br>
> * CA 91109                                       /||\ *<br>
><br>
> ******************************<wbr>********************^^***<br>
><br>
><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br>
______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a></blockquote></div><br></div></div>