Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 2.78 KB

README.md

File metadata and controls

66 lines (44 loc) · 2.78 KB

Threaded blinky with uVisor example

Build Status

Warning: uVisor is superseded by the Secure Partition Manager (SPM) defined in the ARM Platform Security Architecture (PSA). uVisor is deprecated as of Mbed OS 5.10, and being replaced by a native PSA-compliant implementation of SPM.

This is a simple example to show how to write a uVisor-secured threaded application. Three LEDs will blink from three separate secure processes. Each process also updates some memory private to that process. The memory allocator is also used in this example.

Supported devices:

Target Toolchain Baud rate
K64F GCC_ARM 9600
DISCO_F429ZI GCC_ARM 9600
EFM32GG_STK3700 GCC_ARM 9600

Quickstart

For a release build, please enter:

$ mbed compile -m K64F -t GCC_ARM -c

You will find the resulting binary in BUILD/${TARGET}/${TOOLCHAIN}/mbed-os-example-uvisor-thread.bin. You can drag and drop it onto your board USB drive.

Press the reset button. You will see 3 LEDs on your target blink one after the other as the 3 respective secure boxes are switched in and out.

If you want, you can also observe the serial port output:

$ screen /dev/tty.usbmodem1422 9600

You will see an output similar to the following one:

***** Threaded blinky uVisor example *****
Main loop count: 0
Main loop count: 1
Main loop count: 2
Main loop count: 3
Main loop count: 4
Main loop count: 5
Main loop count: 6
...

Note: If your target does not have 3 different LEDs or LED colours, you will see the same LED blink multiple times. The example use the general mbed OS naming structure LED1, LED2, LED3.

Debug

When a debugger is connected, you can observe debug output from uVisor. Please note that these messages are sent through semihosting, which halts the program execution if a debugger is not connected. For more information please read the Debugging uVisor on mbed OS guide. To build a debug version of this example, please enter:

$ mbed compile -m K64F -t GCC_ARM --profile mbed-os/tools/profiles/debug.json -c

Known issues

  • Use of exporters for multiple IDEs is not supported at the moment.
  • uVisor will halt the system on unregistered interrupts arrival. Do not attempt to push any SW buttons not listed in this document.

Troubleshooting

If you have problems, you can review the documentation for suggestions on what could be wrong and how to fix it.