A practical JTAG debugging setup for the SpacemiT K3 CoM260 board using only commercial, off-the-shelf parts: a SparkFun MicroSD breakout board and an FT2232H Mini Module. No custom PCB needed.
The Hardware
The whole setup uses two commercial boards and a handful of jumper wires: - SparkFun MicroSD breakout board - used as a convenient pin breakout to the K3 JTAG header. Its SOIC-8 / DIP-friendly pin pitch and clearly labeled pads make it a great improvised 0.1 inch breakout for the CoM260 JTAG pins. - FT2232H Mini Module - handles USB to JTAG/UART conversion in a single, well-supported FTDI chip. Channel A is wired to the JTAG lines, Channel B to the UART. - Standard jumper wires - for the few signal connections between the breakout and the FT2232H.Why this combination works
1. FT2232H is fully supported by OpenOCD's ft2232 driver. You can declare a SpacemiT-specific adapter config and use the standard JTAG commands immediately. 2. The SparkFun MicroSD breakout's pin order happens to be convenient for stepping out the CoM260 JTAG pins on a 0.1 inch pitch, so no soldering on the K3 itself is required. 3. The FT2232H's second channel gives you a free USB-UART bridge for the K3 debug console, so you only need one USB cable to your host.The author's full pinout, photos, and OpenOCD configuration are published in the upstream repo:
https://github.com/ganboing/K3-Docs/tree/master/hackingSoftware side
For the host side, you have two options: 1. Use the official SpacemiT-maintained OpenOCD build (the one currently distributed from the SpacemiT download page). This build has K3-specific patches and is the simplest path to a working debug session. 2. Use upstream OpenOCD with the K3 target config from the ganboing/K3-Docs repo. This is the cleaner long-term path, but a few of the K3 workarounds live only in SpacemiT's modified build for now (more on this in a separate post).A typical debug session looks like:
# Start the GDB server in one terminal openocd -f interface/ftdi/ft2232h_minimodule.cfg -f board/spacemit-k3.cfg # Connect from GDB in another terminal riscv64-unknown-elf-gdb build/u-boot (gdb) target extended-remote :3333 (gdb) load (gdb) b _start (gdb) cThe same wiring, plus SpacemiT's OpenOCD, can also be used to load and debug OpenSBI and bare-metal programs on the K3 X100 cores, which is exactly the kind of low-level work this build is designed for.
Looking aheadThe same approach scales to the K1 / Lichee Pi 3A as well - the FT2232H is the de-facto standard USB-JTAG adapter for the RISC-V SBC ecosystem, and the K1 Pico-ITX exposes JTAG on the same 0.1 inch header that the K3 CoM260 uses. If you want to learn how the K3 boots from the ground up (OpenSBI then U-Boot then Linux), building this small harness is the lowest-cost entry point.
Acknowledgments and further reading - _ganboing's K3 hacking notes on GitHub: https://github.com/ganboing/K3-Docs/tree/master/hacking - SpacemiT official JTAG tool download: https://spacemit.com/community/resources-download/Tools/JTAG%20debugging%20tool - FT2232H Mini Module datasheet (FTDI) - OpenOCD ft2232 driver documentation Source: 'My setup for JTAG with K3/CoM260' on the SpacemiT developer forum, https://forum.spacemit.com/t/topic/1607.json