Skip to content

Instantly share code, notes, and snippets.

@k2qwerty2k
k2qwerty2k / OpenOCD STM32CubeIDE fix.md
Last active February 26, 2024 21:33
STM32CubeIDE OpenOCD fix CS32F103 ReadAPEx not STM device

Fix OpenOCD debug in STM32CubeIDE for clones, like CS32F103 on Linux

  1. Find st_scripts directory for OpenOCD with file mem_helper.tcl, or other file with scripts, in plugins directory of STM32CubeIDE
  2. Append to file
proc _find_target {apnum} {
	foreach t [target names] {
		if {[$t cget -ap-num] == $apnum && [$t cget -type] == "mem_ap"} {