[How to configure STM32CubeIDE for the STLink GDB Debugger]

Instruction

Getting ready

Remote debugging currently does not operate with STMCubeIDE v1.8.0 and potentially higher versions. In the case that you encounter the following error message “Failed to execute MI command: target remote” in your IDE, try to use v1.7.0.

  1. Go to all-hw.com and open Boards page. Choose the board you need and book it.
  2. Visit Connection and Tools page and click “Download Demo Project” link to download the archive with project.
  3. Open the downloaded and extracted project in STM32Cube IDE and build it.

Setup connection

To work with the board, you need to configure your IDE:

  1. Get target information from the Connection and Tools page: device, ip-address and port:

  1. Add the new “Debug Configuration” for STM32 Cortex-M C/C++ Application option:

  1. Well done! Let’s try the remote debug session: you can add breakpoints, watch expression and etc.

The duration of the session may be limited by the board owner. For example, the owner may choose to set a maximum of one hour per session. When the session ends, the below info message will appear in the IDE console.
image

You can also observe the booked board and interact with UART on the Video and Interaction page: