Skip to content

3.1. Debugging devboards

Rasmus Wallin edited this page Mar 12, 2025 · 7 revisions

NUCLEO-H755ZI-Q

Debuggin with GDB

How to use GDB run st-util in folder with .elf file, this starts gdb server in MakeFile/CM*/Build run

st-util

somewhere else run

gdb robot_CM7.elf (or other name for the .elf file)

in gdb run

target remote localhost:4242

The :4242 port can in theory change so check the output from the st-util command to be sure

in gdb you can for example run

b main:140

to create a breakpoint at line 140 in the main.c file and you can check the surrounding code by running

l

peace be with you for feeling this desperate, good luck... -- Anton

Can't connect to STLINK

Quick checks:

  1. JP2 is shorted on STLINK.
  2. LD6 (by the st-link LED) is on (alerting on USB overcurrent request). Most likely U11 will be pretty hot as well. Probably something shorted somewhere, you can double-check with an amperage meter. 500 mA should be max that the board consumes through USB, but this tells us it tries to consume more.

Easiest way to debug is generally with the STM32CubeProgrammer. These settings should work: 24-02-11-2251-31

The following from the datasheet might be of interest (bottom of page 25):

  • Board SMPS/LDO firmware power configuration must match with the hardware configuration. If not, the user faces a deadlock: after the reset, STLINK can't connect the target anymore.
  • If a deadlock is faced due to a mismatch between the hardware board setting and the firmware setting (LDO/SMPS), the user can recover the board by doing the following:
  • Power off the board
  • Connect CN11 ‘BT0’ pin (BOOT0) to VDD using a wire
  • This changes the BOOT0 pin to HIGH instead of LOW and thus the device boot address is changed to boot address 1 making the bootloader starting in System memory, instead of starting the firmware in the user Flash (Firmware that is setting a wrong LDO/SMPS configuration)
  • Power on the board and connect using STM32CubeProgrammer
  • Erase the user Flash
  • Power off the board and remove the wire between BOOT0 and VDD
  • The recovery is now completed and the board can be used normally.

If you get: Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication

Then try to set mode to Power down and try again. You probably should erase the memory it if you're allowed to connect after that. Erase the memory by pressing the eraser button at bottom left in STM32CubeProgrammer: 24-02-11-2259-08

Clone this wiki locally