I am writing a small application to start a bootloader that checks simple conditions and then jumps to the application memory. The application seems to crash and I am unable to figure out the reason and the debugger is throwing:
Break at address "0x8000d00" with no debug information available, or outside of program code.
I started the project from scratch on STM32Cube IDE for the STM32F405 microcontroller with 1Mb of flash. The bootloader starts fine - it blinks an LED few times and has to jump to an application which also blinks LED at different frequency and reads button input to toggle LED. Right now, the bootloader sequence loads and then it stops - nothing from the application code.
The bootloader is located at 0x08000000 and I allocated 64Kb. The application space is starting from 0x08020000 and is allocated 768Kb.
This is how I am jumping to the application space from the bootloader program:
void (*app_reset_handler)(void) = (void*)(*((volatile uint32_t*) (0x08020000 + 4U)));
app_reset_handler();
In my application program, I have defined the flash base address field:
#define VECT_TAB_OFFSET 0x00020000U
and defined the memory definitions for flash:
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 768K
I have followed the same steps for a previous implementation on F401 which seems to work fine. Any ideas how to debug this issue?