I want to debug my source code with µVision V5.29
when I start the Simulator, the program starts at the correct program address (0x8001F5C) and the debugging is ok.
But when I start the hardware debugging with the STLINK-V2 the program starts at wrong address ( 0x1FF000FC).
I have no idea what happen there. Does anybody have any idea what's going wrong?
Best regards Reinhold
You have booted into "System Memory"
Look in the Reference Manual for the Boot Configuration section. It will show you how to configure the board to boot from Flash, System Memory or Embedded SRAM. The "easiest" way to have it boot into System Memory is to drive the BOOT0 pin high and power on the board. The easiest way to have it boot from Flash is to drive BOOT0 pin low and power on the board. There are options you can configure in User Option bytes to do things so it will ignore the BOOT0 pin, but my guess is you have not configured any of those.
Thanks for the excellent tip!After checking the boot configuration and the corresponding bits, the program starts at the right place as wanted.Thanks a lot!
How is this done, i have a similar problem. When i debug my C++ program, the debug pointer doesn't reach main.cpp but gets stuck in the "startup_stm32f407xx.s" file at line: LDR R0, =SystemInit.Btw i'm using a Discovery board with the STM32F404VGT6 MCU.