Skip to content

Commit 235fcff

Browse files
committed
update readme
1 parent 3295038 commit 235fcff

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
# Dynamic App Loader (Helper App)
22
=================================
33

4-
This app waits upon the user to press a button on the device.
4+
This app waits upon the user to press one of two buttons on the device (if supported).
5+
6+
When Button 1 (Default user button on boards) is pressed, the app tried to load in the
7+
`blink` app.
8+
9+
When Button 2 is pressed, the app tries to load in the `adc` app.
10+
511
There are three stages to this:
612

713
1. Setup Phase
814
2. Flash Phase
915
3. Load Phase
1016

1117
#### Setup Phase
12-
During the setup phase, the application passes the size of the new app `(blink)`'s
18+
During the setup phase, the application passes the size of the new app `(blink)/(adc)`'s
1319
binary to the app_loader capsule.
1420

1521
The capsule returns with either a success or failure.
1622

17-
On success, the app requests the app_loader capsule to flash the `blink` app.
23+
On success, the app requests the app_loader capsule to flash the `blink/adc` app.
1824

1925
On Failure, the app exits logs the reason for failure and exits.
2026

2127
#### Flash Phase
22-
The app sends the binary of the `blink` app 512 bytes (this is the size of the shared
28+
The app sends the binary of the `blink/adc` app 512 bytes (this is the size of the shared
2329
buffer between the app and the capsule) at a time along with the offset.
2430

2531
The capsule checks that these values do not violate the bounds dictated by the kernel
@@ -30,12 +36,12 @@ violations do not take place, and flashes the app.
3036

3137
The capsule then returns with either a success or failure.
3238

33-
On success, the app requests the app_loader capsule to load the `blink` app.
39+
On success, the app requests the app_loader capsule to load the `blink/adc` app.
3440

3541
On Failure, the app exits logs the reason for failure and exits.
3642

3743
#### Load Phase
3844
The app requests the capsule to load the new app. There are only two outcomes:
3945

40-
1. The `blink` app is loaded successfully and functions without requiring a restart.
46+
1. The `blink/adc` app is loaded successfully and functions without requiring a restart.
4147
2. The load process failed somewhere, and the app is erased.

examples/tests/app_loader/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static void button_callback(int btn_num,
117117
tock_exit(ret); // we failed, so we exit the program.
118118
} else {
119119
// yielding for padding write
120-
printf("[Log] yielding for padding write.\n");
120+
printf("[Log] yielding for setup done.\n");
121121
yield_for(&setup_done); // wait until the padding app write is done before you send your app, or it will fail during write
122122
setup_done = false;
123123
// padding success

0 commit comments

Comments
 (0)