Add support for your own target MCUs and custom OpenOCD paths without recompiling ProbeCodex.
ProbeCodex ships with built-in configurations for common MCU families (STM32, Nuvoton, NXP, etc.). When you need to debug a target that isn't built-in, you can add it via a JSON config file.
Configured in custom-probes.json. Describes the USB debug adapter (J-Link, ST-Link, etc.) - the device plugged into your computer.
Configured in custom-targets.json. Describes the MCU on your board - the chip being debugged. Maps to OpenOCD target config files.
Create a file at ~/.probecodex/custom-targets.json
~/.probecodex/custom-targets.json%USERPROFILE%\.probecodex\custom-targets.json/Users/you/.probecodex/custom-targets.jsonAlternatively, use the target_add_custom MCP tool to add targets programmatically from within Claude Code.
{
"customTargets": [
{
"id": "my_custom_mcu",
"target": "stm32f4x",
"flashBase": "0x08000000",
"notes": "My custom board with STM32F407"
},
{
"id": "m480_custom",
"target": "numicroM4",
"flashBase": "0x00000000",
"openocd": "/opt/custom-openocd/bin/openocd",
"notes": "Nuvoton M480 with custom OpenOCD path"
}
],
"customOpenOcd": {
"nuvoton": "/my/custom/path/to/nuvoton-openocd",
"standard": "/my/custom/path/to/openocd"
}
}| Field | Required | Description |
|---|---|---|
| id | Yes | Unique lookup key. Matched case-insensitively with partial matching (e.g., "m483" matches "m483sidae") |
| target | Yes | OpenOCD target config file name (e.g., stm32f4x, numicroM4, cortex_m) |
| flashBase | Optional | Flash base address as hex string (e.g., 0x08000000). Defaults to 0x00000000 |
| openocd | Optional | Path to a specific OpenOCD binary for this target (e.g., a Nuvoton OpenOCD fork) |
| notes | Optional | Human-readable description |
Global OpenOCD path overrides by variant. Use this when your OpenOCD installations are at non-standard paths.
| Field | Description |
|---|---|
| nuvoton | Path to Nuvoton OpenOCD binary (used for Nu-Link probes and Nuvoton targets) |
| standard | Path to standard OpenOCD binary (used for all other targets) |
Adding a target for a custom board with an unsupported MCU:
{
"customTargets": [
{
"id": "my_board_v2",
"target": "stm32h7x",
"flashBase": "0x08000000",
"notes": "Custom H7 board with dual-bank flash"
}
]
}Using a Nuvoton OpenOCD fork installed at a non-standard location:
{
"customTargets": [
{
"id": "m480",
"target": "numicroM4",
"flashBase": "0x00000000",
"openocd": "/opt/nuvoton-openocd/bin/openocd",
"notes": "Nuvoton M480 - custom OpenOCD build"
}
]
}Custom targets with the same ID as a built-in target will override it:
{
"customTargets": [
{
"id": "stm32f4",
"target": "stm32f4x",
"flashBase": "0x08020000",
"notes": "STM32F4 with bootloader offset"
}
]
}Note: This overrides the built-in stm32f4 config, changing the flash base address for all STM32F4 targets.
Set custom OpenOCD paths globally without specifying per-target:
{
"customTargets": [],
"customOpenOcd": {
"nuvoton": "/home/user/nuvoton-tools/OpenOCD/bin/openocd",
"standard": "/opt/openocd-0.12/bin/openocd"
}
}You can add custom targets directly from Claude Code using the target_add_custom MCP tool, without manually editing the JSON file.
Using a known preset ID auto-fills defaults. On Windows, Nuvoton presets also auto-detect the OpenOCD path.
| Preset ID | Target | Flash Base | Notes |
|---|---|---|---|
| nuvoton_m483 | numicroM4 | 0x00000000 | Nuvoton M483 (Cortex-M4F) |
| nuvoton_m467 | numicroM4 | 0x00000000 | Nuvoton M467 (Cortex-M4F) |
| nuvoton_m2354 | numicro | 0x00000000 | Nuvoton M2354 (Cortex-M23) |
Some targets require specific OpenOCD builds (e.g., Nuvoton chips require the Nuvoton OpenOCD fork). If your OpenOCD is installed at a non-standard location, you can configure the path in two ways:
Set the openocd field on a specific target entry. Only that target will use the specified binary.
"openocd": "/opt/my-openocd/bin/openocd"
Set paths in the customOpenOcd section. Applies to all targets of that variant (nuvoton or standard).
"customOpenOcd": {
"nuvoton": "/path/to/nuvoton-openocd"
}When resolving which OpenOCD binary to use, ProbeCodex checks in this order:
openocd fieldcustomOpenOcd paths (nuvoton/standard)openocd)ProbeCodex includes built-in configurations for these MCU families. Custom targets with the same ID will override these.
stm32f0, stm32f1, stm32f2, stm32f3, stm32f4, stm32f7
stm32g0, stm32g4, stm32h7
stm32l0, stm32l1, stm32l4, stm32l5
stm32u5, stm32wb, stm32wl
Flash base: 0x08000000
m031, m251, m261 (Cortex-M0/M23)
m460, m480 (Cortex-M4)
m2354 (Cortex-M23)
Flash base: 0x00000000 | Requires Nuvoton OpenOCD
lpc11, lpc17, lpc55, kinetis
Flash base: 0x00000000
cortex_m, cortex_m0, cortex_m3, cortex_m4, cortex_m7
Use as fallback when specific target isn't available
target field matches an actual OpenOCD config file name (e.g., stm32f4x, not stm32f4)flashBase is a valid hex string with 0x prefixC:\\Program Files\\...)Contact support via the Portal Support Chat with your target MCU details and we'll help you configure it.