A repeatable first debug session with STM32
Establish SWD access and a minimal firmware baseline before adding application complexity.
Start with the board documentation
Identify the exact STM32 device and board revision. Check whether the board includes an ST-LINK probe or requires an external one, then confirm the debug connector pinout and target voltage requirements. A connector that physically fits is not evidence that its signals match.
Establish the debug path
ST’s STM32CubeIDE guide describes both SWD and JTAG and generally prefers SWD. Select the interface supported by the board and verify the probe, target power, ground reference, and debug wiring. Keep reset available when the hardware supports it; ST documents connect-under-reset as a recovery option for some connection failures.
Prove a minimal program
Build a small project for the exact target and stop at a known breakpoint. Inspect a variable, continue execution, and repeat after a power cycle. Record the probe firmware, tool version, selected device, and connection settings. This is the baseline to return to when application changes introduce a failure.
Separate connection from application faults
A missing probe, an inaccessible target, and a program that immediately faults are different failures. Preserve the original diagnostic message. Review any firmware change that reassigns debug pins or enters a low-power state, and consult the device-specific reference before changing security or boot settings.
Primary references
Read these alongside the exact device documentation. The workflow above is an editorial synthesis, not a report of a completed hardware test.