Closed lawrence-king closed 4 years ago
"west flash runs the command pyocd flash -e sector -a 0xc000 -t nrf52 foo.hex which is incorrect, it should run the command pyocd flash -e sector -a 0xc000 -t nrf52840 foo.hex."
FYI: @mbolivar-nordic
This is a bug in the nrf52840_mdk/board.cmake file, not a general issue with nrf52840 boards as reported.
Describe the bug
Boards with nrf52840 chip using the pyocd debugger cannot program flash memory above the 512k mark. When using the command
west flash --hex-file foo.hex
this successfully programs a nrf52840 device using the pyocd runner, provided the contents of the file foo.hex are for addresses below the 512k mark.Here is an example hex file with content for above the 512k mark (foo.hex) which will fail to program:
To Reproduce Steps to reproduce the behavior:
Expected behavior The contents of foo.hex should be programmed into the device
Impact This is an annoyance, but can be worked around, the challenge is the workaround is only needed for boards using nrf52840 and pyocd. Other nrf52840 boards using runner nrfjprog do not have this issue
Screenshots or console output Here is the output in the failure case:
Environment (please complete the following information):
Additional context west flash runs the command
pyocd flash -e sector -a 0xc000 -t nrf52 foo.hex
which is incorrect, it should run the commandpyocd flash -e sector -a 0xc000 -t nrf52840 foo.hex
.there are two possible workarounds: 1) manually run the pyocd command above to program foo.hex 2) call west flash with additional parameters
west flash --hex-file foo.hex -- --target=nrf52840
, however the additional parameters cause issues for boards that do not use pyocd as the runner.I am not sure if this is a cmake issue, or a west issue.