typ
typ

Reputation: 55

How can i start the GDB server in stm32cubeide?

right now I am trying to program on the STM32G0-Disco-board with the program stm32cubeide on WIN10. This worked fine until it didn't. My problem right now is that I can't debug/run it anymore. This is the first day I used this program, which doesn't mean it didn't worked at the beginning. Building, Debugging and Running worked just fine. But now I get this error message:

Error in final launch sequence:

Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (4) No device found on target.

I already tried multiple usb-ports, the jumper on the board. I even looked in this Batchfile: C:\ST\STM32CubeIDE_1.3.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_1.3.0.202002181050\tools\bin ST_LINK_gdbserver because it was mentioned in other threads and i just got this:

ERROR: Couldn't locate STM32CubeProgrammer in '..\STM32CubeProgrammer\bin\', use -cp GDB server exited. And oh yeah i already looked into the device manager and everything looks good to me.

Help is much appreciated!

Upvotes: 4

Views: 29627

Answers (4)

This error also can be caused because the microcontroller is not been powered by the main power source. The SWID interface sometimes is setup in the PCB for not been able to power the microcontroller but only programming.

Upvotes: 1

gms89
gms89

Reputation: 1

I had the same problem, thank you Chris for your suggestions!

To be clear, these are the steps I followed:

  1. short BOOT0 to +3.3V (BOOT0 and 1 are pulled low via 1K on my board)
  2. cycle power with the short in place
  3. remove the short
  4. cycle power again
  5. good to go!

Upvotes: 0

bishoy
bishoy

Reputation: 46

I had the same problem and i managed to solve it . It turns out that my antivirus software (avast) was preventing the debugger from starting by removing the file ST_LINK_gdb.exe from its place and putting it in the antivirus chest.enter image description here

The solution was to open the virus chest and and restore the file and also add an exception. And this solved the problem.enter image description here

Upvotes: 3

Chris
Chris

Reputation: 1

Short BOOT0 (see the pinout of your board) to the 3.3 V, then power cycle, and program it

Upvotes: 0

Related Questions