2018-09-27 02:00:36 +02:00
|
|
|
RIOT bootloader test
|
|
|
|
====================
|
|
|
|
|
|
|
|
This is a basic example how to use RIOT bootloader in your embedded
|
|
|
|
application.
|
|
|
|
|
|
|
|
This test should foremost give you an overview how to use riotboot:
|
|
|
|
|
|
|
|
- `make all` build the test using the target riotboot, which generates
|
|
|
|
a binary file of the application with a header on top of it, used by
|
|
|
|
the bootloader to recognise a bootable image.
|
|
|
|
|
|
|
|
- `make riotboot/flash` creates the binary files and flashes both
|
|
|
|
riotboot and the RIOT image with headers included. This should boot
|
|
|
|
as a normal application.
|
|
|
|
|
2018-12-05 01:12:14 +01:00
|
|
|
In this test two modules `riotboot_hdr` and `riotboot_slot` are used to showcase
|
2018-09-27 02:00:36 +02:00
|
|
|
the access to riotboot shared functions.
|
2018-12-05 01:12:14 +01:00
|
|
|
|
2019-06-14 14:13:58 +02:00
|
|
|
Automatic test
|
|
|
|
==============
|
|
|
|
|
|
|
|
This application's "test" target can be used to test basic riotboot
|
|
|
|
functionality:
|
|
|
|
|
|
|
|
BOARD=<board> make flash test
|
|
|
|
|
|
|
|
This will:
|
|
|
|
|
|
|
|
1. flash bootloader and slot0 with APP_VER=0, invalidate slot1
|
|
|
|
2. verify slot0 has been booted and has APP_VER set to 0
|
|
|
|
|
|
|
|
3. flash slot1 with APP_VER set to 1
|
|
|
|
4. verify slot1 has booted and shows APP_VER==1
|
|
|
|
|
|
|
|
5. flash slot0 with APP_VER set to 2
|
|
|
|
6. verify slot0 has booted and shows APP_VER==2
|
|
|
|
|
|
|
|
If this test runs correctly, it shows that riotboot's basic functions and are
|
|
|
|
working properly on the target board.
|