2020-01-08 04:44 AM
Hello,
Is there a version of openOCD compiled by STM which contains all the latest cards (notably the NUCLEO-G071RB) and is it possible to obtain the command generated by STM32CubeIDE configured with openOCD.
Because I would like to use another IDE (CLION) and I have relative difficulty in configuring openOCD.
Thank you.
Alexis
2020-01-08 04:57 AM
openocd is installed as a plugin during STM32CubeIDE install. You could use that.
When I select openOCD in STM32CubeIde for debugging, the Windows Task-Manager tells the command line:
C:\ST\STM32CubeIDE_1.1.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.openocd.win32_1.1.0.201910081157\tools\bin\openocd.exe -f "Hello_STM32L432_NUCLEO Debug.cfg" -s C:/Users/live/STM32CubeIDE/workspace/Hello_STM32L432_NUCLEO -s C:/ST/STM32CubeIDE_1.1.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug_1.1.0.201910101207/resources/openocd/st_scripts -c "gdb_port 3333" -c "tcl_port 6666" -c "telnet_port 4444"
hth
KnarfB
2020-01-08 06:02 AM
The command will allow me to advance a little more however I work on linux and I do not know if I can use the plugin.
Thank you so much.
There is no downloadable version of openOCD ?
2020-01-08 06:09 AM
I'm afraid you'll have to pick the relevant patches from http://openocd.zylin.com/#/q/status:open and (re-) build openocd for your platform.
E.g. for G0-series http://openocd.zylin.com/#/c/4807/.
2020-01-08 06:28 AM
I modified the command you give me, it seems to work,
/opt/st/stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.linux64_1.1.0.201910081157/tools/bin/openocd -f /home/alexis/Documents/test/test/st_nucleo_g0.cfg -s /home/alexis/Documents/test/test/ -s /opt/st/stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.debug_1.1.0.201910101207/resources/openocd/st_scripts -c "gdb_port 3333" -c "tcl_port 6666" -c "telnet_port 4444"
but I'm not sure that it downloads my program.
2020-01-08 06:29 AM
Same under Linux, but use ps aux | grep ocd :
/opt/st/stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.linux64_1.1.0.201910081157/tools/bin/openocd -f Hello_L432 Debug.cfg -s /home/frank/STM32CubeIDE/workspace_1.1.0/Hello_L432 -s /opt/st/stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.debug_1.1.0.201910101207/resources/openocd/st_scripts -c gdb_port 3333 -c tcl_port 6666 -c telnet_port 4444
2020-01-08 06:29 AM
I tried with another source but it doesn't seem to work, I'm going to try again, Thx
2020-01-08 06:30 AM
I tried with another source but it doesn't seem to work, I'm going to try again, Thx
2020-01-08 06:37 AM
ok it works using the plugin integrated in STM32CubeIDE and configure where is the library and projet generate by STM32CubeMX
/opt/st/stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.linux64_1.1.0.201910081157/tools/bin/openocd \
-f /home/$USER/Documents/test/test/st_nucleo_g0.cfg \
-s /home/$USER/Documents/test/test/ \
-s /opt/st/stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.debug_1.1.0.201910101207/resources/openocd/st_scripts \
-c "gdb_port 3333" -c "tcl_port 6666" -c "telnet_port 4444" \
-c "program \"/home/$USER/Documents/test/test/cmake-build-debug/test.elf\"" \
-c reset
2020-01-08 07:56 AM
BMP (Bl*ck M*g*c Debug probe) https://github.com/blacksphere/bl*ckmagic can be an alternative. Compiled via "make PROBE_HOST=pc-stlinkv2" you can run on an unmodified Stlinkv2 with recent firmware. You either start the resulting executable and connect to port :2000 to debug or you can do some flash modifications on the command line. E.g. "bl*ckm*g*ic_stlinkv2 bla.bin" loads the binary to 0x08000000". Look with -h for more options.