Reducing RTEMS size to <32KB to fit in Epiphany local memories

Joel Sherrill joel.sherrill at oarcorp.com
Wed Dec 17 16:34:36 UTC 2014



On December 17, 2014 8:00:50 AM PST, Hesham Moustafa <heshamelmatary at gmail.com> wrote:
>Hi all,
>
>I am working on reducing RTEMS size to fit into <32KB as every Epiphay
>core has only 32KB of local memory. I was able to get hello and
>minimum samples with aggressive size reduction by manually removing
>un-needed code. Currently I only use libcsupport, sapi, score, rtems
>built for cpukit only, and for each, some source code files were
>removed. No IO, no FS, no barrier, event, managers are included. 

Our minimum is where it is because no one has provided lower requirements. Some of the things you dropped out could be addressed by initialization being more like a constructor table that is automatically built based on dependencies. This was/is the sequenced initialization project. I don't know the state of it.

Try turning on per section methods and data like the SPARC bsps. This saves memory.


Defining which features are part of 'nanoRTEMS' is a big part of this. Then those requirements can drive dropping things not covered by sequenced initialization and finer tuning.

Using printk saves a lot of memory.

>And I
>added -Os flag. However when building ticker, the .text area overflows
>the 32KB local memory by about 8KB.
>
>The question is, what are the very basic mandatory sources/libraries
>and/or managers that are enough to build ticker?

Some of that is stack size in ticker. Look at the ticker variants in examples-v2

>Regards,
>Hesham
>_______________________________________________
>devel mailing list
>devel at rtems.org
>http://lists.rtems.org/mailman/listinfo/devel

--joel



More information about the devel mailing list