2020-09-09 04:38 AM
Hello,
When an STM32 microcontroller is debugged using ST-LINK and STM32CubeID, the program that is being debug is burn in the Flash?
In other words, when I debug a program in STM32 microcontroller, the program previously stored in the Flash is overwritten?
To sum up. My doubt is about if I can flash the microcontroller through STM32CubeIDE or it is necessary using the programing utility to flash the STM32.
Regards,
2020-09-09 04:52 AM
You can debug programs running in flash and running in RAM. When running in RAM you have infinite breakpoints, when running in flash you are restricted to the number of flash breakpoints that the MCU debug unit provides.
2020-09-09 05:01 AM
And how I can select if the debug is from FLASH or from RAM in STM32CubeIDE?
2020-09-09 05:04 AM
Yes, the program that was in flash is overwritten with the one being debugged using ST-LINK and STM32CubeIDE.
2020-09-09 05:24 AM
It's in FLASH by default. To put it into RAM you would need to change the linker script. This is not typically done.
2020-09-09 06:13 AM
Only for curiosity, what is the modification that linker scripts requires in order to put the program debugged in RAM?
2020-09-09 06:27 AM
You need to target the code to ram, but flash it to flash. On start, you need copy from flash to RAM.