Fails to flash/erase NXP MIMXRT1170-EVK with updated MCUXpresso SDK
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
The NXP MCUXpresso SDK v2.15 updated the Flash Control Block (FCB) used for the MIMXRT1170-EVK board . These changes to the flash boot settings have broken pyOCD support for this board now. If an app built with the new FCB is downloaded to the board, pyOCD succeeds in programming that app. But after booting that app, pyOCD is no longer able to erase or program the flash. This likely also affects the MIMXRT1160-EVK board, although I have not tested it. This issue was originally reported at https://github.com/zephyrproject-rtos/zephyr/issues/73234. The attached zephyr.hex is an app showing this issue.
To replicate, use pyOCD v0.36 and build an app using the v2.15 SDK or later. Zephyr apps with this issue use commit e4e463a or later. Program the flash using a command like:
pyocd flash -e sector -a 0x30000000 -t mimxrt1170_cm7 zephyr.hex
The initial programming succeeds. Reset the board. Try the same programming command, and it fails. Also, the erase command like this fails:
pyocd erase -t mimxrt1170_cm7 --mass
To recover the board, I can use another tool to erase or reprogram the flash. LinkServer is NXP's tool that works with the same CMSIS-DAP debug probes. This is the LinkServer command to erase the flash:
/usr/local/LinkServer/LinkServer flash MIMXRT1176xxxxx:MIMXRT1170-EVK erase
Or another option, change the DIP switch settings on the EVK to boot in serial downloader mode. Use NXP's bootloader tools to erase the flash.
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with pyOCD v0.36 using the MIMXRT1170-EVK target, the supplied zephyr.hex app, and the documented flash and mass-erase commands. Trace the target's flash handling after the updated FCB is programmed; done means the board can be erased and programmed again after reboot without external recovery tools.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, embedded-iot, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100