Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.27 KB

README.md

File metadata and controls

23 lines (17 loc) · 1.27 KB

Minimal TrustZone-M Example

This code is based on the examples provided here: https://devzone.nordicsemi.com/f/nordic-q-a/96093/nrf9160-porting-the-modem-library-to-work-with-bare-metal-application and here https://devzone.nordicsemi.com/f/nordic-q-a/92877/bare-metal-programming-on-the-nrf9160

This is a minimal bare-metal example of a TrustZone-M application for the nRF9160dk. It simply turns four LEDs on and off.

This example builds a secure image with three secure entry functions and a non-secure image that calls those functions.

An in-depth explanation will be found in a blog post.

Requirements

Note Newer Arm GNU Toolchain versions have a linker issue with some unimplemented syscalls. I used version 11.2-2022.02 for this project, which worked.

Usage

  1. Clone this repository with git clone --recurse-submodules https://github.com/Einhornhool/minimal-tz.git
  2. Open build_merge_flash.s and change -DTOOLCHAINPATH in line 6 to your Arm GNU toolchain installation
  3. Run ./build_merge_flash.sh from the root directory