Skip to content

boards/cc2538: use FLASHFILE for boards using cc2538-bsl.py#11569

Merged
MrKevinWeiss merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/make/cc2538/flashfile
May 23, 2019
Merged

boards/cc2538: use FLASHFILE for boards using cc2538-bsl.py#11569
MrKevinWeiss merged 2 commits intoRIOT-OS:masterfrom
cladmi:pr/make/cc2538/flashfile

Conversation

@cladmi
Copy link
Copy Markdown
Contributor

@cladmi cladmi commented May 23, 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

Flash on a board using the cc2538-bsl.py and also by connecting a jlink to flash it with PROGRAMMER=jlink.

(I do not have any at the moment)

Testing without a board

CC2538_BOARDS=$(git grep -e cc2538-bsl.py -e 'common/remote/Makefile.include' | grep -v 'boards/common' | cut -f 2 -d/)
echo ${CC2538_BOARDS} 
cc2538dk firefly openmote-b openmote-cc2538 remote-pa remote-reva remote-revb

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

cc2538

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

for board in ${CC2538_BOARDS}; do echo ${board}; BOARD=${board} make -C examples/hello-world --no-print-directory flash-only FLASHER=true PORT=none; done
cc2538dk
true -p "none" -e -w -v /home/harter/work/git/RIOT/examples/hello-world/bin/cc2538dk/hello-world.bin
firefly
true -p "/dev/ttyUSB0" -e -w -v -b 115200 /home/harter/work/git/RIOT/examples/hello-world/bin/firefly/hello-world.bin
openmote-b
true -p "/dev/ttyUSB1" --bootloader-invert-lines -e -w -v -b 460800 /home/harter/work/git/RIOT/examples/hello-world/bin/openmote-b/hello-world.bin
openmote-cc2538
true -p "none" -e -w -v -b 460800 /home/harter/work/git/RIOT/examples/hello-world/bin/openmote-cc2538/hello-world.bin
remote-pa
true -p "/dev/ttyUSB1" -e -w -v -b 115200 /home/harter/work/git/RIOT/examples/hello-world/bin/remote-pa/hello-world.bin
remote-reva
true -p "/dev/ttyUSB0" -e -w -v -b 115200 /home/harter/work/git/RIOT/examples/hello-world/bin/remote-reva/hello-world.bin
remote-revb
true -p "/dev/ttyUSB0" -e -w -v -b 115200 /home/harter/work/git/RIOT/examples/hello-world/bin/remote-revb/hello-world.bin

Jlink

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

for board in ${CC2538_BOARDS}; do echo ${board}; BOARD=${board} PROGRAMMER=jlink make -C examples/hello-world --no-print-directory flash-only FLASHER=true PORT=none; done
cc2538dk
true /home/harter/work/git/RIOT/examples/hello-world/bin/cc2538dk /home/harter/work/git/RIOT/examples/hello-world/bin/cc2538dk/hello-world.bin
firefly
true /home/harter/work/git/RIOT/examples/hello-world/bin/firefly /home/harter/work/git/RIOT/examples/hello-world/bin/firefly/hello-world.bin
openmote-b
true /home/harter/work/git/RIOT/examples/hello-world/bin/openmote-b /home/harter/work/git/RIOT/examples/hello-world/bin/openmote-b/hello-world.bin
openmote-cc2538
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/openmote-cc2538/hello-world.bin
remote-pa
true /home/harter/work/git/RIOT/examples/hello-world/bin/remote-pa /home/harter/work/git/RIOT/examples/hello-world/bin/remote-pa/hello-world.bin
remote-reva
true /home/harter/work/git/RIOT/examples/hello-world/bin/remote-reva /home/harter/work/git/RIOT/examples/hello-world/bin/remote-reva/hello-world.bin
remote-revb
true /home/harter/work/git/RIOT/examples/hello-world/bin/remote-revb /home/harter/work/git/RIOT/examples/hello-world/bin/remote-revb/hello-world.bin

Issues/PRs references

Part of #8838

cladmi added 2 commits May 23, 2019 14:55
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 May 23, 2019
@cladmi cladmi added this to the Release 2019.07 milestone May 23, 2019
@cladmi cladmi requested a review from MrKevinWeiss May 23, 2019 13:10
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.

ACK!

Followed testing procedure and got expected results. Also flashed on remote-revb board.

Thanks for getting this done (now all HiL boards support flashfile)

@MrKevinWeiss MrKevinWeiss merged commit 3f4c92d into RIOT-OS:master May 23, 2019
@cladmi cladmi deleted the pr/make/cc2538/flashfile branch May 23, 2019 15:56
@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented May 23, 2019

Thank you for the review!

@PeterKietzmann
Copy link
Copy Markdown
Member

Did this PR interfere with/ or fix #9851?

@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented May 27, 2019

@PeterKietzmann

This indeed require to apply the same changes to the pull request.
But does not fix #9851

I can take over the removal of the dist/tools/flash|reset.sh scripts for the boards that uses Jlink with a separate script.
I would however prefer doing it after #11554 as it modifies many common lines.

@PeterKietzmann
Copy link
Copy Markdown
Member

That would be cool! No objections waiting for #11554

@cladmi
Copy link
Copy Markdown
Contributor Author

cladmi commented May 28, 2019

It's merged, now I need to work, damn :D

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants