TF-M Hello World
The TF-M Hello World sample is based on Hello World that demonstrates adding Trusted Firmware-M (TF-M) to an application.
Requirements
The sample supports the following development kits:
Hardware platforms |
PCA |
Board name |
Board target |
---|---|---|---|
PCA10153 |
|
||
PCA10090 |
|
||
PCA10171 |
|
||
PCA10156 |
|
||
PCA10095 |
|
Overview
This sample uses the Platform Security Architecture (PSA) API to calculate a SHA-256 digest and the TF-M platform read service to read two FICR registers. The PSA API call is handled by the TF-M secure firmware.
Building and running
This sample can be found under samples/tfm/tfm_hello_world
in the nRF Connect SDK folder structure.
To build the sample, follow the instructions in Building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.
Note
When building repository applications in the SDK repositories, building with sysbuild is enabled by default.
If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild
parameter to every build command or configure west to always use it.
Testing
After programming the sample, the following output is displayed in the console:
Hello World! nrf5340dk/nrf5340/cpuapp/ns
Reading some secure memory that NS is allowed to read
Approximate IPC overhead us: 65
FICR->INFO.FLASH: 0x00000400
Generating random number
0x03607cef3bdcbbec52edebeb7a0e80756b96d647c82fab068f26d436ff078152
Example finished successfully!
Dependencies
This sample uses the TF-M module that can be found in the following location in the nRF Connect SDK folder structure:
modules/tee/tfm/
This sample uses the following libraries: