1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

riotboot: define if building the bootloader

This commit is contained in:
Bas Stottelaar 2019-07-22 00:05:57 +02:00
parent 2e428e2786
commit 58e28250bd
2 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,9 @@ BOARD ?= samr21-xpro
# Select the boards with riotboot feature
FEATURES_REQUIRED += riotboot
# Provide a define to detect if building the bootloader
CFLAGS += -DRIOTBOOT
# Disable unused modules
CFLAGS += -DNDEBUG -DLOG_LEVEL=LOG_NONE
DISABLE_MODULE += auto_init

View File

@ -60,6 +60,12 @@ A board capable to use riotboot must meet the following requirements:
The above requirements are usually met if the board succeeds to execute
the riotboot test in tests/.
When building the bootloader, the global define `RIOTBOOT` is available. You
can use this define to skip certain parts in `board_init()` (or `cpu_init()`)
that should not be executed during boot. Note that this define is different
from `MODULE_RIOTBOOT`, which is also defined when building an application that
utilizes riotboot.
# Single Slot
Just compile your application with `FEATURES_REQUIRED += riotboot`. The header
is generated automatically according to your `APP_VER`, which can be optionally