-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
makefiles/tools/jlink.inc.mk: use ELF file for flashing #19541
Conversation
I am wondering if we should also update this file at the same time. |
Indeed, that shell script should be adapted to handle ELF files properly |
f041197
to
6dd88e2
Compare
I updated the script to handle both ELF and bin files. I tested both successfully with the nRF52840DK. |
Adapt the script to flash files as ELF file if the file extension is `.elf`, otherwise stick with default behavior and flash as bin file.
There seems to be a consensus to go for a more ELF centric approach whenever possible. J-Link seems to work fine with ELF files, so let's avoid the extra step to create a bin file from the ELF file prior to flashing.
Now that the ELF file format is the default anyway, we don't need to specify this explicitly anymore.
6dd88e2
to
93561c7
Compare
Rebased on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this PR on rpi-pico
both with .elf file and .bin file (with IMAGE_OFFSET=0x10000000
) and it works as expected.
bors merge |
19541: makefiles/tools/jlink.inc.mk: use ELF file for flashing r=dylad a=maribu ### Contribution description There seems to be a consensus to go for a more ELF centric approach whenever possible. J-Link seems to work fine with ELF files, so let's avoid the extra step to create a bin file from the ELF file prior to flashing. Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Build failed: |
bors merge |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Thx :) |
This breaks flashing
|
Hm nvm, updating JLinkExe to 7.8811 also fixed this. |
Contribution description
There seems to be a consensus to go for a more ELF centric approach whenever possible. J-Link seems to work fine with ELF files, so let's avoid the extra step to create a bin file from the ELF file prior to flashing.
Testing procedure
Flashing with J-Link should still just work
Issues/PRs references
In #19537 (comment) I was made aware that we use the bin file by default for J-Link flashing.