2022-03-30 11:32 AM
I am using STMCubeIDE to program a nucleo-L4R5ZI. When i go to debug i get "Break at address "0x1fff523e" with no debug information available, or outside of program code." This only happens with my L4R5ZI boards. The code doesn't run unless I disconnect the board and then reconnect (then the program actually launches). Debug works fine on my l476rg.
I tried applying the fix in this thread:
but it didnt work. Anyone have any ideas what could be going wrong?
Thanks.
2022-03-30 01:05 PM
Power cycle and Reset behave differently, states are latched based on the viability of the image in flash, and simple resets won't clear that.
What you're seeing is indicative of code running from ROM
Would suggest that you make sure that the FLASH is properly mapped into the Zero Address space, and the SCB->VTOR is set appropriately. Put code to facilitate this in the Reset_Handler, so it's the first thing run.
2022-04-01 02:52 PM
I worked around it by unchecking nSWBOOT0 option byte which meant BOOT0 was taken from option bit nBOOT0 instead of from PH3/BOOT0 pin. I then was able to debug without an issue, I then rechecked "nSWBOOT0" and programmed and its still working fine. Not sure why this worked but I will still investigate and make sure flash is properly mapped into zero address space and scb->vtor is set correctly jussst in case.
Thanks.
2022-04-25 05:34 AM
Solved it for me aswell, the option can be found in STM32CubeProgrammer -> Option bytes -> User Configuration
2022-04-26 07:40 AM
Setting SCB->VTOR to 0x08000000 in SystemInit() within the system_stm32l4xx.c also seems to do the trick for me.