[riot-notifications] [RIOT-OS/RIOT] nrf52: Add riotboot support (#11126)

Gaƫtan Harter notifications at github.com
Thu Mar 14 13:48:52 CET 2019


With this patch, jlink.sh correctly gets the address for the `riotboot/flash-slot-*` but it looks like it is not being flashed...

```
diff --git a/makefiles/boot/riotboot.mk b/makefiles/boot/riotboot.mk
index 0abe2c1d7..2f7c7e1fc 100644
--- a/makefiles/boot/riotboot.mk
+++ b/makefiles/boot/riotboot.mk
@@ -128,6 +128,7 @@ riotboot/flash-extended-slot0: $(RIOTBOOT_EXTENDED_BIN) $(FLASHDEPS)

 # Flashing rule for slot 0
 riotboot/flash-slot0: export IMAGE_OFFSET=$(SLOT0_OFFSET)
+riotboot/flash-slot0: export FLASH_ADDR:=$(shell echo $$(($${FLASH_ADDR:-0}+$(SLOT0_OFFSET))))
 # Flashing rule for edbg to flash only slot 0
 riotboot/flash-slot0: HEXFILE=$(SLOT0_RIOT_BIN)
 # openocd
@@ -138,6 +139,7 @@ riotboot/flash-slot0: $(SLOT0_RIOT_BIN) $(FLASHDEPS)

 # Flashing rule for slot 1
 riotboot/flash-slot1: export IMAGE_OFFSET=$(SLOT1_OFFSET)
+riotboot/flash-slot1: export FLASH_ADDR:=$(shell echo $$(($${FLASH_ADDR:-0}+$(SLOT1_OFFSET))))
 # Flashing rule for edbg to flash only slot 1
 riotboot/flash-slot1: HEXFILE=$(SLOT1_RIOT_BIN)
 # openocd
```

The commands I ran:

```
# Flash using `flash` target
git clean -xdf tests/riotboot ; RIOT_CI_BUILD=1 BOARD=nrf52dk make -C tests/riotboot flash test 
# Correctly tests and uses slot0 with "version == 0"

# flash using `flash-slot0` target and a bigger image version
git clean -xdf tests/riotboot ; APP_VER=1 RIOT_CI_BUILD=1 BOARD=nrf52dk make -C tests/riotboot riotboot/flash-slot0 test
# ERROR still running slot0 version 0

# flash using `flash-slot1` target and an even bigger image version
git clean -xdf tests/riotboot; APP_VER=3 BOARD=nrf52dk make -C tests/riotboot clean riotboot/flash-slot1 test
# ERROR still running slot0 version 0
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11126#issuecomment-472838371
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190314/53ace68a/attachment-0001.html>


More information about the notifications mailing list