From 8624d3dac4908427c2186c157c11df760b3a9469 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 13 Jun 2019 13:46:00 +0200 Subject: [PATCH] riotboot: update documentation to match automatic use FLASHFILE is now set to RIOTBOOT_EXTENDED_BIN, changing the meaning of make all`, `flash`, `flash-only`. This commits updates the documentation accordingly. --- bootloaders/riotboot/README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bootloaders/riotboot/README.md b/bootloaders/riotboot/README.md index 2342b219a2..7f4112516e 100644 --- a/bootloaders/riotboot/README.md +++ b/bootloaders/riotboot/README.md @@ -61,13 +61,18 @@ The above requirements are usually met if the board succeeds to execute the riotboot test in tests/. # Single Slot -Just compile your application using the target `riotboot`. The header -is generated automatically according to your `APP_VER`, which can be -optionally set (0 by default) in your makefile. +Just compile your application with `FEATURES_REQUIRED += riotboot`. The header +is generated automatically according to your `APP_VER`, which can be optionally +set (0 by default) in your makefile. ## Flashing example -The image can be flashed using `riotboot/flash` which also flashes +If your application is using the riotboot feature, the usual targets (`all`, +`flash`, `flash-only`) will automatically compile and/or flash both the +bootloader and slot0, while ensuring that slot 1 is invalidated so slot 0 will +be booted. + +The image can also be flashed using `riotboot/flash` which also flashes the bootloader. Below a concrete example: `BOARD=samr21-xpro FEATURES_REQUIRED+=riotboot APP_VER=$(date +%s) make -C examples/hello-world riotboot/flash-combined-slot0` @@ -94,7 +99,8 @@ Dedicated make targets are available to build and flash several slots: In particular, if one wants to be sure to boot a particular image, using the target `riotboot/flash-extended-slot0` is the way to go (resulting in only -slot 0 being valid, thus being booted). +slot 0 being valid, thus being booted). This is done automatically by `make +flash` if the `riotboot` feature is used. ## Flashing examples