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

Merge pull request #16260 from dylad/pr/riotboot_dfu/auto_dfu_alt

riotboot_dfu: select DFU_ALT automatically when invoking make flash-slotX
This commit is contained in:
Dylan Laduranty 2021-04-06 20:27:18 +02:00 committed by GitHub
commit db7d0777b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -55,9 +55,8 @@ $ FEATURES_REQUIRED+=riotboot USEMODULE+=usbus_dfu make -C examples/saul BOARD=p
```
Note that when building and flashing a different slot (eg. `flash-slot1`),
the DFU utility has to be explicitly prompted to upload it the other slot
by adding a `DFU_ALT=1` argument.
not only is the image built for that slot, but also dfu-util gets passed
`--alt 1` (via the `DFU_ALT` build variable) to store it in the right place.
# Entering DFU mode
When RIOT applications are built with `USEMODULE+=usbus_dfu`,

View File

@ -124,12 +124,14 @@ riotboot/flash-extended-slot0: $(RIOTBOOT_EXTENDED_BIN) $(FLASHDEPS)
$(flash-recipe)
# Flashing rule for slot 0
riotboot/flash-slot0: DFU_ALT=0
riotboot/flash-slot0: export IMAGE_OFFSET=$(SLOT0_OFFSET)
riotboot/flash-slot0: FLASHFILE=$(SLOT0_RIOT_BIN)
riotboot/flash-slot0: $(SLOT0_RIOT_BIN) $(FLASHDEPS)
$(flash-recipe)
# Flashing rule for slot 1
riotboot/flash-slot1: DFU_ALT=1
riotboot/flash-slot1: export IMAGE_OFFSET=$(SLOT1_OFFSET)
riotboot/flash-slot1: FLASHFILE=$(SLOT1_RIOT_BIN)
riotboot/flash-slot1: $(SLOT1_RIOT_BIN) $(FLASHDEPS)