Flash option does not work on NRF52840_DK
noonfom opened this issue · 5 comments
Describe the bug
The flash option does not work on NRF52840_DK as mbedtools
looks for
a bin
and the output extension is hex
(mbed-os/targets/targets.json#L5924).
To Reproduce
Steps to reproduce the behavior:
-
Build an Mbed OS application and append the flash option:
mbedtools compile -t <toolchain> -m NRF52840_DK --flash
-
The resulting error is shown:
ERROR: Build program file (firmware) not found <app>/cmake_build/NRF52840_DK/develop/<toolchain>/<app>.bin
-
The workaround is to create the
bin
from theelf
using objcopy and rerun the command. Of course, you can also manually copy thehex
to DAPLINK.
Expected behavior
On NRF52840_DK, look for a hex not a bin.
Desktop (please complete the following information):
- OS: Ubuntu Linux
- Version: 20.04
Mbed (please complete the following information):
- Device: NRF52840_DK
- Mbed OS Version: 6.10.0
- Mbed CLI 2 Version: 7.10
Additional context
None
Thanks for the report.
Does it work if you append the --hex-file
flag? The full command would be: mbedtools compile -t <toolchain> -m NRF52840_DK --flash --hex-file
Let us know if it still fails with the --hex-file
flag added and we can look into it. Thanks!
Thanks Rob. It works with --hex-file
.
Auto-selection of image format should be implementable, I've created #281 as a reminder.
Thanks @LDong-Arm. That's a very useful feature.