This example is based on Trusted Firmware-M project's 'Default Configuration'. It is supplied by the Keil Musca TF-M Middleware pack version 1.2.1 and requires the Keil Musca-B1 BSP version 1.1.0.The example provides a bare minimum demonstration of TF-M. It:
The example consist of 5 projects. Two projects provide the secure and the non-secure images to be run on the board.Three other projects provide secure services libraries (Audit Log, Crypto and Secure Storage) utilised by the Secure image.
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.To run the example on the Musca B1 board you need to load both the secure and non-secure images onto the board.From the 2 relevant projects just click on the Load icon to load the image.Secure image load does full flash erase so this image needs to be loaded first.The images are loaded to the QSPI flash.On UART1 serial port (connected in USB port) at 115200 baudrate (8N1) the following welcome message should be seen: "[Sec Thread] Secure image initializing!"
Please check the Known Issues section of the ReadMe.txt in the root folder for failing results.
The examples provided with Keil TFM Pack v1.2.1 for Keil Musca-B1 BSP v1.1.0 are designed to run from eFlash memory. To use these examples you need to ensure that the eFlash DAPLink firmware is installed on the Musca-B1 board, as provided on the Firmware Page.
(Older examples provided with Keil TFM Pack v1.2.0 for Keil Musca-B1 BSP v1.0.0 are designed to run from QSPI memory and required the QSPI DAPLink Firmware.)