zephyr/samples/basic/minimal
Benjamin Cabé 59e4c5aed0 samples: fully migrate basic samples to the new Sphinx extension
- Updated basic samples READMEs to use the new zephyr:code-sample::
  directive. Dropped "-sample" suffix that's not required anymore now
  that samples have their own namespace.
- Updated all references to the samples to use the :zephyr:code-sample:
  role. Checked and updated the wording of said references to account
  for the fact that samples should not have "... sample" in their name
  anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
..
src samples: add no-timers configuration which is runtime tested 2023-08-03 07:32:03 -04:00
arm.conf
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
common-runtime.conf samples/basic/minimal: make it smaller 2023-08-11 19:47:47 +00:00
common.conf samples: basic: minimal: remove pinmux 2022-06-06 15:39:50 -07:00
Kconfig samples: add no-timers configuration which is runtime tested 2023-08-03 07:32:03 -04:00
mt.conf
no-mt.conf samples: basic/minimal: disable memory pool when MT=n 2020-09-19 05:49:13 -04:00
no-preempt.conf
no-timers.conf kernel: Crank up default tick rate 2019-07-02 22:52:29 -04:00
prj.conf samples: minimal: define an empty project configuration 2023-03-28 15:05:01 +02:00
README.rst samples: fully migrate basic samples to the new Sphinx extension 2023-09-13 09:15:34 +02:00
riscv.conf samples/basic/minimal: make it smaller 2023-08-11 19:47:47 +00:00
sample.yaml samples/basic/minimal: make it smaller 2023-08-11 19:47:47 +00:00
x86.conf

.. zephyr:code-sample:: minimal
   :name: Minimal footprint

   Measure Zephyr's minimal ROM footprint in different configurations.

Overview
********

This sample provides an empty ``main()`` and various configuration files that
can be used to measure Zephyr's minimal ROM footprint in different
configurations.

The following configuration files are available:

* :file:`mt.conf`: Enable multithreading
* :file:`no-mt.conf`: Disable multithreading
* :file:`no-preempt.conf`: Disable preemption
* :file:`no-timers.conf`: Disable timers
* :file:`arm.conf`: Arm-specific disabling of features

Building and measuring ROM size
*******************************

The following combinations are suggested for comparing ROM sizes in different
configurations. They all target the :ref:`reel_board` (Arm Aarch32 architecture).

* Multithreading enabled

  * Reference ROM size: 7-8KB

  .. zephyr-app-commands::
     :zephyr-app: samples/basic/minimal
     :host-os: unix
     :board: reel_board
     :build-dir: reel_board/mt/
     :conf: "common.conf mt.conf arm.conf"
     :goals: rom_report
     :compact:

* Multithreading enabled, no preemption

  * Reference ROM size: 7-8KB

  .. zephyr-app-commands::
     :zephyr-app: samples/basic/minimal
     :host-os: unix
     :board: reel_board
     :build-dir: reel_board/mt-no-preempt/
     :conf: "common.conf mt.conf no-preempt.conf arm.conf"
     :goals: rom_report
     :compact:

* Multithreading enabled, no preemption, timers disabled

  * Reference ROM size: 3-4KB

  .. zephyr-app-commands::
     :zephyr-app: samples/basic/minimal
     :host-os: unix
     :board: reel_board
     :build-dir: reel_board/mt-no-preempt-no-timers/
     :conf: "common.conf mt.conf no-preempt.conf no-timers.conf arm.conf"
     :goals: rom_report
     :compact:

* Multithreading disabled, timers enabled

  * Reference ROM size: 4-5KB

  .. zephyr-app-commands::
     :zephyr-app: samples/basic/minimal
     :host-os: unix
     :board: reel_board
     :build-dir: reel_board/no-mt/
     :conf: "common.conf no-mt.conf arm.conf"
     :goals: rom_report
     :compact:

* Multithreading disabled, timers disabled

  * Reference ROM size: 2-3KB

  .. zephyr-app-commands::
     :zephyr-app: samples/basic/minimal
     :host-os: unix
     :board: reel_board
     :build-dir: reel_board/no-mt-no-timers/
     :conf: "common.conf no-mt.conf no-timers.conf arm.conf"
     :goals: rom_report
     :compact: