doc: tfm: Document size report commands for TF-M and BL2 images

Add documentation with example commands for getting the RAM and ROM
reports for the secure firmware image (TF-M) and mcuboot (BL2).

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2022-03-07 16:44:29 +01:00 committed by Anas Nashif
commit 3191191943

View file

@ -22,9 +22,9 @@ Images Created by the TF-M Build
The TF-M build system creates the following executable files:
* tfm_s - the secure firmware
* tfm_s - TF-M secure firmware
* tfm_ns - a nonsecure app which is discarded in favor of the Zephyr app
* bl2 - mcuboot, if enabled
* bl2 - TF-M MCUboot, if enabled
For each of these, it creates .bin, .hex, .elf, and .axf files.
@ -118,3 +118,42 @@ following CMake snippet in your CMakeLists.txt file.
The ``TFM_CMAKE_OPTIONS`` is a list so it is possible to append multiple
options. Also CMake generator expressions are supported, such as
``$<1:-DFOO=bar>``
Footprint and Memory Usage
**************************
The build system offers targets to view and analyse RAM and ROM usage in generated images.
The tools run on the final images and give information about size of symbols and code being used in both RAM and ROM.
For more information on these tools look here: :ref:`footprint_tools`
Use the ``tfm_ram_report`` to get the RAM report for TF-M secure firmware (tfm_s).
.. zephyr-app-commands::
:tool: all
:app: samples/hello_world
:board: mps2_an521_ns
:goals: tfm_ram_report
Use the ``tfm_rom_report`` to get the ROM report for TF-M secure firmware (tfm_s).
.. zephyr-app-commands::
:tool: all
:app: samples/hello_world
:board: mps2_an521_ns
:goals: tfm_rom_report
Use the ``bl2_ram_report`` to get the RAM report for TF-M MCUboot, if enabled.
.. zephyr-app-commands::
:tool: all
:app: samples/hello_world
:board: mps2_an521_ns
:goals: bl2_ram_report
Use the ``bl2_rom_report`` to get the ROM report for TF-M MCUboot, if enabled.
.. zephyr-app-commands::
:tool: all
:app: samples/hello_world
:board: mps2_an521_ns
:goals: bl2_rom_report