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+
511There are three stages to this:
612
7131 . Setup Phase
8142 . Flash Phase
9153 . 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
1319binary to the app_loader capsule.
1420
1521The 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
1925On 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
2329buffer between the app and the capsule) at a time along with the offset.
2430
2531The 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
3137The 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
3541On Failure, the app exits logs the reason for failure and exits.
3642
3743#### Load Phase
3844The 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.
41472 . The load process failed somewhere, and the app is erased.
0 commit comments