Skip to content

Commit 94742d2

Browse files
committed
Update README.md
1 parent f3e6092 commit 94742d2

File tree

1 file changed

+44
-14
lines changed

1 file changed

+44
-14
lines changed

README.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,70 @@
1-
# Threaded RPC with uVisor Example
1+
# Threaded RPC with uVisor example
22

33
This is a simple example to show how to use several uVisor APIs to build a box that securely stores a number.
44
This number can only be written by one box, but read by all boxes.
55

6-
- Create and run secure boxes.
7-
- Secure static and dynamic memory inside secure boxes.
8-
- Run threads inside secure boxes.
9-
- Issue RPC requests to other secure boxes and wait for their completion.
10-
- Receive and process incoming RPC requests from other secure boxes.
11-
- Get box id and namespace of the RPC caller.
6+
* Create and run secure boxes.
7+
* Secure static and dynamic memory inside secure boxes.
8+
* Run threads inside secure boxes.
9+
* Issue RPC requests to other secure boxes and wait for their completion.
10+
* Receive and process incoming RPC requests from other secure boxes.
11+
* Get box id and namespace of the RPC caller.
1212

1313
This demo contains three secure boxes:
1414

1515
1. The secure number vault. This box stores one number that can only be written to by client A, but read by everyone.
16-
2. Client A, which attempts to write (and succeeds) and read the secure number.
17-
3. Client B, which attempts to write (but fails) and read the secure number.
16+
1. Client A, which attempts to write (and succeeds) and read the secure number.
17+
1. Client B, which attempts to write (but fails) and read the secure number.
1818

1919
The insecure box 0 also attempts to write (but fails) and read the secure number.
2020

21-
## Building
21+
Supported devices:
2222

23-
The example currently only works on K64F with the GCC_ARM toolchain.
23+
| Target | Toolchain | Baud rate |
24+
|--------|-----------|-----------|
25+
| `K64F` | `GCC_ARM` | 9600 |
2426

25-
### Release
27+
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).
28+
29+
## Quickstart
2630

2731
For a release build, please enter:
2832

2933
```bash
30-
$ mbed compile -m K64F -t GCC_ARM
34+
$ mbed compile -m K64F -t GCC_ARM -c
3135
```
3236

3337
You will find the resulting binary in `BUILD/K64F/GCC_ARM/mbed-os-example-uvisor-number-store.bin`. You can drag and drop it onto your board USB drive.
3438

39+
Press the reset button. The `box_number_store` secure box will use 3 LEDs on your target to signal the execution of the `get_caller_id`, `get_number` and `set_number` APIs. You can observe the example output on the serial port:
40+
41+
```bash
42+
$ screen /dev/tty.usbmodem1422 9600
43+
```
44+
45+
You will see an output similar to the following one:
46+
47+
```
48+
**** uVisor secure number store example *****
49+
Trusted client a has box id 2
50+
2: Wrote '0xfffffed4'
51+
1: Read '0xfffffed4'
52+
1: Permission denied. This client cannot write the secure number '0xfffffe0c'
53+
0: Read '0xfffffed4'
54+
0: Permission denied. This client cannot write the secure number '0x00000019'
55+
2: Read '0xfffffed4'
56+
2: Wrote '0xfffffda8'
57+
2: Read '0xfffffda8'
58+
1: Permission denied. This client cannot write the secure number '0xfffffc18'
59+
2: Wrote '0xfffffc7c'
60+
...
61+
```
62+
63+
> **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`.
64+
3565
### Debug
3666

37-
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:
67+
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:
3868

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

0 commit comments

Comments
 (0)