Skip to content

boards/dfu-util: use FLASHFILE for boards using dfu-util#11709

Merged
MrKevinWeiss merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/dfu/flashfile
Jun 24, 2019
Merged

boards/dfu-util: use FLASHFILE for boards using dfu-util#11709
MrKevinWeiss merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/dfu/flashfile

Conversation

@cladmi
Copy link
Contributor

@cladmi cladmi commented Jun 17, 2019

Contribution description

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

Testing procedure

Flash on a board using dfu-util

DFU_BOARDS=$(git grep -l -e tools/dfu.inc.mk -e dfu-util -e common/stm32f103c8 'boards/*' ':!boards/common'  | cut -f 2 -d/ | sort -u)
echo ${DFU_BOARDS}
blackpill bluepill nz32-sc151 pyboard spark-core

Testing without a board

The output of the FFLAGS has the same file as in master.
It is a bit different as I removed the " around the file name as we do not do it for any other boards.

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

for board in ${DFU_BOARDS}; do echo ${board}; PROGRAMMER=dfu-util BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done
blackpill
true -d 1eaf:0003 -a 2 -D /home/harter/work/git/RIOT/examples/hello-world/bin/blackpill/hello-world.bin
bluepill
true -d 1eaf:0003 -a 2 -D /home/harter/work/git/RIOT/examples/hello-world/bin/bluepill/hello-world.bin
nz32-sc151
true -d 0483:df11 -a 0 -s 0x08000000:leave -D /home/harter/work/git/RIOT/examples/hello-world/bin/nz32-sc151/hello-world.bin
pyboard
true -D /home/harter/work/git/RIOT/examples/hello-world/bin/pyboard/hello-world.bin --reset --alt 0 -s 0x8000000
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

Only diff is the " that were removed

wdiff  output_master output_pr 
blackpill
true -d 1eaf:0003 -a 2 -D [-"/home/harter/work/git/RIOT/examples/hello-world/bin/blackpill/hello-world.bin"-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/blackpill/hello-world.bin+}
bluepill
true -d 1eaf:0003 -a 2 -D [-"/home/harter/work/git/RIOT/examples/hello-world/bin/bluepill/hello-world.bin"-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/bluepill/hello-world.bin+}
nz32-sc151
true -d 0483:df11 -a 0 -s 0x08000000:leave -D [-"/home/harter/work/git/RIOT/examples/hello-world/bin/nz32-sc151/hello-world.bin"-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/nz32-sc151/hello-world.bin+}
pyboard
true -D /home/harter/work/git/RIOT/examples/hello-world/bin/pyboard/hello-world.bin --reset --alt 0 -s 0x8000000
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"-] {+/home/harter/work/git/RIOT/examples/hello-world/bin/spark-core/hello-world.bin+}

The value can be changed from environment variable:

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

for board in ${DFU_BOARDS}; do echo ${board}; PROGRAMMER=dfu-util FLASHFILE=beer BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done
blackpill
true -d 1eaf:0003 -a 2 -D beer
bluepill
true -d 1eaf:0003 -a 2 -D beer
nz32-sc151
true -d 0483:df11 -a 0 -s 0x08000000:leave -D beer
pyboard
true -D beer --reset --alt 0 -s 0x8000000
spark-core
true -d 1d50:607f -a 0 -s 0x08005000:leave -D beer

Issues/PRs references

Part of #8838

cladmi added 2 commits June 17, 2019 18:09
Update to use FLASHFILE as file to be flashed on the board.
Update to use FLASHFILE as file to be flashed on the board.
@cladmi cladmi added Area: build system Area: Build system Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Area: tools Area: Supplementary tools labels Jun 17, 2019
@cladmi cladmi added this to the Release 2019.07 milestone Jun 17, 2019
@cladmi cladmi requested a review from MrKevinWeiss June 17, 2019 16:20
@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 Jun 17, 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.

ACK. Tested only on the bluepill with dfu utils. I was able to flash tests/shell with
BOARD=bluepill FLASHFILE=/home/kevinweiss/WorkingDirectory/RIOT/tests/shell/bin/bluepill/tests_shell.bin PROGRAMMER=dfu-util make -C tests/leds/ flash-only

@MrKevinWeiss MrKevinWeiss merged commit b076d85 into RIOT-OS:master Jun 24, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Jun 25, 2019

Thank you for the review and doing actual board testing :)

@cladmi cladmi deleted the pr/dfu/flashfile branch June 25, 2019 10:40
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