Minimal sample¶
Overview¶
This sample defines An empty main()
and a set of minimal configurations
that provide tests for the smallest ROM sizes possible with the Zephyr kernel.
The following configuration files are available:
mt.conf
: Enable multithreadingno-mt.conf
: Disable multithreadingno-preempt.conf
: Disable preemptionno-timers.conf
:: Disable timersarm.conf
: Arm-specific disabling of features
Building and measuring ROM size¶
In order to compare ROM sizes with different minimal configurations, the following combinations are suggested:
Reel board (Arm architecture)
Multithreading enabled
Reference ROM size: 7-8KB
west build -b reel_board -d build/reel_board/mt samples/basic/minimal -- -DCONF_FILE="common.conf mt.conf arm.conf" west build -t rom_report -d build/reel_board/mt
Multithreading enabled, no preemption
Reference ROM size: 7-8KB
west build -b reel_board -d build/reel_board/mt-no-preempt samples/basic/minimal -- -DCONF_FILE="common.conf mt.conf no-preempt.conf arm.conf" west build -t rom_report -d build/reel_board/mt-no-preempt
Multithreading enabled, no preemption, timers disabled
Reference ROM size: 3-4KB
west build -b reel_board -d build/reel_board/mt-no-preempt-no-timers samples/basic/minimal -- -DCONF_FILE="common.conf mt.conf no-preempt.conf no-timers.conf arm.conf" west build -t rom_report -d build/reel_board/mt-no-preempt-no-timers
Multithreading disabled, timers enabled
Reference ROM size: 4-5KB
west build -b reel_board -d build/reel_board/no-mt samples/basic/minimal -- -DCONF_FILE="common.conf no-mt.conf arm.conf" west build -t rom_report -d build/reel_board/no-mt
Multithreading disabled, timers disabled
Reference ROM size: 2-3KB
west build -b reel_board -d build/reel_board/no-mt-no-timers samples/basic/minimal -- -DCONF_FILE="common.conf no-mt.conf no-timers.conf arm.conf" west build -t rom_report -d build/reel_board/no-mt-no-timers