Detailed description
In this PR we address a series of mistakes that were noticed in the remote protocol impls in BMDA while building bmputil's support out. We also fix an issue spotted by @hrm on Discord that results in garbage error messages being emitted when platform_buffer_read() fails.
The fixes in the ADIv5 implementations should allow buffer sizing to be more correctly calculated, and allow requests to run a good bit faster by allowing the probe to run them in a more suitable alignment mode (32-bit instead of 16-bit transactions, for example).
The fixes in the SWD implementations should make those much more robust to bad requests if ever anyone includes any in the main codebase.
The protocol v4 fixes should allow 64-bit addresses to be properly formatted in debug messages so 64-bit target interactions display properly.
Your checklist for this pull request
Closing issues
<!-- Filling this template is mandatory -->
## Detailed description
In this PR we address a series of mistakes that were noticed in the remote protocol impls in BMDA while building `bmputil`'s support out. We also fix an issue spotted by @hrm on Discord that results in garbage error messages being emitted when `platform_buffer_read()` fails.
The fixes in the ADIv5 implementations should allow buffer sizing to be more correctly calculated, and allow requests to run a good bit faster by allowing the probe to run them in a more suitable alignment mode (32-bit instead of 16-bit transactions, for example).
The fixes in the SWD implementations should make those much more robust to bad requests if ever anyone includes any in the main codebase.
The protocol v4 fixes should allow 64-bit addresses to be properly formatted in debug messages so 64-bit target interactions display properly.
## 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
<!-- put "fixes #XXXX" here to auto-close the issue(s) that your PR fixes (if any). -->