How to Debug STM32 ARM Cortex-M Microcontroller using STM32CubeIDE

The most important aspect of firmware development is debugging. When dealing with bigger projects, many developers struggle to find the bugs in the source code. The use of a professional debugger like STLinkv2 can save countless hours. Also, it's advisable to use the full features of an IDE like STM32CubeIDE and add breakpoints. We can avoid mistakes like the use of a Serial terminal, virtual COM port, or manual debugging. Here in the video, we have shown how to monitor and debug the code line by line to fix the bugs. We can even use live expression along with adding breakpoints to get more inside of what's happening when firmware runs inside the STM32 Microcontroller (ARM Cortex-M). https://youtu.be/cRSAceb0hJM
DevHeads
YouTube
Debugging Arm Cortex-M Microcontroller Firmware in the STM32CubeIDE
Firmware developers always want to hit the "easy button", especially when debugging large professional development projects. A common way of achieving this is by using the serial terminal rather than leveraging professional debuggers. But as codebases grow and firmware becomes more complex, these shortcuts can quickly become huge time sucks, an...
3 Replies
Joseph Ogbonna
Joseph Ogbonna5mo ago
Great indeed The break point is it for code testing alone of, it does all kind of debug related issues ?
Umesh Lokhande
Umesh Lokhande5mo ago
Hi, @Joseph Ogbonna thank you! the use of the breakpoint shown in the video is only for debugging source code(firmware). unfortunately, It's not for hardware. Maybe in the case of PCB hardware, need to use Boundary scan and other techniques.
nour_oud
nour_oud5mo ago
Thanks @Umesh Lokhande for this helpful video.