Skip to main content
Explorer II
June 7, 2019
Question

About STM32CubeIDE debug: Open OCD and STLink GDB

  • June 7, 2019
  • 1 reply
  • 7673 views

I can load my code and debug (on a Nucleo-H743) from STM32CubeIDE using OpenOCD GDB server but not with STLink GDB server.

It's not really a problem in itself but I want to understand why.

In both case I setup the autostart of a local GDB server. In STLink GDB server config I setup the SWD interface.

I have to mention that my machine is on a corporate intranet with a lot of IT restrictions, however since it is working fine (both loading and debug) with OpenOCD I guess it's not the root cause ?

Also I don't really understand the difference between both GDB servers/debug configs. Could you give me details or point me to the right documentation ?

Thank you

    This topic has been closed for replies.

    1 reply

    Super User
    February 9, 2021

    I would like to resurrect this thread - for the case when the STM32CubeIDE will not create the Debug Configuration;

    eg, https://community.st.com/s/question/0D53W00000Y2lIsSAJ/cant-usecreate-debug-config-for-oss7-stack

    In such cases, it seems that you'd have to set up your own 'GDB Hardware Debugging' configuration - using openOCD, etc

    See: https://community.st.com/s/question/0D50X0000AyBp0K/is-it-possible-to-debug-a-makefile-project-into-stm32cubeide

    It seems that ST have created their own, modified OpenOCD: https://github.com/STMicroelectronics/OpenOCD - so the question becomes, how to use that "manually" ?

    Super User
    February 10, 2021

    So far, I have defined a 'GDB Hardware Debugging' Configuration:

    0693W000007EjfjQAC.png0693W000007EjghQAC.png0693W000007EjhzQAC.png0693W000007EjiTQAS.png0693W000007EjixQAC.pngYou need to manually start the GDB Server before launching the Debug:

    0693W000007Ejm6QAC.pngSTM32CubeIDE_1.5.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_1.5.0.202011040924\tools\bin

    The 'config.txt' needs to be edited to specify the path to the STM32_Programmer_CLI executable - see comments in the file

    then run the .bat file

    When I start a debug session, I see:

    0693W000007EjqNQAS.png'Resume' goes to:

    0693W000007EjrLQAS.pngand there it seems to be stuck.

    :\