Setup your AVH instance, following the instructions in the Arm Virtual Hardware install guide .
In your AVH instance, install the required python software:
sudo apt update sudo apt install python3.8-venv -y sudo cp /usr/local/bin/pip3.8 /usr/bin
Install Python packages:
python3.8 -m pip install imgtool cbor2 python3.9 -m pip install imgtool cffi intelhex cbor2 cbor pytest click
PATH environment variable to make python user packages visible in the shell:
Clone the example repository, and navigate to the
git clone https://github.com/ARM-software/open-iot-sdk.git cd open-iot-sdk/v8m
The projects are located in the
examples folder. Review the list of available projects:
The output is:
blinky keyword speech
ats.sh script to build the examples.
blinky example demonstrates how to use Trusted Firmware-M to create secure and non-secure partitions, and blink the LED from the non-secure code.
blinky example by running:
./ats.sh build blinky
Ignore any warnings from the build.
To run the
blinky example on
Arm Virtual Hardware for Corstone-300:
./ats.sh run blinky
Observe in the output that the system boots through Arm Trusted Firmware (default build uses dummy keys), before the main application.
The output will be similar to:
[INF] Starting bootloader [INF] Beginning BL2 provisioning [WRN] TFM_DUMMY_PROVISIONING is not suitable for production! This device is NOT SECURE [INF] Swap type: none [INF] Swap type: none [INF] Bootloader chainload address offset: 0x0 [INF] Jumping to the first image slot [INF] Beginning TF-M provisioning <NUL>[WRN] <NUL>TFM_DUMMY_PROVISIONING is not suitable for production! <NUL>This device is NOT SECURE<NUL> <NUL>[Sec Thread] Secure image initializing! <NUL>Booting TF-M v1.7.0+3ae2ac302 <NUL>Creating an empty ITS flash layout. Creating an empty PS flash layout. [INF][Crypto] Provisioning entropy seed... complete. [DBG][Crypto] Initialising mbed TLS 3.2.1 as PSA Crypto backend library... complete. Initialising kernel Starting kernel and threads The LED started blinking... LED on LED off LED on LED off ...
Press Control-C to stop the simulation.