RTEMS image size question

Matthews, Lee l.matthews at imperial.ac.uk
Wed Jul 13 15:28:53 UTC 2011


I'm developing some software that uses RTEMS on an Aeroflex Gaisler LEON3 processor that is running on a Pender GR-CPCI-AX2000 development board.

I use the following statement to compile my source code : sparc-rtems-gcc -O2 -g sourcecode.c -o outputexecutable.exe

My image files always seem to be rather large (about 150Kbytes), even for rather simple code - is this normal ?

So for example, I modified the provided sample source file rtems-hello.c to look like the following :

#include <rtems.h>

/* configuration information */


#include <bsp.h> /* for device driver prototypes */

rtems_task Init( rtems_task_argument argument); /* forward declaration needed */

/* configuration information */



#define CONFIGURE_MAXIMUM_TASKS             4



#include <rtems/confdefs.h>

#include <stdlib.h>

rtems_task Init(rtems_task_argument ignored)


  exit( 0 );


Yet, when I compile the code and look at its size using sparc-rtems-size it comes out as :

sparc-rtems-size rtems-hello.exe

   text        data         bss         dec         hex     filename

136736        4068        4736     145540       23884     rtems-hello.exe

I do not understand why the image size is so big, given the lack of the visible code's complexity. Is everything compiled in by default? Do I need to explicitly remove the bits from RTEMs that I don't need? How can I reduce the image size?

Any help or guidance would be much appreciated.

Thanks in advance,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20110713/4fad3749/attachment.html>

More information about the users mailing list