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:
commit
db7d0777b8
@ -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`,
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user