Releases: devanlai/dap42
Version 2.0.0
dap42 firmware release 2.0.0
This is a major release adding support for the CMSIS-DAP v2 bulk interface and changing the way the USB stack is processed.
Core changes
Updated CMSIS-DAP to version 2
dap42 now support CMSIS-DAP protocol version 2.1.0. It doesn't support all of the new functionality for SWO/UART, but it at least recognizes all of the latest commands, especially for new fields in DAP_INFO
commands to report version information and capabilities.
dap42 will now report its own firmware version in DAP_INFO
separately from the CMSIS-DAP protocol version. It also reports its serial number.
Updating to CMSIS-DAP 2.0 also improves compatibility with multi-drop targets like the RP2040.
Thanks to @dmsc for the help updating to v2.0 in #17.
Furthermore, thanks to @xobs for adding support for bulk transfers by in #23, which offers a big speedup over the CMSIS-DAP v1 HID interface.
On STM32F042 targets, both the v1 and v2 interfaces are exposed in the same configuration, allowing the host to use whichever interface it supports. On STM32F103 targets, there is not enough space in the USB packet memory area to support both v1 and v2 at the same time. On those targets going forward, the v2 bulk interface is the default selection, but for compatibility, I'm also providing -HID
targets that use the v1 HID interface instead.
The -HID
targets will also report CMSIS-DAP version 1.3.0 instead of 2.1.0 to reflect that they only support the HID interface.
JTAG support
JTAG support is now included, but not enabled on any of the release binaries. Check out the TINYDYNE target for an example that enables JTAG. (Thanks @xobs in #26!)
Automatic WinUSB drivers
To facilitate support on Windows, dap42 now provides MS-OS 2.0 descriptors to automatically bind the WinUSB driver to the CMSIS-DAP v2 bulk interface and the DFU interface, when applicable. This should avoid the need to install drivers manually on recent versions of Windows.
Note: this may not work automatically in all instances, especially on a machine that has already seen dap42 plugged in at least once. You may need to fall back on Zadig instead if this happens.
Interrupt-based USB handler
USB is now handled in an interrupt handler instead of polling from the main loop. To avoid race conditions, we no longer support reading the response via HID GET_REPORT
class request. In practice, it is unlikely this ever could have worked since we need to consume response reports by pushing them to the endpoint buffer.
LEDs and reset lines are now optional
If any of the relevant pin and port definitions are left undefined for LEDs or the reset line, that functionality will be disabled.
Thanks to @xcvista in #6.
Target changes
Bluepill target
The defacto "bluepill" target is now supported as a target. Because the pinout is somewhat arbitrary, I'm not including prebuilt binaries for this target in this release; I encourage you to adapt it to your needs and compile it yourself. Thanks to @Disasm in #9.
STLink/v2-1 Nucleo target
The experimental target for the embedded STLink/v2-1 on Nucleo boards now has the correct UART configuration and has a conventional build target suitable for directly flashing to the STLink/v2-1 (requires some soldering). Thanks to @omicronns in #25.
Because this is experimental and requires soldering and erasing the read-protected bootloader, I'm not including prebuilt binaries for this target in this release.
libopencm3 updates
- The libopencm3 submodule has been updated to [3a85f91] (2025-02-26) (with help from @hemashushu in #19 along the way).
- This fixes a bug in the CDC-ACM implementation that was using the wrong definition for the GET LINE CODING request that I pulled from who knows where.
Build changes
Version 1.31
dap42 firmware release 1.31
This is an incremental release to update to the latest version of libopencm3 and to formalize the DAP42DC hardware target.
Changelog
DAP42DC hardware target
- Derek's standalone DAP42 debugger design now has its own dedicated target:
DAP42DC
. - The pinout is similar to the
BRAINV3.3
target except without CAN support.
libopencm3 updates
- The libopencm3 submodule has been updated to 239b4a4 (2018-10-03).
- Linker scripts now reference
cortex-m-generic.ld
instead oflibopencm3_stm32f0.ld
/libopencm3_stm32f1.ld
- It is no longer necessary for the Cortex-M0 target configurations to provide default USART preprocessor defines for compatibility
- USB control callbacks now use the
usbd_request_return_codes
enum type instead ofint
- The CAN driver no longer passes in the CAN peripheral to
can_filter_id_mask_32bit_init
. I'm pretty sure that parameter is going to come back in a future version of libopencm3 though.
Continuous Integration updates
- The CircleCI 1.0 configuration has been updated to the new CircleCI 2.0 format
- The build toolchain has been updated from gcc-arm-none-eabi-5.2-2015q4 to gcc-arm-none-eabi-6.2-2016q4.
- The toolchain install utility script now detects and complains if the toolchain is not executable due to 32-bit/64-bit compatibility issues.
Prebuilt binaries
Binaries for F042 targets
DAP42.bin
is the firmware for native dap42 hardware.DAP42DC.bin
is the firmware for ISC's standalone DAP42 debugger hardware.BRAINv3.3.bin
is the firmware for dap42 hardware embedded into CalSol's custom LPC1549 development board.
Binaries to flash onto STLink/v2 clones via SWD
DAP103-dapboot-combined-stlink.bin
contains the debugger firmware bundled with the dapboot DFU bootloader.DAP103-stlink.bin
is just the debugger firmware, with no firmware upgrade capabilities.
Binaries to upgrade reprogrammed STLink/v2 clones via DFU
DAP103-DFU-stlink.bin
is just the updated debugger firmware.
Sources
Full source code for the dap42 project can be found online:
- dap42: https://github.com/devanlai/dap42
- dapboot: https://github.com/devanlai/dapboot
- libopencm3: https://github.com/libopencm3/libopencm3
Version 1.30
dap42 firmware release 1.30
This release includes CDC-ACM performance enhancements, CAN->USB support, and a bootloader update.
Changelog
CDC-ACM enhancements
- The serial port now uses a DMA-driven circular buffer for receiving data on the hardware UART.
- On F042 based targets, the receive buffer has been bumped from 128B to 1024B
- On F103 based targets, the receive buffer has been bumped from 1024B to 4096B
- The serial port has been stress-tested up to 2 MBaud on F042 targets and 2.25 MBaud on F103 targets.
- The CDC-ACM driver now uses the USB SOF event for framing transfers instead of a timeout.
CAN->USB support
- CAN-capable targets now expose a second CDC-ACM interface that encodes CAN frames using the slcan/Lawicel CANUSB protocol.
- The slcan interface has been tested with USBtinviewer, the socketcan slcand daemon, and the UAVCAN GUI Tool.
- Only F042-based targets can collect CAN frames while connected over USB.
- Currently, the only official target with CAN enabled is the BRAINV3.3
- To share CAN frames with the debugger, connect the CAN transceiver's RX pin to pin
P0_15
. - The debugger can only receive frames in listen-only/silent mode - it cannot transmit or ACK frames.
- The
BOOT0
pin must be disabled to use CAN - see FLASHING.md for details.
- To share CAN frames with the debugger, connect the CAN transceiver's RX pin to pin
Bootloader update
- The bundled dapboot DFU bootloader for DAP103 STLink targets has been updated from version 1.0 to version 1.10.
- Version 1.10 re-enables DFU upload (reading out the existing firmware) and prevents writing past the end of flash.
- To update the bootloader and the debugger firmware at the same time, you can flash the
DAP103-dapboot-combined-stlink-updater.bin
updater over DFU, which will upgrade the bootloader and install DAP103 version 1.30.
Prebuilt binaries
Binaries for F042 targets
DAP42.bin
is the firmware for native dap42 hardware.BRAINv3.3.bin
is the firmware for dap42 hardware embedded into CalSol's custom LPC1549 development board.
Binaries to flash onto STLink/v2 clones via SWD
DAP103-dapboot-combined-stlink.bin
contains the debugger firmware bundled with the dapboot DFU bootloader.DAP103-stlink.bin
is just the debugger firmware, with no firmware upgrade capabilities.
Binaries to upgrade reprogrammed STLink/v2 clones via DFU
DAP103-DFU-stlink.bin
is just the updated debugger firmware.DAP103-dapboot-combined-stlink-updater.bin
is a bootloader updater that overwrites the bootloader and itself with the contents ofDAP103-dapboot-combined-stlink.bin
after loading it over DFU.
Sources
Full source code for the dap42 project can be found online:
- dap42: https://github.com/devanlai/dap42
- dapboot: https://github.com/devanlai/dapboot
- bootup: https://github.com/devanlai/bootup
- libopencm3: https://github.com/libopencm3/libopencm3
Version 1.20
dap42 firmware release 1.20
This release includes general CDC-ACM UART improvements and BRAINv3.3 support.
Changelog
- On the new BRAINv3.3 target, the embedded debugger can use the target's reset button as a replacement for the
BOOT0
pin to enter the DFU bootloader on power up. - The CDC-ACM RX buffer is now cleared whenever a new serial connection is opened for better compatibility with baudrates besides 115200.
- The CDC-ACM RX endpoint now consumes less USB bandwidth by only sending a packet when the packet buffer is full or after 1ms since the last packet was sent, whichever comes first.
- The CDC-ACM TX endpoint now sends NAKs as needed to prevent the USB host from overflowing the TX buffer.
Prebuilt binaries
- DAP42.bin is the firmware for native dap42 hardware.
- DAP103-dapboot-combined-stlink.bin is firmware for STLink/v2 clone hardware, bundled with the dapboot DFU bootloader.
- DAP103-stlink.bin is also for STLink/v2 clone hardware, but with no bootloader.
- DAP103-DFU-stlink.bin can be used to upgrade an STLink/v2 over DFU if it has a DFU bootloader installed.
- BRAINv3.3.bin is the firmware for dap42 hardware embedded into CalSol's custom LPC1549 development board.
Sources
Full source code for the dap42 project can be found online:
- dap42: https://github.com/devanlai/dap42
- dapboot: https://github.com/devanlai/dapboot
- libopencm3: https://github.com/libopencm3/libopencm3
Version 1.10
Initial dap42 v1.10 firmware release for native dap42 hardware and STLink/v2 clone hardware.
DAP42.bin
is the firmware for native dap42 hardware.
DAP103-dapboot-combined-stlink.bin
is firmware for STLink/v2 clone hardware, bundled with the dapboot DFU bootloader.
DAP103-stlink.bin
is also for STLink/v2 clone hardware, but with no bootloader.
DAP103-DFU-stlink.bin
can be used to upgrade an STLink/v2 over DFU if it has a DFU bootloader installed.