I am fairly new to ChibiOS and I am having trouble implementing the use of a bootloader, my specifically how the vector table is working.
My Bootloader sits at 0x08000000 and my app sits at 0x0800C000. If I flash the bootloader and the application it seems to work fine, i.e. it will jump from the bootloader to the application and run as normal.
My problem is that if I erase the flash entirely and flash just the application then I get unhandled exception. This tells me that the vector table isnt initialised correctly to 0x0800C000.
I have defined in my Makefile:
Code: Select all
UDEFS = -DCORTEX_VTOR_INIT=0x0800C000U
UADEFS = -DCORTEX_VTOR_INIT=0x0800C000U
I can see when debugging that the initialisation of ChibiOS is calling:
Code: Select all
SCB->VTOR = CORTEX_VTOR_INITI have even copied this line throughout my main function to see if it was getting re-initialised somewhere.
The only way I can get my app to run without the bootloader is to put the CORTEX_VTOR_INIT back to 0 and my app to start at 0x08000000.
Is there something that I am missing in order to get this to work?
I have searched the forum and cant find anyone having this same issue, but I also havnt seen anyone confirm that their app is truly running the vector table from the offset location.
Thanks
Doddi