Skip to content

makefiles/pyocd.inc.mk use FLASHFILE#11696

Merged
MrKevinWeiss merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/pyocd/use_flashfile
Jun 17, 2019
Merged

makefiles/pyocd.inc.mk use FLASHFILE#11696
MrKevinWeiss merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/pyocd/use_flashfile

Conversation

@cladmi
Copy link
Contributor

@cladmi cladmi commented Jun 14, 2019

Contribution description

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

This also removes OFLAGS that is set by Makefile.include in the .bin and .hex rules.

Testing procedure

You can flash on a board using pyocd

PYOCD_BOARDS=$(git grep -l -e pyocd.inc.mk -e 'common/particle-mesh' '*' ':!boards/common' | cut -f 2 -d/ | sort -u)
echo ${PYOCD_BOARDS}
calliope-mini microbit nrf51dk nrf52832-mdk nrf52840-mdk particle-argon particle-boron particle-xenon

Testing without a board

The output of the FFLAGS is the same on master and this PR with the default and pyocd programmer.

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

for board in ${PYOCD_BOARDS}; do echo ${board}; BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; PROGRAMMER=pyocd BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done
calliope-mini
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.elf
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.hex
microbit
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.elf
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.hex
nrf51dk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dk/hello-world.elf
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dk/hello-world.hex
nrf52832-mdk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52832-mdk/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52832-mdk/hello-world.hex
nrf52840-mdk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.hex
particle-argon
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-argon/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-argon/hello-world.hex
particle-boron
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-boron/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-boron/hello-world.hex
particle-xenon
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-xenon/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-xenon/hello-world.hex

And the value can be changed from environment variable:

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

for board in ${PYOCD_BOARDS}; do echo ${board}; FLASHFILE=lala PROGRAMMER=pyocd BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done 
calliope-mini
true flash lala
microbit
true flash lala
nrf51dk
true flash lala
nrf52832-mdk
true flash lala
nrf52840-mdk
true flash lala
particle-argon
true flash lala
particle-boron
true flash lala
particle-xenon
true flash lala

Issues/PRs references

Part of #8838

cladmi added 2 commits June 14, 2019 12:12
OFLAGS is set by the `.bin` and `.hex` rules no need to define it anymore.
Update to use FLASHFILE as file to be flashed on the board.
@cladmi cladmi added Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: tools Area: Supplementary tools labels Jun 14, 2019
@cladmi cladmi added this to the Release 2019.07 milestone Jun 14, 2019
@cladmi cladmi requested review from MrKevinWeiss and aabadie June 14, 2019 10:37
@MrKevinWeiss MrKevinWeiss added the Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer label Jun 14, 2019
Copy link
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.

Seems simple, I tested with the nrf51dk and it seems to work. ACK.

@MrKevinWeiss
Copy link
Contributor

I will wait before merging in case @aabadie or someone with more boards would like to test but I am pretty confident in @cladmi

@MrKevinWeiss MrKevinWeiss merged commit 2c0b2f3 into RIOT-OS:master Jun 17, 2019
@cladmi cladmi deleted the pr/pyocd/use_flashfile branch June 17, 2019 10:13
@cladmi
Copy link
Contributor Author

cladmi commented Jun 17, 2019

Thank you for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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 Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants