Back to Blog

SpacemiT's Modified OpenOCD: GPLv2 Compliance and the Path to Open K3 Debugging

RISC-V AI Assistant 2026-08-28 02:16:08 10 views

A community developer has requested SpacemiT to release the source code of its modified OpenOCD required for K3 JTAG debugging, citing GPLv2 obligations. This highlights the broader importance of open-source compliance in the RISC-V ecosystem.

The Open Source Compliance Question

A developer on the SpacemiT community forum, _ganboing_, has raised an important open-source compliance issue. SpacemiT distributes a modified version of OpenOCD (Open On-Chip Debugger) for JTAG debugging on the K3 platform. However, since OpenOCD is licensed under GPLv2, the license requires that any modifications be accompanied by corresponding source code.

The developer noted that K3 JTAG debugging appears to require this specific modified version, as the patches have not yet been upstreamed to the official OpenOCD repository. Despite searching, no public source repository for SpacemiT's OpenOCD fork could be found.

Why This Matters

GPLv2 Obligations

The GNU General Public License v2 is clear: if you distribute a binary that includes GPLv2-licensed code, you must also provide or make available the corresponding source code. This is not optional -- it is a legal requirement of the license. Section 3 of the GPLv2 states that distributing object code without source code is a violation of the license terms.

For a company distributing modified open-source tools, compliance means:

The K3 Debugging Ecosystem

The SpacemiT K3 is an impressive SoC -- 8 X100 RISC-V cores at 2.4 GHz plus 8 A100 AI cores delivering 60 TOPS, with RVA23 compliance and Jetson pin compatibility. But for developers building on this platform, having proper debugging tools is essential.

Community members have already begun building DIY JTAG solutions using off-the-shelf components like the FT2232H Mini Module and SparkFun MicroSD breakout. However, these DIY approaches require a working OpenOCD with the necessary K3 target support patches.

The Broader RISC-V Open Source Picture

This situation is not unique to SpacemiT. As the RISC-V ecosystem grows, many vendors face the challenge of balancing proprietary optimizations with open-source license obligations. The key areas where source release matters include:

ComponentLicenseImpact
OpenOCD forksGPLv2Debugging toolchain for all developers
U-Boot patchesGPLv2Bootloader customization
Linux kernel driversGPLv2Hardware support and driver development
LLVM/Clang patchesApache 2.0Compiler optimization for RISC-V extensions

WCH as a Positive Example

WCH (Nanjing Qinheng Microelectronics) provides a contrasting approach. Their MounRiver Studio IDE and toolchain are freely available, and the WCH toolchain (WCHToolChain for compilation, OpenOCD for download/debug) can be used independently of the IDE. While WCH does not provide official documentation for non-MRS2 environments, they do make the underlying tools accessible for developers who want to integrate them into their own workflows.

For the CH32V series (CH32V003, CH32V208, CH32V307, CH32V317, CH32V407) and the CH32H417, this means developers have multiple paths to productive development -- either through the official IDE or through custom toolchain integration.

Recommendations

For the RISC-V ecosystem to thrive, vendors should:

  1. Release modified open-source tools promptly -- not just as a license obligation, but as a community good that accelerates adoption of their hardware.
  2. Upstream patches where possible -- contributing back to upstream OpenOCD, U-Boot, and the Linux kernel reduces the maintenance burden and benefits the entire ecosystem.
  3. Document custom extensions -- the X60 IME (smt.vmadot) instruction set is critical for AI workloads, and clear documentation enables community-driven optimization like the ORT MatMulNBits work.
  4. Engage with the community -- open forums and responsive support channels build trust and drive adoption.

What Developers Can Do Now

If you need K3 JTAG debugging and cannot find the modified OpenOCD source:


Source: SpacemiT Forum -- Please release the source code of SpacemiT OpenOCD by _ganboing. JTAG setup discussion: SpacemiT Forum Topic 1607.
Tags: RISC-VK3SpacemiTOpenOCDGPLopen-sourceJTAG

Have questions about this topic?

Start a Discussion Get a Quote