Memory Footprint

This benchmark measures the memory footprint of the BeRTOS kernel + a simple minimalist user application.

The purpose of this test is to give a measure of the required space in a generic flash memory to store a full-featured BeRTOS kernel.

Experimental result

memory_footprint benchmark results graph
ArchitectureSize (in bytes)
Cortex-M3 STM32F103 (72MHz) 2252
ARM7TDMI LPC2378 (72MHz) 3856
Cortex-M3 SAM3N (48MHz) 2088
Cortex-M3 LM3S1968 (50MHz) 2688
ARM7TDMI AT91SAM7X256 (48MHz) 3704
ARM7TDMI AT91SAM7S256 (48MHz) 3692
AVR ATmega328P (16MHz) 3718
AVR ATmega1281 (14MHz) 3528

NOTE: The source code of this testcase is available under the BeRTOS source package, downloadable at the following URL: http://www.bertos.org/download.

The binary of this testcase was generated using with the following compilers:

  • ARM: arm-none-eabi-gcc (Sourcery G++ Lite 2010q1-188) 4.4.1
  • AVR: avr-gcc (GCC) 4.3.2

The optimization level was set to -Os.

How to run the benchmark

To build this test by yourself you can launch the BeRTOS wizard (./wizard/bertos.py), choose a name for a new project selecting Predefined board and, under the target board, select the BeRTOS Kernel footprint benchmark.

The wizard will create a full BeRTOS project that can be compiled running make directly into the project's main directory.

The kernel memory footprint can be measured looking at the size of the binary generated by the build process. For example: if the name chosen for your project was test simply look at the size of the file ./images/test.bin into the project's directory.

NOTE: to get additional informations about the size of the binary (e.g., which particular section requires more space than others) it is possible to use the commands size or nm (under GNU/Linux or a Cygwin environment), for example:

$ size images/test.elf
   text    data     bss     dec     hex filename
   3690       0    2301    5991    1767 images/test.elf

$ nm -S --size-sort images/test.elf
008009e4 00000001 B preempt_count
008009e2 00000002 B _proc_quantum
...
00000a06 000001e2 T proc_new_with_name
00000c6c 000001f4 T kernel_footprint
0080011c 00000800 b heap_buf