Skip to content

makefiles/openocd.inc.mk: use FLASHFILE#11254

Merged
cladmi merged 3 commits intoRIOT-OS:masterfrom
cladmi:pr/make/openocd/flashfile
Mar 28, 2019
Merged

makefiles/openocd.inc.mk: use FLASHFILE#11254
cladmi merged 3 commits intoRIOT-OS:masterfrom
cladmi:pr/make/openocd/flashfile

Conversation

@cladmi
Copy link
Copy Markdown
Contributor

@cladmi cladmi commented Mar 24, 2019

Contribution description

Update to use FLASHFILE as file to be flashed on the board.

This also now removes the compatibility hack in riotboot.

Testing procedure

We need to test that boards using openocd still work with this.

Boards using openocd:

OPENOCD_BOARDS=$(git grep -l -e 'tools/openocd.inc.mk' -e 'boards/sam0.inc.mk' -e common/frdm/Makefile.include -e common/iotlab/Makefile.include -e common/nrf51/Makefile.include -e common/nrf52/Makefile.include -e common/nucleo/Makefile.include  -e common/saml1x/Makefile.include -e common/stm32f103c8/Makefile.include  ':!boards/common' ':!makefiles/boards' | cut -f 2 -d/)
echo ${OPENOCD_BOARDS}
acd52832 airfy-beacon arduino-zero b-l072z-lrwan1 b-l475e-iot01a blackpill bluepill calliope-mini ek-lm4f120xl fox frdm-k22f frdm-k64f frdm-kw41z hifive1 iotlab-a8-m3 iotlab-m3 limifrog-v1 maple-mini microbit msbiot mulle nrf51dk nrf51dongle nrf52832-mdk nrf52840-mdk nrf6310 pba-d-01-kw2x phynode-kw41z reel samd21-xpro saml10-xpro saml11-xpro saml21-xpro samr21-xpro samr30-xpro seeeduino_arch-pro spark-core stm32f0discovery stm32f3discovery stm32f429i-disc1 stm32f4discovery stm32f769i-disco stm32l476g-disco thingy52 ublox-c030-u201 usb-kw41z yunjia-nrf51822

Test flashing normal examples with the board

Test without board

I get the same output for the FFLAGS for all these boards with both this PR and master

for board in ${OPENOCD_BOARDS}; do echo ${board}; BOARD=${board} PROGRAMMER=openocd make -C examples/hello-world/ --no-print-directory FLASHER=true flash-only; done

FFLAGS output for all boards...

acd52832
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/acd52832/hello-world.elf
airfy-beacon
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/airfy-beacon/hello-world.elf
arduino-zero
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-zero/hello-world.elf
b-l072z-lrwan1
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/b-l072z-lrwan1/hello-world.elf
b-l475e-iot01a
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/b-l475e-iot01a/hello-world.elf
blackpill
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/blackpill/hello-world.elf
bluepill
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/bluepill/hello-world.elf
calliope-mini
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.elf
ek-lm4f120xl
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/ek-lm4f120xl/hello-world.elf
fox
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/fox/hello-world.elf
frdm-k22f
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/frdm-k22f/hello-world.elf
frdm-k64f
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/frdm-k64f/hello-world.elf
frdm-kw41z
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/frdm-kw41z/hello-world.elf
hifive1
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/hifive1/hello-world.elf
iotlab-a8-m3
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/iotlab-a8-m3/hello-world.elf
iotlab-m3
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/iotlab-m3/hello-world.elf
limifrog-v1
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/limifrog-v1/hello-world.elf
maple-mini
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/maple-mini/hello-world.elf
microbit
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.elf
msbiot
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/msbiot/hello-world.elf
mulle
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/mulle/hello-world.elf
nrf51dk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dk/hello-world.elf
nrf51dongle
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dongle/hello-world.elf
nrf52832-mdk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52832-mdk/hello-world.elf
nrf52840-mdk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.elf
nrf6310
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf6310/hello-world.elf
pba-d-01-kw2x
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/pba-d-01-kw2x/hello-world.elf
phynode-kw41z
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/phynode-kw41z/hello-world.elf
reel
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/reel/hello-world.elf
samd21-xpro
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/samd21-xpro/hello-world.elf
saml10-xpro
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/saml10-xpro/hello-world.elf
saml11-xpro
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/saml11-xpro/hello-world.elf
saml21-xpro
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/saml21-xpro/hello-world.elf
samr21-xpro
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/samr21-xpro/hello-world.elf
samr30-xpro
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/samr30-xpro/hello-world.elf
seeeduino_arch-pro
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/seeeduino_arch-pro/hello-world.hex
spark-core
true -d 1d50:607f -a 0 -s 0x08005000:leave -D "/home/harter/work/git/RIOT/examples/hello-world/bin/spark-core/hello-world.bin"
stm32f0discovery
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stm32f0discovery/hello-world.elf
stm32f3discovery
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stm32f3discovery/hello-world.elf
stm32f429i-disc1
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stm32f429i-disc1/hello-world.elf
stm32f4discovery
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stm32f4discovery/hello-world.elf
stm32f769i-disco
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stm32f769i-disco/hello-world.elf
stm32l476g-disco
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stm32l476g-disco/hello-world.elf
thingy52
/home/harter/work/git/RIOT/boards/common/nrf52/Makefile.include:32: *** Cannot use OpenOCD with thingy52 board.  Stop.
ublox-c030-u201
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/ublox-c030-u201/hello-world.elf
usb-kw41z
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/usb-kw41z/hello-world.elf
yunjia-nrf51822
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/yunjia-nrf51822/hello-world.elf

The output for spark-core shows it is not using openocd for flashing but was the same in master.

riotboot test

Test running tests/riotboot for boards supporting it.
I tested samr21-xpro with PROGRAMMER=openocd and the iotlab-m3.
I also tested some of the other commands riotboot/flash-slot1 riotboot/flash-extended-slot0.

PROGRAMMER=openocd BOARD=samr21-xpro make -C tests/riotboot flash test
2019-03-24 10:46:04,942 - INFO # main(): This is RIOT! (Version: 2019.04-devel-608-g411b1f-pr/make/openocd/flashfile)
2019-03-24 10:46:04,943 - INFO # Hello riotboot!
2019-03-24 10:46:04,947 - INFO # You are running RIOT on a(n) samr21-xpro board.
2019-03-24 10:46:04,951 - INFO # This board features a(n) samd21 MCU.
2019-03-24 10:46:04,954 - INFO # riotboot_test: running from slot 0
2019-03-24 10:46:04,957 - INFO # Image magic_number: 0x544f4952
2019-03-24 10:46:04,959 - INFO # Image Version: 0x00000001
2019-03-24 10:46:04,962 - INFO # Image start address: 0x00001100
2019-03-24 10:46:04,964 - INFO # Header chksum: 0x7f7eaea2
2019-03-24 10:46:04,964 - INFO #
> 2019-03-24 10:46:05,077 - INFO #  curslotnr
2019-03-24 10:46:05,078 - INFO # Current slot=0
> curslothdr
2019-03-24 10:46:05,132 - INFO #  curslothdr
2019-03-24 10:46:05,134 - INFO # Image magic_number: 0x544f4952
2019-03-24 10:46:05,137 - INFO # Image Version: 0x00000001
2019-03-24 10:46:05,140 - INFO # Image start address: 0x00001100
2019-03-24 10:46:05,142 - INFO # Header chksum: 0x7f7eaea2
2019-03-24 10:46:05,142 - INFO #
> getslotaddr 0
2019-03-24 10:46:05,195 - INFO #  getslotaddr 0
2019-03-24 10:46:05,198 - INFO # Slot 0 address=0x00001100
> dumpaddrs
2019-03-24 10:46:05,251 - INFO #  dumpaddrs
2019-03-24 10:46:05,255 - INFO # slot 0: metadata: 0x1000 image: 0x00001100
2019-03-24 10:46:05,259 - INFO # slot 1: metadata: 0x20800 image: 0xffffffff
>

Issues/PRs references

Part of #8838

@cladmi cladmi added Area: build system Area: Build system Area: tools Area: Supplementary tools Area: boards Area: Board ports labels Mar 24, 2019
@cladmi cladmi added this to the Release 2019.04 milestone Mar 24, 2019
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 25, 2019

I just noticed that I did not give any procedure to test that "FLASHFILE" can be changed. I will give a way to show this.

@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 25, 2019

When setting FLASHFILE to another value from environment, like $(BINFILE) it is correctly taken into account. Except with the 'spark-core' and 'thingy52' but they do not flash with openocd.

for board in ${OPENOCD_BOARDS}; do echo ${board}; FLASHFILE='$(BINFILE)' BOARD=${board} PROGRAMMER=openocd make -C examples/hello-world/ --no-print-directory FLASHER=true flash-only; done
wdiff output_master output_pr

acd52832
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/acd52832/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/acd52832/hello-world.bin+}
airfy-beacon
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/airfy-beacon/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/airfy-beacon/hello-world.bin+}
arduino-zero
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/arduino-zero/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/arduino-zero/hello-world.bin+}
b-l072z-lrwan1
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/b-l072z-lrwan1/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/b-l072z-lrwan1/hello-world.bin+}
b-l475e-iot01a
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/b-l475e-iot01a/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/b-l475e-iot01a/hello-world.bin+}
blackpill
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/blackpill/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/blackpill/hello-world.bin+}
bluepill
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/bluepill/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/bluepill/hello-world.bin+}
calliope-mini
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.bin+}
ek-lm4f120xl
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/ek-lm4f120xl/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/ek-lm4f120xl/hello-world.bin+}
fox
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/fox/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/fox/hello-world.bin+}
frdm-k22f
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/frdm-k22f/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/frdm-k22f/hello-world.bin+}
frdm-k64f
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/frdm-k64f/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/frdm-k64f/hello-world.bin+}
frdm-kw41z
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/frdm-kw41z/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/frdm-kw41z/hello-world.bin+}
hifive1
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/hifive1/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/hifive1/hello-world.bin+}
iotlab-a8-m3
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/iotlab-a8-m3/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/iotlab-a8-m3/hello-world.bin+}
iotlab-m3
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/iotlab-m3/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/iotlab-m3/hello-world.bin+}
limifrog-v1
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/limifrog-v1/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/limifrog-v1/hello-world.bin+}
maple-mini
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/maple-mini/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/maple-mini/hello-world.bin+}
microbit
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.bin+}
msbiot
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/msbiot/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/msbiot/hello-world.bin+}
mulle
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/mulle/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/mulle/hello-world.bin+}
nrf51dk
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dk/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dk/hello-world.bin+}
nrf51dongle
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dongle/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dongle/hello-world.bin+}
nrf52832-mdk
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/nrf52832-mdk/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/nrf52832-mdk/hello-world.bin+}
nrf52840-mdk
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.bin+}
nrf6310
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/nrf6310/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/nrf6310/hello-world.bin+}
pba-d-01-kw2x
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/pba-d-01-kw2x/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/pba-d-01-kw2x/hello-world.bin+}
phynode-kw41z
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/phynode-kw41z/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/phynode-kw41z/hello-world.bin+}
reel
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/reel/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/reel/hello-world.bin+}
samd21-xpro
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/samd21-xpro/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/samd21-xpro/hello-world.bin+}
saml10-xpro
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/saml10-xpro/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/saml10-xpro/hello-world.bin+}
saml11-xpro
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/saml11-xpro/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/saml11-xpro/hello-world.bin+}
saml21-xpro
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/saml21-xpro/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/saml21-xpro/hello-world.bin+}
samr21-xpro
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/samr21-xpro/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/samr21-xpro/hello-world.bin+}
samr30-xpro
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/samr30-xpro/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/samr30-xpro/hello-world.bin+}
seeeduino_arch-pro
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/seeeduino_arch-pro/hello-world.hex-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/seeeduino_arch-pro/hello-world.bin+}
spark-core
true -d 1d50:607f -a 0 -s 0x08005000:leave -D "/home/harter/work/git/RIOT/examples/hello-world/bin/spark-core/hello-world.bin"
stm32f0discovery
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f0discovery/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f0discovery/hello-world.bin+}
stm32f3discovery
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f3discovery/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f3discovery/hello-world.bin+}
stm32f429i-disc1
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f429i-disc1/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f429i-disc1/hello-world.bin+}
stm32f4discovery
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f4discovery/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f4discovery/hello-world.bin+}
stm32f769i-disco
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f769i-disco/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/stm32f769i-disco/hello-world.bin+}
stm32l476g-disco
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/stm32l476g-disco/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/stm32l476g-disco/hello-world.bin+}
thingy52
/home/harter/work/git/RIOT/boards/common/nrf52/Makefile.include:32: *** Cannot use OpenOCD with thingy52 board.  Stop.
ublox-c030-u201
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/ublox-c030-u201/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/ublox-c030-u201/hello-world.bin+}
usb-kw41z
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/usb-kw41z/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/usb-kw41z/hello-world.bin+}
yunjia-nrf51822
true flash [-/home/harter/work/git/RIOT/examples/hello-world/bin/yunjia-nrf51822/hello-world.elf-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/yunjia-nrf51822/hello-world.bin+}

Copy link
Copy Markdown
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested flashing on different boards with PROGRAMMER=openocd make flash term -C tests/shell/
samr21-xpro, nucleo-l073rz, nucleo-f411re, remote-revb, nucleo-f103rb, frdm-k22f and updated the tracking list.

I am not an mcu_boot guy so I cannot comment but all other makefile changes seem to make sense.

@cladmi cladmi force-pushed the pr/make/openocd/flashfile branch from 411b1fe to fc2897d Compare March 25, 2019 10:29
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 25, 2019

@MrKevinWeiss Thank you for the review.
A simple test you can run for riotboot is to run the main riotboot command with your samr21-xpro and nucleo-l073rz (I needed to rebase on master to have this last one)

Maybe some of the maintainer working on riotboot could test this part with the other commands?

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

Tested with BOARD=samr21-xpro PROGRAMMER=openocd make -C tests/riotboot flash test and got the following.

samr21-xpro test results

2019-03-25 13:03:38,201 - INFO # main(): This is RIOT! (Version: 2019.04-devel-608-g411b1f-test/11254)
2019-03-25 13:03:38,205 - INFO # Hello riotboot!
2019-03-25 13:03:38,215 - INFO # You are running RIOT on a(n) samr21-xpro board.
2019-03-25 13:03:38,223 - INFO # This board features a(n) samd21 MCU.
2019-03-25 13:03:38,230 - INFO # riotboot_test: running from slot 0
2019-03-25 13:03:38,237 - INFO # Image magic_number: 0x544f4952
2019-03-25 13:03:38,242 - INFO # Image Version: 0x5c98c38f
2019-03-25 13:03:38,249 - INFO # Image start address: 0x00001100
2019-03-25 13:03:38,255 - INFO # Header chksum: 0xa382cec9
2019-03-25 13:03:38,256 - INFO # 
> 2019-03-25 13:03:38,339 - INFO #  curslotnr
2019-03-25 13:03:38,343 - INFO # Current slot=0
> curslothdr
2019-03-25 13:03:38,400 - INFO #  curslothdr
2019-03-25 13:03:38,407 - INFO # Image magic_number: 0x544f4952
2019-03-25 13:03:38,413 - INFO # Image Version: 0x5c98c38f
2019-03-25 13:03:38,421 - INFO # Image start address: 0x00001100
2019-03-25 13:03:38,427 - INFO # Header chksum: 0xa382cec9
2019-03-25 13:03:38,428 - INFO # 
> getslotaddr 0
2019-03-25 13:03:38,486 - INFO #  getslotaddr 0
2019-03-25 13:03:38,492 - INFO # Slot 0 address=0x00001100
> dumpaddrs
2019-03-25 13:03:38,549 - INFO #  dumpaddrs
2019-03-25 13:03:38,559 - INFO # slot 0: metadata: 0x1000 image: 0x00001100
2019-03-25 13:03:38,568 - INFO # slot 1: metadata: 0x20800 image: 0xffffffff

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

Tested with BOARD=nucleo-l073rz PROGRAMMER=openocd make -C tests/riotboot flash test and got the following.

nucleo-l073rz test results

2019-03-25 13:44:28,600 - INFO # main(): This is 
2019-03-25 13:44:30,052 - INFO # main(): This is RIOT! (Version: 2019.04-devel-627-gfc289-gmannnnn)
2019-03-25 13:44:30,057 - INFO # Hello riotboot!
2019-03-25 13:44:30,069 - INFO # You are running RIOT on a(n) nucleo-l073rz board.
2019-03-25 13:44:30,077 - INFO # This board features a(n) stm32l0 MCU.
2019-03-25 13:44:30,085 - INFO # riotboot_test: running from slot 0
2019-03-25 13:44:30,093 - INFO # Image magic_number: 0x544f4952
2019-03-25 13:44:30,099 - INFO # Image Version: 0x5c98cd21
2019-03-25 13:44:30,108 - INFO # Image start address: 0x08001100
2019-03-25 13:44:30,115 - INFO # Header chksum: 0xd1cae05b
2019-03-25 13:44:30,117 - INFO # 
> 2019-03-25 13:44:30,122 - INFO #  curslotnr
2019-03-25 13:44:30,126 - INFO # Current slot=0
> curslothdr
2019-03-25 13:44:30,185 - INFO #  curslothdr
2019-03-25 13:44:30,193 - INFO # Image magic_number: 0x544f4952
2019-03-25 13:44:30,200 - INFO # Image Version: 0x5c98cd21
2019-03-25 13:44:30,208 - INFO # Image start address: 0x08001100
2019-03-25 13:44:30,215 - INFO # Header chksum: 0xd1cae05b
2019-03-25 13:44:30,216 - INFO # 
> getslotaddr 0
2019-03-25 13:44:30,276 - INFO #  getslotaddr 0
2019-03-25 13:44:30,283 - INFO # Slot 0 address=0x08001100
> dumpaddrs
2019-03-25 13:44:30,342 - INFO #  dumpaddrs
2019-03-25 13:44:30,353 - INFO # slot 0: metadata: 0x8001000 image: 0x08001100
2019-03-25 13:44:30,364 - INFO # slot 1: metadata: 0x8018800 image: 0x1e59d006

@cladmi cladmi force-pushed the pr/make/openocd/flashfile branch from fc2897d to 3e7e23e Compare March 26, 2019 15:20
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 26, 2019

This currently also solves a regression I introduced in #11172 by modifying the openocd rule by mistake. solved in #11284 alone

cladmi added 3 commits March 26, 2019 19:26
Update to use FLASHFILE as file to be flashed on the board.
Update to use FLASHFILE as file to be flashed on the board.

openocd.inc.mk now uses FLASHFILE variable so does not need to overwrite
FFLAGS anymore.
@cladmi cladmi force-pushed the pr/make/openocd/flashfile branch from fc752ab to ff13208 Compare March 26, 2019 18:28
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 26, 2019

Rebased now that #11284 is merged so it is back to the original changes.

@emmanuelsearch
Copy link
Copy Markdown
Member

tested riotboot (bootloader, slot0, slot1) on iotlab-m3. Works fine!

@MrKevinWeiss MrKevinWeiss added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 26, 2019
Copy link
Copy Markdown
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things look OK to me. It seems tested by two people and I trust @cladmi.

ACK!

@cladmi cladmi merged commit 29ada72 into RIOT-OS:master Mar 28, 2019
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented Mar 28, 2019

Thank you for the review.

@danpetry there should not be any issue with this one and if there was, any fix would just be setting a variable in one board makefile. So we went for it in the soft featurefreeze.

@cladmi cladmi deleted the pr/make/openocd/flashfile branch March 28, 2019 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports Area: build system Area: Build system Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants