8
33
Fork
You've already forked blackmagic
23

Feature: BMPv3 support #2197

Merged
esden merged 61 commits from feature/bmpv3-support into main 2026年03月09日 06:27:34 +01:00

Detailed description

In this PR we implement provisional support for the upcoming BMPv3 platform. There will need to be more refinement done, however this gets all the core stuff up and running - from the clocking system and bitbanging with the GPIO controller, and thus core debug, to the UARTs, ADCs, SPI controller, and other parts to make all major parts of the firmware work.

This includes support for both SWO modes, the target UART system including provisional support for switchable TX/RX and other hardware improvements found in the v3 platform, support for using the debug connector to access SPI Flash devices with bmpflash, and a heap of other goodie bits.

We know not all targets are yet working as there are some comms issues on the debug interface, however nothing completely show-stopping. DFU works well and has slightly more Flash reserved than the previous hardware platform, allowing more space for fixes and bootloader features in time. This platform however requires the absolute latest bmputil to program and work with because of some assumptions the older versions of the tool made get broken with this.

This PR must be sequenced after libopencm3/libopencm3#1625.

Your checklist for this pull request

Closing issues

<!-- Filling this template is mandatory --> ## Detailed description In this PR we implement provisional support for the upcoming BMPv3 platform. There will need to be more refinement done, however this gets all the core stuff up and running - from the clocking system and bitbanging with the GPIO controller, and thus core debug, to the UARTs, ADCs, SPI controller, and other parts to make all major parts of the firmware work. This includes support for both SWO modes, the target UART system including provisional support for switchable TX/RX and other hardware improvements found in the v3 platform, support for using the debug connector to access SPI Flash devices with `bmpflash`, and a heap of other goodie bits. We know not all targets are yet working as there are some comms issues on the debug interface, however nothing completely show-stopping. DFU works well and has slightly more Flash reserved than the previous hardware platform, allowing more space for fixes and bootloader features in time. This platform however requires the absolute latest `bmputil` to program and work with because of some assumptions the older versions of the tool made get broken with this. This PR must be sequenced after libopencm3/libopencm3#1625. ## 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 <!-- put "fixes #XXXX" here to auto-close the issue(s) that your PR fixes (if any). -->
esden (Migrated from github.com) reviewed 2026年02月22日 12:55:05 +01:00
dragonmux force-pushed feature/bmpv3-support from 5ffd74990b to ac37aa493b 2026年03月08日 17:27:50 +01:00 Compare
esden requested changes 2026年03月08日 22:02:44 +01:00
Dismissed
esden left a comment
Copy link

One minor comment. And commit 5e2ac8aa94 seems to have an invalid signature. Otherwise good to go.

One minor comment. And commit https://codeberg.org/blackmagic-debug/blackmagic/commit/5e2ac8aa945628e49bd897f7522fcd0ad259f117 seems to have an invalid signature. Otherwise good to go.
@ -42,6 +44,9 @@
#define DFU_IFACE_STRING_OFFSET 54
#define DFU_IFACE_STRING "@Internal Flash /0x08000000/1*016Ka,3*016Kg,1*064Kg,000*128Kg"
#endif
#elif defined(STM32U5)
Owner
Copy link

Not sure this is important or not, but the other DFU strings have spaces between @Internal Flash and the first /, we might want to keep things consistent to avoid confusion/issues.

Not sure this is important or not, but the other DFU strings have spaces between `@Internal Flash` and the first `/`, we might want to keep things consistent to avoid confusion/issues.
Author
Owner
Copy link

It turns out that none of the extra spaces are required by any of the DfuSe machinery, and we're actually planning to do a cleanup pass to remove them from the other platforms so we can get back some bytes from them - that would then help avoid confusion, but with how big this PR already is and such we were thinking it'd be better as a separate one. We can include a commit doing this in this PR if you prefer though?

It turns out that none of the extra spaces are required by any of the DfuSe machinery, and we're actually planning to do a cleanup pass to remove them from the other platforms so we can get back some bytes from them - that would then help avoid confusion, but with how big this PR already is and such we were thinking it'd be better as a separate one. We can include a commit doing this in this PR if you prefer though?
Owner
Copy link

ok, sounds good. Let's make the other strings consistent then in a followup PR. :)

ok, sounds good. Let's make the other strings consistent then in a followup PR. :)
esden marked this conversation as resolved
dragonmux force-pushed feature/bmpv3-support from ac37aa493b to b2620d6fc6 2026年03月09日 06:23:34 +01:00 Compare
esden left a comment
Copy link

LGTM

LGTM
esden deleted branch feature/bmpv3-support 2026年03月09日 06:27:35 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
BMD App
Black Magic Debug App (aka. PC hosted) (not firmware)
BMP Firmware
Black Magic Probe Firmware (not PC hosted software)
Bug
Confirmed bug
Build system
Build system
Can't reproduce
Maintainers can't reproduce this problem
CI
Continuous Integration System
Contribution wanted
User contributions welcome
Documentation
Project documentation
Draft
Work in progress draft
Duplicate
This issue or pull request already exists
Enhancement
General project improvement
Feedback wanted
Requires additional submitter feedback
Foreign Host Board
Non Native hardware to runing Black Magic firmware on
GDB
Issue/PR related to GDB
Good first issue
Good for newcommers
HwIssue Mitigation
Solving or mitigating a Hardware issue in Software
Information Needed
Maintainers need more information
NativeHardware
Official Black Magic Debug Hardware
New Host Board
New hardware to run Black Magic firmware on
New Target
New debug target
Off Topic
Something that does not involve the project in any way
Potential Bug
A potential, unconfirmed or very special circumstance bug
Regression
Bug caused by a regression
User Interest Needed
More user interest required before consideration
User Testing Needed
Looking for user testing reports
Won't fix
Outside of the project scope or works as intended
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
blackmagic-debug/blackmagic!2197
Reference in a new issue
blackmagic-debug/blackmagic
No description provided.
Delete branch "feature/bmpv3-support"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?