2025-01-09 08:24 AM
Fresh installation of CubeIDE 1.17.0 on Windows 11.
Attempting to program U585 IoT kit following instructions here:
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.
2025-01-09 08:39 AM
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.
2025-01-09 08:52 AM
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
2025-01-09 08:58 AM
What if you just remove the quotes from the path? The double quotes in the error message makes me wonder.
2025-01-09 09:11 AM
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.
2025-01-09 02:35 PM
when you click to show the "Show Command Line" button what does it resolve to?