Skip to main content
Visitor II
Sep 28, 2023 7:38 AM UTC
Question

STM32 - Flash/Debug algorithms - Application Notes

I am developing my own hardware debugger (SWD based, as a hobby project) for an STM32F0 based board. I have access to the official ARM documentation about the hardware implementation of the SWD debug functionality. This however only mentions the various regiters etc. and does not mention any algorithms as I am guessing a lot of implementation specific points need to be considered.

Is there any official documentation from ST about this? For e.g. how do I halt a MCU? How do I flash the MCU? How do I set breakpoints?

This topic has been closed for replies.

3 replies

ST Technical Moderator
Sep 28, 2023 8:48 AM UTC

Hello @ACBlue 

Check the AN4989 STM32 microcontroller debug toolbox - Application note

This should help! 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
Tesla DeLorean
Guru
Sep 28, 2023 8:59 AM UTC

You Flash the MCU by putting code and data into RAM and executing it.

The Flash functions in the same way as documented in the RM and via the code examples.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
Sep 28, 2023 1:10 PM UTC

Perhaps look up some STM32CubeIDE tutorials on youtube to help get started. Plenty to choose from.

"If you feel a post has answered your question, please click ""Accept as Solution""."