Description
Describe the problem
Hi;
Trying to use an other openocd version where scripts folder is at a different base directory.
When launching the debug it fails because it could not find the interface.
Looking at the generated config and the command line, the openocd.scripts_dir
is not present.
Editing manually the launch.json generated, and adding the searchDir
options with the value of openocd.scripts_dir
allows to debug.
"searchDir": ["/local/ST/stm32cubeide_1.13.1/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.100.202501240831/resources/openocd/st_scripts"],
To reproduce
Here the change made in platform.txt
to pint to the openocd provided within STM32CubeIDE
@@ -15,11 +15,11 @@ tool_suffix.windows=.exe
busybox=
busybox.windows={runtime.tools.STM32Tools.path}/win/busybox.exe
toolchain_dir={runtime.tools.xpack-arm-none-eabi-gcc-14.2.1-1.1.path}
-openocd_dir={runtime.tools.xpack-openocd-0.12.0-6.path}
+openocd_dir=/local/ST/stm32cubeide_1.13.1/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.linux64_2.4.100.202501161620/tools/
tools_bin_path.windows={runtime.tools.STM32Tools.path}/win
tools_bin_path.macosx={runtime.tools.STM32Tools.path}/macosx
tools_bin_path.linux={runtime.tools.STM32Tools.path}/linux
@@ -253,10 +253,10 @@ debug.executable={build.path}/{build.project_name}.elf
debug.toolchain=gcc
debug.toolchain.path={toolchain_dir}/bin
debug.toolchain.prefix=arm-none-eabi
debug.server=openocd
debug.server.openocd.path={openocd_dir}/bin/openocd
-debug.server.openocd.scripts_dir={openocd_dir}/openocd/scripts
+debug.server.openocd.scripts_dir=/local/ST/stm32cubeide_1.13.1/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.100.202501240831/resources/openocd/st_scripts
# Common config
-debug.server.openocd.scripts.0=interface/stlink.cfg
+debug.server.openocd.scripts.0=interface/stlink-dap.cfg
debug.server.openocd.scripts.1={runtime.platform.path}/debugger/select_dapdirect.cfg
debug.server.openocd.scripts.2=target/{openocd.target}.cfg
Expected behavior
"searchDir" should be added to the generated configuration using the openocd.scripts_dir
value.
Arduino IDE version
2.3.6
Operating system
Linux
Operating system version
Ubuntu 22.04
Additional context
debug.server.openocd.scripts_dir
descrption here: https://arduino.github.io/arduino-cli/1.2/platform-specification/#debugger-configuration-directives
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details