Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Changes between Version 1 and Version 2 of Projects/TinyRTEMS


Ignore:
Timestamp:
05/28/07 20:26:39 (17 years ago)
Author:
JoelSherrill
Comment:

/* Configuring RTEMS for Size */ Add some more information comparing m68k and SPARC sizes.

Legend:

Unmodified
Added
Removed
Modified
  • Projects/TinyRTEMS

    v1 v2  
    3737After making sure your BSP doesn't do something that results in unnecessary object files being linked in, then you can focus on configuring RTEMS to be as small as possible.  The following guidelines should help:
    3838
     39 *  Remember that your choice of architecture dramatically impacts your code size.  Code for the RISC processors like the SPARC and PowerPC is generally larger than for CISC such as m68k or SuperH.  The following is the size of the minimum.exe for the SPARC/SIS and M68K/MVME136 BSPs built using the same RTEMS options:
     40
     41{{{
     42   text    data     bss     dec     hex filename
     43  57488    3396    4392   65276    fefc sparc-sis-minimum.exe
     44  43744    3376   20160   67280   106d0 ./m68k-rtems4.8/c/mvme136/testsuites/samples/minimum/minimum.nxe
     45}}}
     46
     47In this case, the m68k BSP is considerably smaller in text and slightly smaller in data.  The bss is larger because the mvme136 BSP reserves a generous starting stack in the bss and the SIS BSP assigns it differently.
     48
    3949 *  Use -Os instead of -O2.  This optimizes for size. 
    4050 *  Consider building a custom newlib binary optimized for size. 
    4151 *  Add -DNDEBUG to your BSP's custom/XXX.cfg CFLAGS options.  This disables assert code in RTEMS so should be done cautiously.
    42  *  configure RTEMS with as many features disabled as possible:
     52 *  configure RTEMS with as many features disabled as possible.  The following is an example configure command for the SPARC/SIS BSP.  On
    4353
    4454{{{
    45 .../configure --target=XXX --prefix=YYY \
    46   USE_TICKS_FOR_CPU_USAGE_STATISTICS=1 USE_TICKS_FOR_RATE_MONOTONIC_STATISTICS=1 \
     55.../rtems-XXX/configure --target=sparc-rtems4.8 --enable-rtemsbsp=sis \
     56  --prefix=XXX \
     57  USE_TICKS_FOR_CPU_USAGE_STATISTICS=1 \
     58  USE_TICKS_FOR_RATE_MONOTONIC_STATISTICS=1 \
    4759  --disable-itron --disable-posix --disable-networking --disable-cxx \
    48   --disable-multiprocessing
     60  --disable-multiprocessing --enable-tests=samples
    4961}}}
    5062