Detailed description
- This is close to a new feature, but basically I cloned a couple existing functions and extended timeouts.
- The existing problem is BMD internally timing out after 250ms after issuing a RDP1 degrade command (erase option bytes and write 0x5aa5) of which the latter takes ~14 seconds of DP WAIT because it is going through a mass erase of F437ZM 4032 KiB flash.
- This PR solves it by using a couple different ADIv5 raw_access functions with extended timeouts and progress printout.
Tested to allow regression from RDP1 to Open state on AT-START-F437 via BMP or BMDA, via SWD or JTAG transport. I have no idea how to implement the same for CMSIS-DAP, JLink, FTDI and other backends. I don't expect this to be merged as-is, rather I publish a hacked working example of what must be done. Maybe there's a better way of repurposing existing drivers to not take up so much code flash of BMP (ENABLE_ARTERY is already opt-in). This is based on top of #1949 branch, just two new commits.
Your checklist for this pull request
- I've read the Code of Conduct
- I've read the guidelines for contributing to this repository
- It builds for hardware native (see Building the firmware)
- It builds as BMDA (see Building the BMDA)
- I've tested it to the best of my ability
- My commit messages provide a useful short description of what the commits do
Closing issues
## Detailed description
* This is close to a new feature, but basically I cloned a couple existing functions and extended timeouts.
* The existing problem is BMD internally timing out after 250ms after issuing a RDP1 degrade command (erase option bytes and write 0x5aa5) of which the latter takes ~14 seconds of DP WAIT because it is going through a mass erase of F437ZM 4032 KiB flash.
* This PR solves it by using a couple different ADIv5 raw_access functions with extended timeouts and progress printout.
Tested to allow regression from RDP1 to Open state on AT-START-F437 via BMP or BMDA, via SWD or JTAG transport. I have no idea how to implement the same for CMSIS-DAP, JLink, FTDI and other backends. I don't expect this to be merged as-is, rather I publish a hacked working example of what must be done. Maybe there's a better way of repurposing existing drivers to not take up so much code flash of BMP (ENABLE_ARTERY is already opt-in). This is based on top of #1949 branch, just two new commits.
## Your checklist for this pull request
* [x] I've read the [Code of Conduct](https://github.com/blackmagic-debug/blackmagic/blob/main/CODE_OF_CONDUCT.md)
* [x] I've read the [guidelines for contributing](https://github.com/blackmagic-debug/blackmagic/blob/main/CONTRIBUTING.md) to this repository
* [x] It builds for hardware native (see [Building the firmware](https://github.com/blackmagic-debug/blackmagic?tab=readme-ov-file#building-black-magic-debug-firmware))
* [x] It builds as BMDA (see [Building the BMDA](https://github.com/blackmagic-debug/blackmagic?tab=readme-ov-file#building-black-magic-debug-app))
* [x] I've tested it to the best of my ability
* [x] My commit messages provide a useful short description of what the commits do
## Closing issues