Skip to content

makefiles/bossa.inc.mk: use FLASHFILE#11700

Merged
leandrolanzieri merged 1 commit intoRIOT-OS:masterfrom
cladmi:pr/bossa/use_flashfile
Jun 17, 2019
Merged

makefiles/bossa.inc.mk: use FLASHFILE#11700
leandrolanzieri merged 1 commit intoRIOT-OS:masterfrom
cladmi:pr/bossa/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.

Testing procedure

You can flash on a board using bossa.

BOSSA_BOARDS=$(git grep -l -e tools/bossa.inc.mk -e common/arduino-due -e common/arduino-mkr '*' ':!boards/common'  | cut -f 2 -d/ | sort -u)
echo ${BOSSA_BOARDS} 
arduino-due arduino-mkr1000 arduino-mkrfox1200 arduino-mkrzero feather-m0 sensebox_samd21 sodaq-autonomo sodaq-explorer sodaq-one sodaq-sara-aff udoo

Testing without a board

The flash command is still the same with this PR and with master
Here PREFLASHER must be updated otherwise it tries to use a board that is not there.

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

for board in ${BOSSA_BOARDS}; do echo ${board}; PROGRAMMER=bossa FLASHFILE=lala BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true PREFLASHER=true flash-only; done
arduino-due
true -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-due/hello-world.bin
arduino-mkr1000
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-mkr1000/hello-world.bin
arduino-mkrfox1200
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-mkrfox1200/hello-world.bin
arduino-mkrzero
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/arduino-mkrzero/hello-world.bin
feather-m0
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/feather-m0/hello-world.bin
sensebox_samd21
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/sensebox_samd21/hello-world.bin
sodaq-autonomo
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/sodaq-autonomo/hello-world.bin
sodaq-explorer
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/sodaq-explorer/hello-world.bin
sodaq-one
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/sodaq-one/hello-world.bin
sodaq-sara-aff
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/sodaq-sara-aff/hello-world.bin
udoo
true -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
true -p /dev/ttyACM0 -e -i -w -v -b -R /home/harter/work/git/RIOT/examples/hello-world/bin/udoo/hello-world.bin

And the file to flash can be overwritten from environment

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

for board in ${BOSSA_BOARDS}; do echo ${board}; PROGRAMMER=bossa FLASHFILE=lala BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true PREFLASHER=true flash-only; done
arduino-due
true -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
arduino-mkr1000
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
arduino-mkrfox1200
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
arduino-mkrzero
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
feather-m0
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
sensebox_samd21
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
sodaq-autonomo
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
sodaq-explorer
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
sodaq-one
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
sodaq-sara-aff
true -p /dev/ttyACM0 -e -i -w -v -b -R lala
udoo
true -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
true -p /dev/ttyACM0 -e -i -w -v -b -R lala

Issues/PRs references

Part of #8838

Update to use FLASHFILE as file to be flashed on the board.
@cladmi cladmi added Area: build system Area: Build system Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: tools Area: Supplementary tools labels Jun 14, 2019
@cladmi cladmi added this to the Release 2019.07 milestone Jun 14, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Jun 14, 2019

I forgot to put PROGRAMMER=bossa in the environment for the commands but the output must be the same as it is the default. I will update the testing procedure.

@leandrolanzieri leandrolanzieri added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines labels Jun 17, 2019
Copy link
Contributor

@leandrolanzieri leandrolanzieri left a comment

Choose a reason for hiding this comment

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

Looks good. I also tested this with sensebox, soda-sara-aff and feather-m0, the flashfile is successfully overwritten from the environment. ACK.

@leandrolanzieri leandrolanzieri 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
@leandrolanzieri leandrolanzieri merged commit 9696dd6 into RIOT-OS:master Jun 17, 2019
@cladmi cladmi deleted the pr/bossa/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 Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants