cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE 1.17.0 Windows 11 cannot launch openocd

sdtbb
Associate

Fresh installation of CubeIDE 1.17.0 on Windows 11.

Attempting to program U585 IoT kit following instructions here: 

https://community.st.com/t5/stm32-mcus/getting-started-with-stm32u5-iot-discovery-kit-and-aws/ta-p/49682

The project builds (with some warnings), but when I attempt to flash with run->run it immediately bails with the error:

Failed to start GDB server
Error launching GDB server. Session terminated
Cannot run program ""${stm32cubeide_openocd_path}\openocd"": Code 0x10b: The directory name is invalid.

This appears to be the default path in the run configuration (and the debug configuration) - problem is I have no idea of the value of the env var stm32cubeide_openocd_path - and whether it does contain a bad path.

I had expected this would "just work" - would be very grateful for any pointers.  Hopefully it's something straightforward. Thanks.

5 REPLIES 5
sdtbb
Associate

I should add I'm able to connect and flash the board (U585 IoT kit) with STMCubeProgrammer V 2.18, using the ST Link on the dev kit - confirming that there is no hardware issue.

sdtbb
Associate

I was able to get CubeIDE working by manually entering the full path to openocd installed during the CubeIDE installation:

C:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.openocd.win32_2.4.0.202409170845\tools\bin\openocd.exe

This is great - but seems kind of a hack. I'll see if there's a way to view / update the env var stm32cubeide_openocd_path

What if you just remove the quotes from the path? The double quotes in the error message makes me wonder.

If you feel a post has answered your question, please click "Accept as Solution".

Thanks for the suggestion - I tried removing the quotes and I get the same error (with one less set of quotes in the error message):

Error launching GDB server. Session terminated
Cannot run program "${stm32cubeide_openocd_path}\openocd": Code 0x10b: The directory name is invalid.

when you click to show the "Show Command Line" button  what does it resolve to?

STM_Thirty2_0-1736462090357.png

 

If you feel a post has answered your question, please click "Accept as Solution"