Detailed description
- No new features.
- The existing problem is BMDA requesting 510-byte reads from BMP via remote v4 protocol, which it then does with 16-bit alignment (per internal logic) at suboptimal (50%) efficiency compared to 32-bit reads.
- The PR solves it by rounding max read size down to 508 bytes in BMDA, so that BMP remote can utilize efficient 32-bit reads.
Only BMDA is affected. Tested (3 weeks ago) on some Cortex-M4 via blackpill-f411ce to provide an increase in read/verify speed from 60.5 to 105 KiB/s on same frequency. Slow frequencies are proportionally affected, too.
The writes are not considered, because long writes usually hit Flash reprogramming speed limits anyways; and long reads are prevalent in operations like compare-sections, dump/verify, and RTT.
If GDB RSP buffer length changes, revisit this.
Your checklist for this pull request
Closing issues
## Detailed description
* No new features.
* The existing problem is BMDA requesting 510-byte reads from BMP via remote v4 protocol, which it then does with 16-bit alignment (per internal logic) at suboptimal (50%) efficiency compared to 32-bit reads.
* The PR solves it by rounding max read size down to 508 bytes in BMDA, so that BMP remote can utilize efficient 32-bit reads.
Only BMDA is affected. Tested (3 weeks ago) on some Cortex-M4 via `blackpill-f411ce` to provide an increase in read/verify speed from 60.5 to 105 KiB/s on same frequency. Slow frequencies are proportionally affected, too.
The writes are not considered, because long writes usually hit Flash reprogramming speed limits anyways; and long reads are prevalent in operations like compare-sections, dump/verify, and RTT.
If GDB RSP buffer length changes, revisit this.
## Your checklist for this pull request
* [x] I've read the [Code of Conduct](https://codeberg.org/blackmagic-debug/blackmagic/src/CODE_OF_CONDUCT.md)
* [x] I've read the [guidelines for contributing](https://codeberg.org/blackmagic-debug/blackmagic/src/CONTRIBUTING.md) to this repository
* [x] It builds for hardware native (see [Building the firmware](https://codeberg.org/blackmagic-debug/blackmagic?tab=readme-ov-file#building-the-firmware))
* [x] It builds as BMDA (see [Building the BMDA](https://codeberg.org/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