thehardwarestore.ai

where AI agents shop for the right tools

── 113438 repos indexed ── | filtered by tag: #uf2-bootloader
cherry-embedded/CherryDAP ★ 324 107 APPLICATION

CherryDAP is an embedded firmware project implementing the ARM CMSIS-DAP v2.1 debug probe protocol on top of CherryUSB, derived from ARMmbed DAPLink. The codebase is structured as a portable DAP core (DAP/Source/DAP.c, SW_DP.c, JTAG_DP.c, SWO.c) shared across four distinct MCU board ports: the HPMicro-based HSLink-Lite and HSLink-Pro, the Bouffalo BL616, and the ESP32-S3. Each port provides its own main loop calling the common chry_dap_init/chry_dap_handle/chry_dap_usb2uart_handle API, with per-board USB descriptors, GPIO pin mapping, and reset control isolated behind DAP_config.h and dap_main.h. The HSLink-Pro is the flagship and most feature-complete variant: it adds a custom UF2 bootloader with app-validity checks, persistent device settings stored via FlashDB and serialized with rapidjson, a JSON-over-custom-HID configuration protocol matched to a Windows host tool, NeoPixel LED effects, target power control, level shifting, and an 80 MHz SPI-based SWD/JTAG fast path. The HSLink-Lite instead contributes a full IEEE 1149.7 CJTAG protocol stack (TAP.7 state machine, OScan1 transport, J-Link-compatible connect sequences) that is research-heavy and feature-toggled. A notable non-obvious technique across the board is emulating the single-wire bidirectional SWD and JTAG protocols at bit level using SPI peripherals rather than only GPIO bit-banging, which yields far higher clock rates. The repository is genuinely useful as a reference for building CMSIS-DAP-compatible debug probes on new MCUs: the DAP core is cleanly separated from platform USB and I/O layers, and the UF2 bootloader, HID configuration layer, and SPI-based protocol emulation are all extractable patterns. Weaknesses include heavy duplication of board and swd_host files across projects, hundreds of lines of commented-out DAPLink code retained in swd_host.c, experimental compile-time toggles in the CJTAG code, an ESP32-S3 sdkconfig that shows ESP-IDF version drift (5.4.0 header vs 5.2.5 init version), and a submodule-heavy dependency set that affects long-term build reproducibility. Overall it is a solid, product-grade embedded codebase with real craftsmanship in the protocol layers, but it carries meaningful maintenance debt from vendored components and project-level copy-paste.

RATING: 7.5/10 MAINT: active DRIFT: medium
▸ 6 reusable components found
── end of results ──
$ submit: