1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-28 22:49:47 +01:00
RIOT/tests/riotboot
Marian Buschsieweke 12140ffb0e
examples,tests: Drop redundant dependency
When depending on one or more shell commands, the shell is pulled in
as dependency anyway.
2023-04-19 16:58:10 +02:00
..
tests tests/riotboot: make automatic script work with cc2538-bsl 2020-11-18 14:51:01 +01:00
main.c tests: add riotboot bootloader test 2018-12-18 19:31:35 +01:00
Makefile examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
Makefile.ci tests: add to BOARD_INSUFFICIENT_MEMORY 2021-01-06 23:44:54 +01:00
README.md tests/riotboot: migrate to full python test script 2019-12-02 17:27:35 +01: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.

In this test two modules riotboot_hdr and riotboot_slot are used to showcase the access to riotboot shared functions.

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, invalidate slot1

  2. get the running slot and current APP_VER

  3. flash slot1 with APP_VER + 1

  4. verify slot1 has booted and shows version = APP_VER + 1

  5. flash slot0 with APP_VER + 2

  6. verify slot0 has booted and shows version = APP_VER + 2

If this test runs correctly, it shows that riotboot's basic functions are working properly on the target board.