Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefiles/tools/jlink.inc.mk: use FLASHFILE #11130

Merged
merged 2 commits into from
Mar 14, 2019

Conversation

cladmi
Copy link
Contributor

@cladmi cladmi commented Mar 7, 2019

Contribution description

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

Testing procedure

We need to test that boards using Jlink would still work with this.
I will come up with a testing procedure without board.

Boards using JLink:

I listed all the boards using Jlink by using git grep jlink.inc.mk and checking also the boards using common.

echo ${JLINK_BOARDS}
arduino-mkr1000 arduino-mkrfox1200 arduino-mkrzero airfy-beacon calliope-mini microbit nrf51dk nrf51dongle nrf6310 yunjia-nrf51822 acd52832 nrf52840-mdk thingy52 nrf52840dk nrf52dk ruuvitag feather-m0 ikea-tradfri openmote-cc2538 sensebox_samd21 slstk3401a slstk3402a sltb001a slwstk6000b slwstk6220a stk3600 stk3700

Test flashing normal examples with the board:

Test without board

I replaced FLASHER by 'true' to only show the FFLAGS and get the same output with master and this pull request:

for board in ${JLINK_BOARDS}; do echo ${board}; PROGRAMMER=jlink BOARD=${board} make --no-print-directory -C examples/hello-world/ flash-only FLASHER='true'; done
arduino-mkr1000
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-mkr1000/hello-world.bin
arduino-mkrfox1200
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-mkrfox1200/hello-world.bin
arduino-mkrzero
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-mkrzero/hello-world.bin
airfy-beacon
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/airfy-beacon/hello-world.elf
calliope-mini
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.bin
microbit
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.bin
nrf51dk
true flash /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.bin
nrf6310
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf6310/hello-world.bin
yunjia-nrf51822
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/yunjia-nrf51822/hello-world.elf
acd52832
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/acd52832/hello-world.bin
nrf52840-mdk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.bin
thingy52
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/thingy52/hello-world.bin
nrf52840dk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840dk/hello-world.bin
nrf52dk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52dk/hello-world.bin
ruuvitag
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/ruuvitag/hello-world.bin
feather-m0
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/feather-m0/hello-world.bin
ikea-tradfri
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/ikea-tradfri/hello-world.bin
openmote-cc2538
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/openmote-cc2538/hello-world.bin
sensebox_samd21
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/sensebox_samd21/hello-world.bin
slstk3401a
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/slstk3401a/hello-world.bin
slstk3402a
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/slstk3402a/hello-world.bin
sltb001a
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/sltb001a/hello-world.bin
slwstk6000b
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/slwstk6000b/hello-world.bin
slwstk6220a
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/slwstk6220a/hello-world.bin
stk3600
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stk3600/hello-world.bin
stk3700
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/stk3700/hello-world.bin

mcuboot test

Test flashing tests/mcuboot for nrf52dk (only one supported):

One make term and run make -C tests/mcuboot/ clean mcuboot-flash.
You should get:

2019-03-07 16:16:45,953 - INFO # You are running RIOT on a(n) nrf52dk board.
2019-03-07 16:16:45,957 - INFO # This board features a(n) nrf52 MCU.
2019-03-07 16:16:45,959 - INFO # The startup address is: 0x8200

Issues/PRs references

Split out of #8838
Depends on #11112
It would be useful to prevent extend the hack to Jlink for #11126

@cladmi cladmi added Area: build system Area: Build system State: waiting for other PR State: The PR requires another PR to be merged first Area: tools Area: Supplementary tools Area: boards Area: Board ports and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Mar 7, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Mar 7, 2019

Updated the testing procedure, with and without board.

cladmi added 2 commits March 7, 2019 16:18
Update to use FLASHFILE as file to be flashed on the board.
JLink flasher used by the only supported board `nrf52dk` has been updated.

FLASHFILE must now be defined by the board to use this in case a new one
wants to be supported.
@cladmi cladmi force-pushed the pr/make/flashfile/jlink branch from 55b4c31 to 4c860f3 Compare March 7, 2019 15:18
@cladmi
Copy link
Contributor Author

cladmi commented Mar 7, 2019

Rebased now that #11112 was merged

@cladmi cladmi added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 7, 2019
Copy link
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

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

looks straight forward to me,

@cladmi
Copy link
Contributor Author

cladmi commented Mar 11, 2019

@smlng Do you want any other boards tested before merging this ?

@bergzand bergzand mentioned this pull request Mar 11, 2019
4 tasks
@cladmi cladmi requested review from aabadie and basilfx March 11, 2019 17:25
@cladmi cladmi added this to the Release 2019.04 milestone Mar 11, 2019
@aabadie
Copy link
Contributor

aabadie commented Mar 11, 2019

I see no issue with this PR. The boards I have are already tested so I can't do more testing.

@kYc0o
Copy link
Contributor

kYc0o commented Mar 12, 2019

@cladmi can you test in a remote?

@cladmi
Copy link
Contributor Author

cladmi commented Mar 12, 2019

@kYc0o I just checked and the remote boards are using a different JLink script

export FLASHER = $(RIOTBOARD)/common/remote/dist/flash.sh
for the moment. I can add to the FLASHFILE todolist to migrate them to the common Jlink file.

EDIT: and it is the same for cc2538dk

@kYc0o
Copy link
Contributor

kYc0o commented Mar 12, 2019

@cladmi true, I was thinking about #9851 but it's not merged yet.

I'll check lastly with a STK3700 and then I think we can merge.

@cladmi cladmi added CI: run tests If set, CI server will run tests on hardware for the labeled PR CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 13, 2019
@kYc0o
Copy link
Contributor

kYc0o commented Mar 13, 2019

Works on STK3700, I'd say everything is fine. Merge when Murdock succeeds.

@bergzand bergzand added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Mar 13, 2019
@kYc0o kYc0o merged commit 0f4e51d into RIOT-OS:master Mar 14, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Mar 14, 2019

Thank you for the review.

@cladmi cladmi deleted the pr/make/flashfile/jlink branch March 14, 2019 11:34
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 CI: run tests If set, CI server will run tests on hardware for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants