|
1 |
| -# Threaded Blinky with uVisor Example |
| 1 | +# Threaded blinky with uVisor example |
2 | 2 |
|
3 |
| -This is a simple example to show how to write a uVisor-secured threaded |
4 |
| -application. Three LEDs will blink from three separate secure processes. Each |
5 |
| -process also updates some memory private to that process. The memory allocator |
6 |
| -is also used in this example. |
| 3 | +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. |
7 | 4 |
|
8 |
| -## Building |
| 5 | +Supported devices: |
9 | 6 |
|
10 |
| -The example currently only works on K64F with the GCC_ARM toolchain. |
| 7 | +| Target | Toolchain | Baud rate | |
| 8 | +|--------|-----------|-----------| |
| 9 | +| `K64F` | `GCC_ARM` | 9600 | |
11 | 10 |
|
12 |
| -### Release |
| 11 | +Latest release: [mbed-os-5.3.0](https://github.com/ARMmbed/mbed-os-example-uvisor/releases/tag/mbed-os-5.3.0). Tested with [mbed-cli v1.0.0](https://github.com/ARMmbed/mbed-cli/releases/tag/1.0.0). |
| 12 | + |
| 13 | +## Quickstart |
13 | 14 |
|
14 | 15 | For a release build, please enter:
|
15 | 16 |
|
16 | 17 | ```bash
|
17 |
| -$ mbed compile -m K64F -t GCC_ARM |
| 18 | +$ mbed compile -m K64F -t GCC_ARM -c |
| 19 | +``` |
| 20 | + |
| 21 | +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. |
| 22 | + |
| 23 | +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. |
| 24 | + |
| 25 | +If you want, you can also observe the serial port output: |
| 26 | + |
| 27 | +```bash |
| 28 | +$ screen /dev/tty.usbmodem1422 9600 |
| 29 | +``` |
| 30 | + |
| 31 | +You will see an output similar to the following one: |
| 32 | + |
| 33 | +``` |
| 34 | +***** threaded blinky uvisor-rtos example ***** |
| 35 | +Main loop count: 0 |
| 36 | +Main loop count: 1 |
| 37 | +Main loop count: 2 |
| 38 | +Main loop count: 3 |
| 39 | +Main loop count: 4 |
| 40 | +Main loop count: 5 |
| 41 | +Main loop count: 6 |
| 42 | +... |
18 | 43 | ```
|
19 | 44 |
|
20 |
| -You will find the resulting binary in `BUILD/K64F/GCC_ARM/mbed-os-example-uvisor-thread.bin`. You can drag and drop it onto your board USB drive. |
| 45 | +> **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`. |
21 | 46 |
|
22 | 47 | ### Debug
|
23 | 48 |
|
24 |
| -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](https://github.com/ARMmbed/uvisor/blob/master/docs/api/DEBUGGING.md) guide. To build a debug version of the program: |
| 49 | +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](https://github.com/ARMmbed/uvisor/blob/master/docs/api/DEBUGGING.md) guide. To build a debug version of this example, please enter: |
25 | 50 |
|
26 | 51 | ```bash
|
27 | 52 | $ mbed compile -m K64F -t GCC_ARM --profile mbed-os/tools/profiles/debug.json -c
|
|
0 commit comments