Skip to content
Compare
Choose a tag to compare

We are happy to announce the V1.8.0 release of Black Magic Debug. It is a big one since we did not make a stable release since October 2020!!! So this release is very much overdue. But that also means we have a lot of new and interesting things in this release.

Here are some highlights:

  • Added support for the new Black Magic Probe v2.3 hardware.
  • Improved target scan reliability for devices that are asleep or using WFI.
  • Black Magic App (BMA aka. hosted) now has better support of CMSIS-DAP probes.
  • All python scripts and utilities were updated to run and require Python 3.
  • Added GitHub Actions CI builds
  • And a bunch of newly supported targets:
    • WCH CH32F103
    • GigaDevice GD32F1/F3
    • GigaDevice GD32E23x
    • NXP Kinetis K12 and placeholders for other K-Series MCUs
    • NXP LPC11xx XL, LPC546xx, LPC802, LPC804, LPC832 and LPC834
    • NXP MIMXRT10XX detection (no flash support)
    • NXP S32K14x, S32K118, S32K148
    • RaspberryPi RP2040
    • Microchip SAMD09
    • ST STM32G03/4/5/6/7/8/B/C, STM32G49x/G4Ax
    • ST STM32H7B3/B0/A3 & STM32H723/33/25/35/30
    • ST STM32L55
    • ST STM32WB55
    • ST STM32WLxx

For more details please refer to the ChangeLog down below.

Legend in Historical Context

Black Magic Debug consists of multiple elements that have fairly similar naming that can be confusing. To make this Change Log bit easier to decipher here is a little bit of history and term explanation.

Black Magic Debug (BMD) was originally designed as just a firmware for a purpose made hardware called Black Magic Probe (BMP) that can speak the GNU Debugger (GDB) “remote” serial protocol. The original BMP hardware is also called “native” as over time additional “Host” platforms were added that the firmware could be loaded onto. (such host hardware can be an STM32F4 discovery board, or ST-Link hardware and many more)

Additionally BMD can also be compiled as a stand alone PC application, (we call it Black Magic App, or BMA and formally known as hosted) that can act as a software in the middle, similar to the way OpenOCD works. In this case BMP is only acting as a USB to JTAG/SWD translator and the Black Magic App (BMA) does all the heavy lifting. Additionally this also allows the use of BMA with other probe hardware running non Black Magic Firmware (BMF), like for example: JLink, ST-Link, sw-link, FTDI and more.

  • Black Magic Debug (abbreviated to BMD) - Is the project name, an umbrella describing the project but also sometimes acts as the term describing the software.
  • Black Magic Firmware (abbrev. BMF) - More specifically just the Black Magic Firmware that is loaded either onto Black Magic Probe hardware or onto any other supported host hardware.
  • Black Magic Hosted aka. Black Magic App (abbrev. BMA) - The Black Magic Debug system compiled as a PC application instead of a Firmware. Allowing it to be used in software in the middle mode instead of being contained to a hardware device. This is also sometimes just called “hosted” in the context of the project.
  • Black Magic Probe (abbrev. BMP) - The “native” Black Magic Debug (BMD) hardware that was specifically designed and intended for the BMD project. This is the hardware you can buy from 1BitSquared, Adafruit and other resellers as “the Black Magic Probe”.
  • Black Magic Core (Abbrev. BMC) - This describes the core code of the project that handles JTAG/SWD protocol, implements Flashing, target detection and all target specific functionality. It does not include host platform specific code like for example code that toggles GPIO.
  • Host Platform - Refers to the hardware that the BMD software (either Firmware or Application) runs on. It can be the PC, STM32, lm4f or some more specific hardware like Black Magic Probe aka. native, ST-Link, sw-link and so on.
  • Probe aka. Cable - Refers to the hardware that is connected between the PC running GDB (and/or BMA) and the Target (DUT). In the simplest case it is a USB to JTAG/SWD converter like an FTDI chip but in most cases it is a dedicated hardware running either our BMF or some other firmware.
  • Target - Refers to the Device Under Test (DUT), this is the hardware that the user wants to debug using BMD.

Changelog V1.8

Core Changes

  • SWD debug: Immediately turn around SWDIO after reading with parity to avoid driving SWDIO until the next command. [JojoS] [UweBonnes]
  • Try harder to read the ROMTABLE when the target is sleeping [UweBonnes]
  • Remove forced halt from cortexm_probe [UweBonnes]
  • Narrow down probing for targets based on the designer ID to decrease the size of the search tree and speed up detection [UweBonnes]
  • Allow debugging of not fully supported (no flash routine) ARM Cortex-M targets [UweBonnes]
  • Fix version.h generation for the all_platforms build target [UweBonnes]
  • Print Morse code messages in plain text to the USB UART endpoint when built with ENABLE_DEBUG and debug_bmp is enabled [UweBonnes]
  • Added documentation for building Black Magic PC Hosted in MSYS2 [stoyan-shopov]
  • Added more cycles in cortexm_halt_resume to always keep the CPU going [UweBonnes]
  • Store CPUID in target structure [UweBonnes]
  • GDB: Fixed a lost of sync protocol error in GDB protocol REMOTE_SOM state [stoyan-shopov]
  • command: Fixed a build error caused by cortexm_wait_timeout using signed integers [stoyan-shopov]
  • JTAG: Added debug output verbosity of found devices [UweBonnes]
  • version.h: Removed include from platform.h and consolidated identifier string generation, decreasing build churn [UweBonnes]
  • CLI: Consolidated mon version output [UweBonnes]
  • CLI: Added JTAG/SWD protocol frequency setting [UweBonnes]
  • target: Changed target_foreach signature to return target count instead of a bool indicating that there are some targets present [UweBonnes]
  • docs: Corrected and updated documentation describing the available baud rate limits for SWO usage [UweBonnes]
  • firmware: Unify USB serial number handling [UweBonnes]
  • Turn off the error LED on successful attach to target [compuphase]
  • Remote JTAG: Fix bitmask calculation bug [UweBonnes]
  • Remote JTAG: Split up large transactions [UweBonnes]
  • GDB: Escape * in responses of the GDB remote serial protocol to avoid interpretation as RLE sequence start [compuphase]
  • crc32: Abort with from target_mem_read when generic_crc32 fails [UweBonnes]
  • remote: Allow for packets to be larger than 256 bytes [UweBonnes]
  • tpwr: Test VRef voltage before enabling target power (mon tpwr) to avoid potential power conflict [compuphase]
  • GDB: Better error reporting when the monitor command fails [UweBonnes]
  • GCC11 compilation fixes [jamesturton] [UweBonnes] [dragonmux]
  • crc32: Define start_time when debug is enabled as it is used for crc32 benchmarking [xobs]
  • doc: Update references from blacksphere to blackmagic-debug due to organization rename [esden]
  • crc32: Fixed launchpad-icdi build [dragonmux]
  • GDB: Cleaned up the sscanf usage in GDB Z packet handler [fabalthazar]
  • GDB: Added putpacket2 which allows sending two sub messages as one [mean00]
  • GDB: Fix unused variables and naming [mean00]
  • GDB: Correct function naming scheme for consistency [mean00]
  • GDB: Formatting cleanup [dragonmux]
  • Updated Copyright monitor command output and iManufacturer strings to reflect the organization rename from Black Sphere Technologies to Black Magic Debug [esden]

Build system Changes

  • Remove no longer needed libftdi and pc-stlinkv2 platforms [UweBonnes]
  • Added HOSTED_BMP_ONLY=1 option to allow for easier building of the PC-hosted Black Magic Debug Application when only BMP support is needed [UweBonnes] [stoyan-shopov]
  • Fixed builds using newer GNU make versions that remove - prefix from $(MAKEFLAGS) [noahp]
  • Compile with -Os by default. Can be overridden using make OPT_FLAGS=.... SWD/JTAG bitbang code remains compiled using -O3 for good bitbang speed [UweBonnes]
  • Fixed compilation of BMA on MacOS where hidapi-libusb is called just hidapi [UweBonnes]
  • Added linker flag to show memory usage [esden]
  • Only build needed libopencm3 libraries [esden]
  • Don’t try to report memory usage for BMA builds, as this breaks clang builds [esden]

VCS Changes

  • Added src/artifacts directory created when running all_platforms build to .gitignore [noahp]
  • Added .gitattributes for better control of line endings [xobs]

CI System Changes

  • Updated travis to use bionic instead of trusty, which means we don’t need to build libftdi1 any more [UweBonnes]
  • Added GitHub Actions for builds on push and run test build some PRs [Qyriad]
  • Added BMA build to github actions to catch more potential issues [esden]
  • Added libftdi1 and hidapi dependency installation [esden]

Script/Utility Changes

  • all python script utilities (dfu-convert.py, , , ) ported to Python 3 [agners]
  • stm32_mem.py: Allow UTF-8 characters in manufacturer ID, product ID and serial number [UweBonnes]
  • stm32_mem.py: Wait longer for device to appear [UweBonnes]
  • bootprog.py: Updated to run on python3 [esden]
  • get_openocd_nrf51_ids.py: Updated to run on python3 [esden]
  • gdb.py, hexprog.py: Updated to run on python3 [markrages]
  • stm32_mem.py: More python3 port fixes, cosmetic cleanup and remove unnecessary Python 2 compatibility [schodet]
  • dfu-convert.py: Update for Python 3 and drop Python 2 support [schodet]
  • bootprog.py: Finish converting to Python 3 [schodet]
  • dfu.py, gdb.py, get_openocd_nrf51_ids.py, hexprog.py, stm32_mem.py: More Python 3 updates, also changed the shebang to use python3 [schodet]
  • stm32mem.py: Formatting changes and removal of unused imports [schodet]
  • hexprog.py: Removed unused import and a semicolon that snuck in [schodet]
  • gdb.py: Fixed error messages [schodet]
  • bootprog.py: Use byte literals everywhere where applicable [schodet]

ARM (ADIv5) Changes:

  • ARM debug: Check Debug Base address Early [UweBonnes]
  • ARM debug: Reduce number of errors when CIDR read fails [UweBonnes]
  • ARM debug: Store Access Port designer and part number in the ap structure [UweBonnes]
  • ARM debug: Print designer number and part number when the device is not recognized [UweBonnes]
  • ARM debug: Release devices from reset after scan [UweBonnes]
  • ARM debug: Reworked the Access Port reference counting code [UweBonnes]
  • ARM debug: Run cortexm_prepare on all suspected ARM Cortex-M instances to ensure all cores get detected (Fixes issue where the second CPU on STM32H745 is not visible) [UweBonnes]
  • ARM debug: Abort ROMTABLE scan when CIDR0 is invalid after halting [UweBonnes]
  • ARM debug: Fixed debug output in adiv5_new_ap [UweBonnes]
  • ARM debug (SWD): Factored out packet request creation [UweBonnes]
  • ARM debug: Always halt and release reset before scanning the romtable [UweBonnes]
  • ARM debug: Catch timeout on adiv5_ap_read_id and abort [fabiobaltieri]
  • ARM debug: Fix debug outputs on 32bit builds [UweBonnes]
  • ARM debug: Recover from bad Access Port accesses [UweBonnes]
  • ARM debug: Use dp_low_write in adiv5_swdp_scan to allow multidrop scan [UweBonnes]
  • ARM debug: Added more ID Code decoding for debugging purposes [UweBonnes]
  • ARM debug (SWD): added 8 clock cycles after low_access to move data through SW-DP, as required by ADIv5 [UweBonnes]
  • ARM debug: Added an early check for valid designer ID [UweBonnes]
  • ARM debug (JTAG): set ID Code for all platforms not just PC_HOSTED [UweBonnes]
  • ARM debug: Fixed dp struct memory leak in adiv5_dp_init [UweBonnes]
  • ARM debug: Added more DPIDR checks [UweBonnes]
  • ARM debug (SWD): Simplify the initial_dp initialization with default values [UweBonnes]
  • ARM debug: Tightened up the loop before the initial Cortex-M halt [UweBonnes]
  • ARM debug: Fixed a MINDP case in cortexm_initial_halt [UweBonnes]
  • ARM debug: Consolidate to only using low level functions in cortexm_initial_halt [UweBonnes]
  • ARM debug (SWD): Remove excessive line resets [UweBonnes]
  • ARM debug: Increment TRNCNT for the DHCSR write when trying to halt [UweBonnes]
  • ARM debug: Don’t declare start_time with ENABLE_DEBUG=1 [koendv]
  • ARM debug: When connecting under reset keep the device halted until attach [UweBonnes]
  • ARM debug (SWD): Reuse exception to avoid using the stack [mean00]
  • ARM debug: Raise the access timeouts as 20ms is too low in some cases [dragonmux]
  • ARM debug (SWD): Formatting consistency cleanups [dragonmux]
  • ARM debug (SWD): Changed the low-level access code to retry till timeout [dragonmux]

Target Changes

  • stm32h7: Don't tc_printf from flash functions [gsmcmullin]
  • stm32: Use designer ID when probing [UweBonnes]
  • nrf51: Indicate if the Access Port is protected or not [UweBonnes]
  • samd: Propagate security bit state after change [UweBonnes]
  • atsam: Fix protected SAM detection [UweBonnes]
  • lpc11: Only print non zero ID codes [UweBonnes]
  • cortex-m7: Report buggy core revision that locks up when single stepping [UweBonnes]
  • stm32f1: Always read the CPUID code as some parts of the ROM table ID is not the same as CPUID (for example on STM32F042) [UweBonnes] [aam335]
  • lpc15xx: Set designer ID to 43b [UweBonnes] [JojoS]
  • lpc546xx: Fixed flash support [noahp]
  • stm32h7: Fixed some memory map errors [x37v]
  • stm32f4: Corrected debug output print type for flash error masks [fabalthazar]
  • stm32g43x/g44x: Fixed option bytes support [fabalthazar]
  • ARM Cortex-M: Increased the max breakpoint count to 8 as M33 has up to 8 breakpoints [UweBonnes]
  • samd5x: Detect unprotected SAMD5x only once [UweBonnes]
  • common: Remove the use of static in targets allocating memory in the target structs instead [UweBonnes]
  • rp2040: Flush cache after erase and write [jamesturton]
  • rp2040: Increase spinner timeout to 500ms [jamesturton]
  • rp2040: Added more debug logging during flash [jamesturton]
  • rp2040: Increased flash_range_program timeout [jamesturton]
  • rp2040: Show spinner only when called from monitor command [UweBonnes]
  • ARM Cortex-M: Scan for cortex-m0+ lpc11xx to detect lpc80 [UweBonnes]
  • lpc: More verbose debug output and added more definitions [UweBonnes]
  • efm32: Rearranged the efm32_device_t struct to save flash space [UweBonnes]
  • lpc11xx/lpc8c04: Do not expose top two system flash sectors [UweBonnes]
  • lpc: Take care of protected pages on LPC80x devices [UweBonnes]
  • nrf51: Added UICR erase command [bmellstrom-radinn] [vedderb]
  • lpc: Fixed a Flash erase function bug [compuphase]
  • target: target_error_check function hook now defaults to “no error” [UweBonnes]
  • lpc: Fixed size format warning [neutered]
  • ftdi: Corrected direction reporting in debug output [UweBonnes]
  • remote_jtagtap: Fixed memory corruption in jtagtap_tdi_tdo_seq [UweBonnes]
  • command: Corrected monitor version output [UweBonnes]
  • common: Made more functions static [UweBonnes]
  • ARM debug: Removed leftover debug output from cortexm_initial_halt [UweBonnes]
  • stm32f1: Check if unlock failed and propagate error [UweBonnes]
  • stm32l4: Use target ID when available. Fixes STM32U5 crashes [UweBonnes]
  • ARM Cortex-M: Fixed semihosting exit code return [koendv]
  • stm32g0: Added OTP area programming support [fabalthazar]
  • SWD scan: Return error on parity errors [UweBonnes]
  • SWD scan: Initialize target_id [UweBonnes]
  • samd: Parametrize memory and flash sizes [xobs]
  • stm32wlxx: Add option bit support [fk0815]
  • kinetis: Fixed GCC 11 related build error caused by ill-defined arguments [UweBonnes]
  • samd: Added fine-grained bootloader and Flash locking support [arpadbuermen]
  • jtag_scan: Fixed the underlying issue causing wrong ID Code getting to the handlers [dragonmux]
  • jtag_scan: Removed the now redundant ID Code parameter from handlers [dragonmux]
  • target: Cleaned up target_new() for the check_error callback [dragonmux]
  • jtag_scan: Cleaned up ones array to use more correct init syntax [dragonmux]
  • jtag_devs: Removed manufacturer descriptions for consistency [dragonmux]
  • samd: Fixed the BMA build as the code assumed unsigned long was 32-bit [dragonmux]
  • stm32f4: Move DBGMCU_ handling to target specific code [UweBonnes]
  • stm32f4: Attach logic cleanup by making sure we only set the extra bits needed when writing DBGMCU_CR [dragonmux]
  • stm32g0: Temporarily enable DBG clock for detach in case it got disabled which can happen during Flash [mmoskal]

Targets Added

  • lpc546xx [eivindbergem] [noahp]
  • STM32H7B3/B0/A3 (RM0455) & STM32H723/33/25/35/30 (RM0468) [richardeoin]
  • MIMXRT10XX detection (no flash support) [UweBonnes]
  • Kinetis K12 and placeholders for other K-Series MCUs [jbuonagurio]
  • NXP S32K118 [xobs]
  • GD32F1/F3 [mean]
  • GD32E23x [AerialX]
  • NXP S32K148 [xobs]
  • NXP LPC802, LPC804, LPC832 and LPC834 [compuphase]
  • STM32G03/4/5/6/7/8/B/C [fabalthazar]
  • STM32L55 [UweBonnes]
  • STM32G49x/G4Ax [fabalthazar]
  • STM32WLxx [fabiobaltieri]
  • RP2040 [UweBonnes]
  • NXP LPC11xx XL [compuphase]
  • NXP s32k14x variants: s32k142, s32k142w, s32k144, s32k144w and s32k146 [neutered]
  • STM32WB55 [DrZlo13]
  • SAMD09 [xobs]
  • CH32F1 [mean00]

Arch IDs Added

  • Cortex-M7 TPIU [UweBonnes]

Designer IDs Added

  • CKS – 中科芯微 0x555 [djix123]
  • GigaDevice 0x751 [mean]

Device Descriptor IDs Added:

  • Unknown ARM [dragonmux]
  • Xilinx [dragonmux]
  • Xambala: RVDBG013 [dragonmux]
  • Gigadevice BSD [dragonmux]

Host Platform Changes

Added

  • Added stm32f4x1 blackpillv2 as a variant of f4discovery [aam335]

Common

  • DFU/CDC-ACM: Consolidated usage of ST and BMP serial numbers [UweBonnes]
  • Updated libopencm3 to 9c42fb [UweBonnes]
  • Correct the USB CDC iface struct to not indicate AT support as we are not a modem [Ho-Ro]
  • Added space in the USB product string to consolidate the product string between the DFU bootloader and application firmware [Ho-Ro]
  • Increase timer tick frequency from 10Hz to 100Hz [UweBonnes]
  • Changed the CDCACM and DFU interface descriptors to point correctly to their respective string descriptors [UweBonnes]
  • Decrease the amount of magic numbers in USB descriptors [UweBonnes]

stm32 host (Common to all stm32 hosts)

  • Use libopencm3 defines for UNIQUE_SERIAL and FLASH_SIZE register locations [UweBonnes]
  • Added DFU_IFACE_STRING for STM32F7 hosts [UweBonnes]
  • Use DMA for USB USART TX/RX [Vestrel]
  • Made DMA stream handling not STM32F4 specific [UweBonnes]
  • Portability improvements to help with stlinkv3 support [UweBonnes]
  • USB USART: Clear USART_ICR if provided [UweBonnes]
  • Allow compilation for STM32F0 [UweBonnes]
  • Added blocks to ISR template macros [esden]
  • USB USART: Remove duplicate definition of USBUSART_DMA_TX_ISR [mikeditto]

BlackMagicProbe aka. Native host

  • Fixed high current draw issue that was causing the BMP hardware run hot [UweBonnes]
  • Use DMA for USB USART TX/RX [Vestrel]
  • Update hwversion detection for hw rev 4 and newer [esden]
  • Set vbus sense pin to PA15 for hw rev 5 [esden]
  • Added hw rev 5 AUX interface definitions [esden]
  • doc: Improved pinout legend comment block [esden]
  • Added support for hw rev 6 [esden]
  • Fixed USB USART support for hw rev 6 [esden]
  • Fixed a hwversion issue with some older BMP revisions [esden]

f4discovery host

  • Decreased JTAG slew rate to avoid ringing [UweBonnes]
  • Added BMP_BOOTLOADER compile flag that allows building of the firmware for the ST bootloader instead of the Black Magic Debug bootloader [UweBonnes]
  • Fixed sector_erase in the DFU bootloader on the f4 platform [UweBonnes]
  • Use DMA for USB USART TX/RX [Vestrel]
  • Fixed USB USART [jlutgen]

ST-Link host

  • Reworked and improved documentation [UweBonnes]
  • Decreased IO slew rate to avoid ringing [UweBonnes]
  • Removed dfu_upgrade firmware (use commit 03a7b06e if you still have the old bootloader and need to upgrade) [UweBonnes]
  • Use DMA for USB USART TX/RX [Vestrel]

sw-link host

  • Decreased IO slew rate to avoid ringing [UweBonnes]
  • Removed dfu_upgrade firmware (use commit 03a7b06e if you still have the old bootloader and need to upgrade) [UweBonnes]
  • Use DMA for USB USART TX/RX [Vestrel]
  • doc: corrected SWO/RX2 header location for blue pill [justinkb]

Hydrabus host

  • Use DMA for USB USART TX/RX [Vestrel]

lm4f (TI ICDI) host

  • Fix ICDI USB error Issue #748 [daguirrem]

PC host

  • BMP: Added option to disable high level Black Magic Probe commands [UweBonnes]
  • BMP: Report if the Black Magic Probe hardware is in bootloader mode. [UweBonnes]
  • BMP: Fix JTAG high level function use. Fall back to low level when high level functions are not available yet. [UweBonnes]
  • USB: Decreased report size to 64, otherwise MIMRXT10x0-EVK crashes when reading larger memory blocks [UweBonnes]
  • Fixed core register read [UweBonnes]
  • Corrected data length used with read_block [UweBonnes]
  • BMP: Check for protocol version of the BMP and fall back to low level JTAG protocol when the remote version does not match. [UweBonnes]
  • FTDI probe: Fix FTDI support by checking for libftdi version 1.5 or newer [UweBonnes]
  • A bunch of memory leak fixes [UweBonnes]
  • BMP: Deprecated the -p BMP serial port path option [UweBonnes]
  • USB: Ignore USB hubs and print the device class when unable to open [UweBonnes]
  • ST-Link v2 probe: Try harder to open an Access Port (problems seen on STM32L0) [UweBonnes]
  • Wait for response based on the cortexm_wait_timeout as opposed to a define [UweBonnes]
  • Print version with -h and -p options [UweBonnes]
  • Read target voltage only once [UweBonnes]
  • Remove duplicate free calls in platform_adiv5_swdp_scan and jlink_adiv5_swdp [UweBonnes]
  • JLink: Added a catch for no target connected errors [UweBonnes]
  • JLink: Removed SWD frequency setting as it is fixed for JLink [UweBonnes]
  • JLink/swd_low_access: Fixed data direction during response read phase [UweBonnes]
  • Recognize “J-Trace Cortex-M PRO V2” [eclig]
  • Fixed a bug when no serial device is connected [UweBonnes]
  • Fixed info.serial when the USB device has no serial number [UweBonnes]
  • Removed the FTDI include when building with HOSTED_BMP_ONLY build option set [xobs]
  • Improve handling of the target power (tpwr) setting on the remote [UweBonnes]
  • Fixed an issue where -n was not expecting an argument [UweBonnes]
  • Added -M option that allows execution of target specific monitor commands [UweBonnes]
  • Added -m option that allows selection of targets in an SWD multi-drop setup [UweBonnes]
  • Decreased restrictions to product description strings to allow for RPi Pico pico-debug detection [UweBonnes]
  • CLI: Reworked Flash/RAM printout [UweBonnes]
  • serial_unix: Split read select timeout in seconds and milliseconds as millisecond values above 1000000 cause problems [UweBonnes]
  • CMSIS-DAP: Retrieve probe firmware version [UweBonnes]
  • Added -w option allowing the user to write a binary into the target flash [fabalthazar]
  • Expanded -V option to work together with -w allowing a write/read/compare flash cycle [fabalthazar]
  • FTDI: Corrected the include path [UweBonnes]
  • BMP: Added nul (’\0’) termination to type, version and serial strings on linux systems [stoyan-shopov]
  • BMP: Honor the opt_list_only (-l) parameter [UweBonnes]
  • CLI: When no size is provided read the lowest memory block [UweBonnes]
  • CLI: When JTAG scan fails automatically try SWD [UweBonnes]
  • docs: Document the BMP only build in the README [UweBonnes]
  • ST-Link: Detect STLink v3 in bootloader mode [UweBonnes]
  • CMSIS-DAP: Fix dap_read handling when reading non word aligned data [UweBonnes]
  • CMSIS-DAP: Handle ADI DP22 devices on probes without multidrop capability [UweBonnes]
  • CMSIS-DAP: Cleanup and added v2 interface support [zyp]
  • gdb: Added more verbose error messages [UweBonnes] [pshri]
  • Compilation warning cleanup, including adding missing header includes [UweBonnes]
  • CLI: Added help for -l option [UweBonnes]
  • CMSIS-DAP: Fixed erroneous left over parameter to dap_swdptap_init [UweBonnes]
  • BMP: Reject devices that have the same VID but not the BMP PID [UweBonnes]
  • Use strncmp instead of strcmp for name comparisons to ignore any appended version numbers [UweBonnes]
  • BMP: Autodetect more BMP string variants [UweBonnes]
  • CLI: Fixed a file size bug [UweBonnes]
  • CLI: Fix an issue where opt_flash_size was not set correctly in FLASH_WRITE_VERIFY mode [UweBonnes]
  • BMP: Check for CMSIS-DAP only when no other probe found [UweBonnes]
  • FTDI: Export and use reset functions [UweBonnes]
  • ftdi_bmp: Fix setting bits and FTDI JTAG soft reset [UweBonnes]
  • CLI: Added -Rh command that allows hardware reset from the command line [UweBonnes]
  • CMSIS-DAP: Fixed tdi_tdo_seq [UweBonnes] partially reverted by [dragonmux]
  • ftdi_bmp: Add more verbose debug output to libftdi_jtagtap_tdi_tdo_seq() [UweBonnes]
  • ftdi_bmp: Fix error when compiling with HOSTED_BMP_ONLY=1 [UweBonnes]
  • Made HOSTED_BMP_ONLY the default to make compilation easier [UweBonnes]
  • Set GCC as the default compiler [UweBonnes]
  • Corrected platform delay calculation to result in ms sleep not us [UweBonnes]
  • CLI: Increased speed by increasing worksize [UweBonnes]
  • docs: Updated README to use HOSTED_BMP_ONLY vs HOSTED_BMP [amakovec]
  • BMP: Removed duplicate libusb_init [UweBonnes]
  • ftdi_bmp: Fixed bit select bug [UweBonnes]
  • CMSIS-DAP: Copy command buffer in wait/retry loop, to prevent part of the command to be overwritten before it’s retried [zyp]
  • BMP: Made the return values of the BMA in erase mode consistent and made HOSTED_BMP_ONLY=0 default on Linux [fabalthazar]
  • ST-Link: Added “ST-Link V3 no msd” ID [UweBonnes]
  • BMP: Improved error propagation [UweBonnes]
  • FTDI: Enable 60MHz on fast devices
  • ST-Link V2: Read target ID on DPv2 devices [UweBonnes]
  • CMSIS-DAP: Fix CMSIS-DAP related memory leak [UweBonnes]
  • Set reset type on every device [UweBonnes]
  • CMSIS-DAP: Only CMSIS internal use must differentiate between HID and Bulk access [UweBonnes]
  • CMSIS-DAP: Always work on a copy of the buffer when calling dbg_dap_cmd() in a loop [UweBonnes]
  • Export BMP_TYPE in ARM Debug Port handler [UweBonnes]
  • ST-Link: Fix low level access to Access Port registers [UweBonnes]
  • CMSIS-DAP: Print messages when transfers fail [UweBonnes]
  • CMSIS-DAP: Link against libhidapi-hidraw instead of libhidapi-libusb. The latter detaches the kernel module and does not reattach it again [UweBonnes]
  • CMSIS-DAP: Always trasfer 65 bytes with hid_read|write() [UweBonnes]
  • CMSIS-DAP: Implement srst_set_val() [UweBonnes]
  • CMSIS-DAP: Access Port reads are posted. Read from RDBUFF [UweBonnes]
  • CMSIS-DAP: Removed dp_low_read() and use exception protected dp_read() instead [UweBonnes]
  • CMSIS-DAP: Use exception in wait_word() [UweBonnes]
  • CMSIS-DAP: Run time detect DAP_SWD_SEQUENCE [UweBonnes]
  • CMSIS-DAP: Write only the necessary data in dap_swdptap_seq_out [UweBonnes]
  • CMSIS-DAP: Added timeout to bulk commands [UweBonnes]
  • CMSIS-DAP: Added error returns when bulk transfers time out [UweBonnes]
  • CMSIS-DAP: Allow transfer sizes to deal with words [UweBonnes]
  • CLI: Assert if Flashing succeeded or failed once the last buffer has been written [fabalthazar]
  • CLI: Allowing the use of monitor commands as preliminary actions [fabalthazar]
  • CMSIS-DAP: Make the assert parameter to dap_srst_set_val a bool [koendv]
  • USB: Additionally to Hub device class also exclude Wireless device class when scanning for Probes [UweBonnes]
  • JTAG: Write DO generation code in an endian-independent way [UweBonnes]
  • FTDI: Fix crash caused by the use of an out of date variable [UweBonnes]
  • USB: Restrict the scope of the probe type variable [UweBonnes]
  • FTDI: Fix bad length calculation in the MPSSE version of swdptap_seq_in() [UweBonnes]
  • CMSIS-DAP: Corrected tdi_tdi_seq to take into account that not all platforms have division [dragonmux]
  • bmp_libusb: Formatting cleanup [dragonmux]
  • bmp_libusb: Fixed some signed/unsigned issues and UB in send_recv [dragonmux]
  • bmp_libusb: Rewrote the string reader logic to not violate the USB spec and properly handle libusb errors [dragonmux]
  • ST-Link V2: Rewrote the serial number reading logic to not violate the USB spec and properly handle libusb errors [dragonmux]
  • ST-Link V2: Fix !found check causing hosted to continue on anyway, and improved the error reporting from the device finder loop [dragonmux]
  • platform: Formatting consistency improvements [dragonmux]
  • ST-Link V2: Cleaned up the new error messages as they weren't outputting nicely [dragonmux]
  • CMSIS-DAP: Fixed some more communication issues [mubes] [dragonmux]

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
Compare
Choose a tag to compare

Changes since V1.7:

  • version.h now reflects the latest tag.

Otherwise the version is misleading for users and problem reports.

Compare
Choose a tag to compare
  • More FTDI work
  • Hosted can auto-detect BMP firmware also on Windows and Darwin
  • Many bug-fixes, enhancements amd more devices
    w.r.t. 1.6.2-rc0
Compare
Choose a tag to compare
  • Support BMP/remote, Stlink, Jlink and CMSIS-Dap with a single executable.
  • Export BMP high level procedures for use with hosted and other programs.
  • Bump up version to allow fallback to low level BMP remote function when BMP firmware is too old.
Compare
Choose a tag to compare

We are happy to announce the release of V1.6.1 Black Magic Probe firmware.

Black Magic V1.6.1

This version ships on V2.1 Black Magic Probe hardware with serial number 158 and higher.

Change Log

  • Fixed a possible crash (issue #222) caused by an error in the logic freeing removed breakpoints.
Compare
Choose a tag to compare

We are happy to announce the release of V1.6 Black Magic Probe firmware.

In the past we were considering releases that were shipping on Black Magic Probe hardware as stable releases without official release notes. This is an attempt to put together most important changes that were happening between the different tagged revisions of the repository.

Black Magic V1.6

This version shipps on V2.1 Black Magic Probe hardware.

This version has been tested using the new bmp-test suite. The results of the tests can be found in the V1.6 release GitHub Issue.

Change Log

  • kinetis: Check and fix the flash config bytes after completing flash write to prevent the user from bricking the target device.
  • Keep TMS high during reset to prevent K22F from going into the EzPort mode and makes the flash unusable and disables the rest of the microcontroller.

Known Bugs

  • In some cases the NRF52 target can not be flashed. (seems to depend on the board used, @gsmcmullin Sparkfun NRF52 breakout board flashes reliably wheras @esden Sparkfun NRF52 breakout can not be flashed)

Black Magic V1.6-rc1

An intermediate RC1 version shipped on Black Magic Probe V2.0. The final RC1 never shipped on any official hardware.

New Platforms

Platforms are devices that the Black Magic Probe firmware can be compiled for and run on.

  • Black Magic Probe V2.0
  • Black Magic Probe V2.1
  • HydraBus
  • Digilent JTAG-HS3 FDTI cable
  • New versions of ST Discovery boards.

New Targets

Targets are processors/architectures that the Black Magic Probe can be connected to.

  • SAM3U
  • STM32L0 (additional device IDs)
  • STM32L4
  • STM32F2
  • STM32F302C8
  • STM32F303
  • STM32F446x
  • STM32F7
  • EFM32/EZR32
    • Including EZR32LG & EZR32WG
  • NRF52
  • KL03
  • KL27
  • LPC82x
  • LPC15xx
  • EFM32HP
  • SAM4L
  • Experimental Cortex-A support
    • Xilinx Zynq
    • RaspberryPi V2 32bit

Change Log

  • Most flash stubs rewritten in C and generated for better maintainability.
  • Added exception handling mechanism inside the probe firmware. Replacing variaty of platform specific error handling mechanisms.
  • Removed unfinished ARM7TDMI driver. If someone is interested in taking over that project contact us in the gitter channel.
  • Removed old STM32L1 driver in favor of the more generic STM32L0/STM32L1 driver.
  • Reworked flash memory driver interface.
  • Fixed VBUS handling on STM32F4 platform, preventing excessive current draw.
  • Fixed F0 flash block size.
  • Fixed stm32f1 probe returning always true.
  • Fixes allowing building of the libftdi target for Windows.
  • SRST handling cleanup.
  • Fixed platform_delay returning before the timout has expired.
  • Fixed BMPM TPWR control. (Needed to be open drain drive)
  • Added ENABLE_DEBUG build option, adding the debug enable monitor command. Prints debug messages to the UART CDCACM USB interface or if an SWD debugger is detected the messages are printed using semihosting through the "inception" debugger.
  • Added nested timeout timer support.
  • Refactor of the target specific code to be independent of the GDB code using a dedicated API.
  • Catch UART errors.
  • STM32L4: Use buffered flash model.
  • Added Travis CI builds.
  • libftdi: Disable Nagle algorithm and buffer sends.
  • Kinetis: Added special handling of the flash config bits as they sit in the middle of the flash and can be easily set to blick the device.
  • Increased STLink flash allowance to 128kb as we can not fit the firmware in it any more. (all known STLinks come with larger than advertised flash)
  • Inhibit SRST on Tiva targets, because Tiva seems to be resetting the debug interface together with the system.
  • STM32F4 target now translates ITCM addresses to AXIM addresses on flash write.
  • Add GDB packet length checking. (it is possible to create misreported length packets using the GDB scripting API)

Black Magic V1.6-rc0

This version shipped on Black Magic Probe V2.0 hardware.

New Platforms

Platforms are devices that the Black Magic Probe firmware can be compiled for and run on.

  • Added STLink V1 & V2
  • Added libftdi
  • Added STM32F4-Discovery
  • Added F401Discovery
  • Added swlink
  • Added USPS_F407 and removed again
  • Removed stm32_can

New Targets

Targets are processors/architectures that the Black Magic Probe can be connected to.

  • SAM3X
  • SAM3N
  • SAMD20
  • SAM3S
  • SAM4S
  • STM32F3
  • STM32F0
    • STM32F03x
    • STM32F05x
    • STM32F07x
  • STM32L0
  • STM32L1
  • LPC812
  • LPC1114
  • LPC43xx dual core
  • LPC4337 (flash support)
  • NRF51
  • TM4C
  • KL25

Change Log

  • Use the same LED for run/idle. Reserve spare LED for UART activity.
  • Added mass_erase command for the STM32F1 target.
  • Fixed crash on monitor commands with no attached target.
  • Added option byte programming for STM32F1 target.
  • Added support for user specified JTAG IR lengths.
  • Moved all static data to the heap.
  • Added timeout to target attach.
  • Fixed corrupting un-aligned memory reads from target.
  • Added UART support for stlink platform.
  • Added DFU bootloader for the stlink platform.
  • Added STM32F0/3 option byte programming support.
  • Added waking up a target by using SRST on connect.
  • Added semihosting support.
  • Improved USBUART reliability.
  • LPC43xx improvements.
  • Added dfu_upgrade tool.
  • Added hardfault unwinding.
  • Added TPWR monitor function.
  • Fixed USB-UART parity support.
  • Satisfy hosts that require 0 filled packets to accept a complete CDCACM packet transfer.

Black Magic production_01

Second official release, shipped on hardware ???.

TODO: Changes

Black Magic production_00

Initial release, shipped on hardware ???.

Compare
Choose a tag to compare

v1.6-rc1

Pre-release
Pre-release
Release candidate v1.6-rc1