openocd built with zig build system
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-03 23:03:10 +01:00
.github/workflows Initial commit 2026-11-03 23:03:10 +01:00
src Initial commit 2026-11-03 23:03:10 +01:00
build.zig Initial commit 2026-11-03 23:03:10 +01:00
build.zig.zon Initial commit 2026-11-03 23:03:10 +01:00
README.md Initial commit 2026-11-03 23:03:10 +01:00

CI

openocd

This is openocd, packaged for Zig.

Usage

Safe builds are triggering ubsan, so fast/small needs to be used.

To use the binary directly you can just do:

zig build -Doptimize=fast run -- -f interface/cmsis-dap.cfg -f target/rp2350.cfg

To use in build.zig.zon you first need to add it via:

zig fetch --save git+https://github.com/allyourcodebase/openocd.git

And after that you can just use the openocd artifact and tcl named lazy path in your build.zig with:

const openocd_dep = b.dependency("openocd", .{
    .optimize = .fast,
});
const openocd_run = b.addRunArtifact(openocd_dep.artifact("openocd"));
openocd_run.addArg("-s");
openocd_run.addDirectoryArg(openocd_dep.namedLazyPath("tcl"));