You are currently reviewing an older revision of this page.
Each of the examples consist of 4 projects. Two projects provide the secure and the non-secure images to be run on the board. Two other projects provide secure services libraries (Audit Log, Secure Storage) utilised by the Secure image.
Build
In order to build or load a project it needs to be set as the active project in Keil.
To compile this example correctly the secure services needs to be compiled first as libraries, then the secure project as a binary, finally the non-secure.
As a result of the secure build an object file with the veneers is generated which is then linked to the non-secure image.
Run the Example
To run the example on the V2M-MPS2 board you need to load both the secure and non-secure images onto the board.
Output from the examples are printed to the serial port:
UART0 serial port at 115200 baudrate (8N1).
Programming the board
To program the MPS2 board, follow these steps:
TITLE: Versatile Express Images Configuration File[IMAGES]TOTALIMAGES: 2 ;Number of Images (Max: 32)IMAGE0ADDRESS: 0x00000000IMAGE0FILE: \Software\tfm_s.axf ; TF-M example application secure binaryIMAGE1ADDRESS: 0x00000000IMAGE1FILE: \Software\tfm_ns.axf ; TF-M example application non-secure binary
Note: axf file names need to fit in the 8.3 file name format required by MPS2, and filenames generated must be lower case
Debugging
Please note that Keil Debug of these examples will only work with FPGA image for SSE-200 IoT Subsystem for Cortex-M (AN521) Version 3.0 or later.
Debugging has only been tested with ULINK Pro Debugger. To enable it, ensure the following debug settings:
See the ReadMe file provided with the example for further information.