MEM_MODE SRAM not relocating interrupt vector table on the STM32G03
I am porting some STM32F03 code to a STM32G03.
The project uses a bootloader and an application.
Bootloader works, does its thing and jumps to the application code at a different address.
The application will first fill SRAM with it's vector table and then use the __HAL_SYSCFG_REMAPMEMORY_SRAM(); function to map sram at 0 and then continue.
All this works perfectly on the STM32F03, but fails on the STM32G03.
Using the debugger I was able to confirm the following.
The table is getting loaded into sram at 0x20000000.
When I use the debugger to read address 0 after the MEM_MODE change, it's contents does now reflect the SRAM. The M0 vector table address is still 8 (It should be).
However, if I set break points at the sys_tick ISR for both the bootloader and the app, only the ISR for the bootloader is getting called. So interrupts continue to run. But the system is still using the old vector table even though I have remapped the correct table into address 0.
It's acting like the vector table was cached after boot and will not reload from memory.
I have tried everything I can think of to get this working and it will not.
Again, this code works on the STM32F03 and does not work on the SRM32G03
Help!
