codeberg blackmagic-debug/blackmagic v2.1.0-rc1
Release Candidate V2.1.0-rc1

pre-release9 hours ago

We are happy to announce the first v2.1.0 release candidate of Black Magic Debug.

Here are some of the highlights:

  • Support for RISC-V semihosting and memory access using the program buffer
  • Non-halting I/O for RTT on various targets (see Core Changes for details)
  • Support for exposing the on-board Flash of the BMPv2.3+ as a target
  • Support in BMDA for talking with WCH-Link's to work with WCH RISC-V parts
  • And a bunch of newly supported targets:
    • ST Micro STM32H523/H533
    • NXP MCX N947
    • Microchip PIC32CM MC
    • Puya PY32F071
    • ST Micro STM32U0
    • ST Micro STM32C05/C07/C09
    • Gigadevice GD32VW553
    • ST Micro STM32U5
    • Lattice ECP5
    • ST Micro STM32H7R/H7S
    • ST Micro STM32C5
    • ST Micro STM32U3
    • AteryTek AT32F455/F456/F457
    • Lattice ispCLOCK

For more details please refer to the ChangeLog down below.

If you have any questions/suggestions regarding this release we welcome your feedback on our
Discord
server or in our project discussions.

We now also have an IRC server. We recommend the use of an IRCv3 capable client for the best experience.

How to update

Follow the instructions found on our
website for update instructions.

ChangeLog v2.0.0-rc1

Core Changes

  • Added debug logging to the Target Flash layer for operation perparation to aid debugging [ALTracer]
  • Improved the logging in the CRC32 implementations to create less fragmented diagnostic output [ALTracer]
  • Implemented a new monitor command to scan for SPI Flash on the probe itself to present up the on-board storage to the user as a target [dragonmux]
  • Cleaned up a lot of nomenclature across the code base, concluding cleanup that's been ongoing since v1.8 [dragonmux]
  • Implemented support for TI's ICEPick block as found on the AM335x and TMS570 parts [dragonmux]
  • Fixed some improper format strings in the ICEPick support [xobs]
  • More firmly documented the no-"AI" (LLMs) policy with a README.md badge [esden]
  • Fixed an issue with JTAG scan where the presumption that the BYPASS registers in the chain would be preloaded with 0 does not actually hold on some devices [ALTracer]
  • Made use of the GDB packet buffer for memory packets instead of alloca()'ing (a form of VLA) [ALTracer]
  • Updated the first big tranch of links from GitHub to Codeberg following the repo move [gojimmypi]
  • Cleaned up some style issues in the Cortex-M architecture support and GDB state machine [dragonmux]
  • Improved the XML generation for target memory maps so it doesn't require a huge buffer to be allocated [dragonmux]
  • Refined the target memory map XML generation to fix a bug the rewrite accidentally introduced [dragonmux]
  • Fixed some clang-tidy type conversions lints and lost allocations warnings [dragonmux]
  • Fixed a hang in the remote protocol when the JTAG run cycles command is invokes with 0 cycles to do [dragonmux]
  • Cleaned up and improved how BMD RSP packets are handled in the firmware and passed about [dragonmux]
  • Re-enabled non-halting I/O for RTT on a suite of targets [ALTracer]
    • AT32F40
    • AT32F425
    • AT32F43
    • GD32F1
    • GD32F3
    • GD32E5
    • nRF52
    • nRF54L
    • STM32F0
    • STM32F1
    • STM32F3
    • STM32F4
    • STM32G0
    • STM32G47
  • Updated the project README CI badge to point at Codeberg (Woodpecker) CI instead of GHA [esden]
  • Ensure TDI is driven high before switching to SWD mode to prevent issues with STM32MP15 parts [ALTracer]
  • Ensure JTAG state is properly tracked through resets even on parts where nRST triggers nTRST (wrongly) [ALTracer]
  • Fixed an issue with the ADI JTAG ensure-idle behaviour that could land targets in invalid states [dragonmux]
  • Made sure platform-agnostically that nRST pulses have a minimum duration [ALTracer]
  • Implemented the ability for a JTAG device entry to be specified where the exact IR value should be ignored on scan [lethalbit]
  • Reworked the monitor rtt command for easier understanding and use, fixing a crash caused by a NULL pointer [dragonmux]
  • Fixed an issue with the ADI JTAG ensure-idle system which would induce a NULL pointer crash when not talking JTAG [ALTracer]
  • Implemented a sub-command for monitor rtt for manually triggering block discovery [mdrssv]
  • Switched the no-AI policy from a custom one to Zig's in the Code of Conduct (CoC) [esden]
  • Updated badges and release links in the project README [esden]
  • Fixed the missing abuse reporting contact information in the project CoC [esden]
  • Fixed an issue with the size of the breakwatch structure caused by a definition not getting properly set right [ALTracer]
  • Fixed an issue where a remote protocol JTAG scan follwed by a SWD scan using ADI would put the firmware remote protocol in a bad state [dragonmux]
  • Fixed some straggling target and timing implementation nomenclature issues, and some missing static on target's command lists [dragonmux]

Build System Changes

  • Fixed the warnings for -Wstrict-prototypes and -Wnewline-eof, properly enabling them in the build system [perigoso]
  • Fixed the way the Flash stub hex files were being generated so as to not include the ELF headers incorrectly [dsdve]
  • Tweaked the set of default-enabled targets for the Blue Pill, F072, BMPv1/2 and swlink platforms to make the firmware fit again [dragonmux]

Script/Utility Changes

  • Updated the Nix shell config and clangd ignores [UtkarshVerma]

Project CI Changes

  • Fixed some lint pass issues and upgraded the tooling we build and test against [dragonmux]
  • Upgraded the compiler from GCC 14.2 to 14.3 to fix for some upstream (ARM) changes that were made [esden]
  • Fixed a pile of CI issues with the build-and-upload flow and Clang tooling used to re-modernise the flow [dragonmux]
  • Done a further round of updates and upgrades of the workflows to use the currently supported set of builder OSes, and tooling [dragonmux]
  • Moved the core part of CI over from GitHub Actions to Codeberg's Woodpecker CI instance [dragonmux]
  • Fixed the lint pass so it works properly again on Codeberg's Woodpecker CI [dragonmux]

ARM (ADIv5 and ADIv6) Changes

  • ARM Debug: Implemented support for the ARMv8-M secure fault exception in the vector_catch monitor command [zyp]
  • ARM Debug: Implemented basic ARMv8-A architecture support for AArch64 [marysaka]
  • ARM Debug: Fixed a couple of format string errors in the ARMv8-A support [xobs]
  • ARM Debug: Improved fault exception handling for ARMv8-M using the ICSR register [mean00]
  • ARM Debug: Added polling w/ timeout to the Cortex-M halt logic to pick up on targets that take a moment to actually halt [mdrssv]
  • ARM Debug: Implemented a limited retry for reading the TARGETID DP register on DPv2+ parts [mdrssv]
  • ARM Debug: Use the TARGET debug level to report breakpoint/watchpoints discovered on Cortex-M [ALTracer]
  • ARM Debug: Catch and handle the potential execption from AIRCR-induced reset [ALTracer]
  • ARM Debug: Properly guard the DP prep functions for targets that aren't enabled in the build system [hrm]

RISC-V Debug Changes

  • RISC-V Debug: Ensure the trigger registers (breakpoints, watchpoints) are cleared during attach/detach [ALTracer]
  • RISC-V Debug: Ensure the triggers are only touched after having halted the core [ALTracer]
  • RISC-V Debug: Implemented basic semihosting support (32- and 64-bit!) [ALTracer]
  • RISC-V Debug: Fixed the register mappings for the FPU CSRs between the CSR address space and GDB [ALTracer]
  • RISC-V Debug: Implementing using the DM program buffer for memory access when no other methods are available [ALTracer]
  • RISC-V Debug: Fixed an issue with DMI idle cycles handling that could lead to an infinite loop [ALTracer]
  • RISC-V Debug: Fix an issue with hart flags not getting preserved properly when using SysBus [ALTracer]
  • RISC-V Debug: Fixed a one-past-the-end stack buffer overflow for 128-bit CSR access [mTOTm]
  • RISC-V Debug: Fixed the RISC-V remote protocol accelerations not getting enabled when this support is [dragonmux]

Target Changes

  • puya: Cleaned up and de-duplicated setup code in the support [ALTracer]
  • lpc/renesas_ra/stm32h7: Cleaned up and deduplicated some of the debug logging to improve Flash usage [ALTracer]
  • samx5x: Corrected how boot locking works, making making the number of blocks configurable in the monitor commands [UtkarshVerma]
  • sam3x/sam4s/samx7x: Fixed the implementation of Flash support for these parts, modernising the implementation [dragonmux]
  • lpc546xx: Fixed the display of the part number in the debug logs so it's in hex, not decimal [ALTracer]
  • lpc: Overhaulled the support and code style, fixing a whole heap of issues along the way [dragonmux]
  • msp432p4: Cleaned up and removed the last VLA usage in this target's support [ALTracer]
  • ch32f1: Fixed a bug in the Flash routines that would lead to load in GDB hanging [lasutek]
  • mspm0: Implemented a Flash stub to speed things up, and handled some of the newer parts [hardesk]
  • gd32vw553: Fixed the memory map as discovery is not really possible on this part [ALTracer]
  • onboard_flash: Detect other SPI Flash chips than just Winbond, allowing a wider variety to work on non-native platforms [ALTracer]
  • stm32mp15: Implemented handling for SWO setup and the management AP on these parts [ALTracer]
  • stm32mp15: Fixed several memory management issues to fix some crashes [ALTracer]
  • stm32mp15: Fixed part identification for post-Linux-boot on the Cortex-A7 cores [ALTracer]
  • lattice_ecp5: Implemented basic support for SRAM programming [lethalbit]
  • lattice_ecp5: Fixed an issue where the FPGA wouldn't be properly reset on exit from attach [lethalbit]
  • stm32c5: Fixed the naming of the bank size macros [emeb]
  • lattice_ecp5: Tweaked the SPI passthrough mode support to allow it to work with multi-device chains [lethalbit]
  • lattice_ecp5: Fixed an issue with SPI passthrough mode post-DR-scan which would cause multi-device chains to not work [lethalbit]
  • at32f40: Properly detect RDP-locked parts so they can be unlocked [ALTracer]

Targets Added

  • ST Micro STM32H523/H533 [ALTracer]
  • NXP MCX N947 [wiboticalex]
  • Microchip PIC32CM MC [kinsamanka]
  • Puya PY32F071 [Badokas]
  • ST Micro STM32U0 [mickael868]
  • ST Micro STM32C05/C07/C09 [desertsagebrush]
  • Gigadevice GD32VW553 [ALTracer]
  • ST Micro STM32U5 [dragonmux]
  • Lattice ECP5 [lethalbit]
  • ST Micro STM32H7R/H7S [emeb]
  • ST Micro STM32C5 [emeb]
  • ST Micro STM32U3 [emeb]
  • AteryTek AT32F455/F456/F457 [ALTracer]
  • Lattice ispCLOCK [dragonmux/lethalbit]

Host Platform Changes

  • Renamed native to bmp-v2 and added a series of mirror build configuration files for bmp-v1 [northernpaws]

Added

  • Base support for BMPv3 [dragonmux]
  • Support using STM32F401-based Black Pill's as a platform [lasutek]

Common

  • Fixed some UB triggered by how usb_config was declared and used which was breaking LTO builds [hrm]

STM32

  • Cleaned up the DfuSe interface strings, removing excess spaces, shrinking the bootloader a bit in size [dragonmux]

Black Magic Probe v1/2 host

Black Magic Probe v3 host

  • Implemented support for platform monitor command based TX/RX swapping of the BMDU UART [dragonmux]
  • Fixed an issue with automatic UART switching that would result on a DMA crash [dragonmux]
  • Fixed an issue with the power controls which would cause tpwr state to be reported backwards [dragonmux]
  • Documented the ST native bootloader behviour to match a patch to stlink-tool [freeman1216]
  • Fix ST-Link v2-ISOL's not properly re-enumating on USB on reboot [hrm]
  • Fixed the load address for the OEM bootloader and how the BMD bootloader is used/works [UtkarshVerma]

Black Pill v2 host (now blackpill-f401cc, blackpill-f401ce and blackpill-f411ce, aka “The Black Pill hosts”)

Black Magic Debug App (aka “PC Host”)

  • Ensure all platform inline functions are also marked static [zyp]
  • Implemented support for the WCH Link as a protocol backend to talk to WCH RISC-V parts [perigoso]
  • Implemented support for driving nTRST high as part of link bringup for the CMSIS-DAP backend [xobs]
  • Implemented support for the JTAG run cycles command in the FTDI backend for better performance and to fix a crash [ALTracer]
  • Implemented support for the JTAG run cycles command in the J-Link backend for better performance and to fix a crash [ALTracer]
  • Fixed the support for the Olimex FT2232C/H FTDI-based adaptors [ALTracer]
  • Fixed the way BMDA drives using the Windows registry to locate probes so it works correctly on W11 [dragonmux]
  • Implemented support for the FTDI backend to use ECP5-5G Versa boards as an adaptor [dragonmux]
  • Fixed a buffer sizing alignment issue in the BMD remote protocol v4 implementation for a large speed-up [ALTracer]
  • Fixed a bunch of BMD remote protocol implementation mistakes found while implementing the protocol in bmputil [dragonmux]

Contributors to v2.1.0-rc1

We have had 25 individuals contribute 649 commits since the v2.0.0 release.

Contributor (Contributions)
dragonmux (406)
ALTracer (104)
Aki Van Ness (38)
Eric Brombaugh (19)
perigoso (18)
Mary Guillemard (12)
Piotr Esden-Tempski (7)
Sean Cross (6)
Utkarsh Verma (5)
Mindaugas (5)
Marvin Drescher (4)
Hristo Mitrev (4)
hardesk (4)
Alex Huttunen (3)
Vegard Storheil Eriksen (2)
Lars Sundström (2)
Kat (2)
zhangjiance (1)
Sage Myers (1)
Mickael Bosch (1)
mean00 (1)
GP Orcullo (1)
gojimmypi (1)
fufixman (1)
dsdve (1)

Sponsors

This project is sponsored in parts by:

  • 1BitSquared - Design, Manufacture and distribution of open source
    embedded hardware development tools and platforms, as well as educational electronics. Thank you
    everyone who buys Black Magic Probes from 1BitSquared directly through our
    stores or indirectly through
    Adafruit. The hardware sales allow us to continue
    supporting the Black Magic Debug project.
  • All the generous Patrons and
    GitHub Sponsors supporting esden’s work
  • All the generous GitHub Sponsors supporting dragonmux’s work

Don't miss a new blackmagic release

NewReleases is sending notifications on new releases.