Skip to main content
CTabo.1
Senior
July 13, 2023
Solved

Remapping the Interrupt Vector Table (IVT)

Hello,
I need to map two different programs (a custom bootloader and the application) in the memory space of my STM32G0, as described in figure.

CTabo1_0-1689261587293.png

The bootloader should start at power-up, then check the application CRC and eventually jump to it.

Both in the bootloder and in the application, I need to remap the interrupt vector table.
Where can I find some documentation to do this, in the correct way?

Thank you,
Carlo

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
July 13, 2023

The STM32G0 is a Contex-M0+ part, and will have a SCB->VTOR register to point at the base of the vector table. Given size I suspect this will need to a 256-byte aligned address, ie 0x00000000, 0x08000100

You can't put the CRC at the base of FLASH, you need an address pair for the initial SP/PC as the first two words

https://www.st.com/resource/en/programming_manual/pm0223-stm32-cortexm0-mcus-programming-manual-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
July 13, 2023

The STM32G0 is a Contex-M0+ part, and will have a SCB->VTOR register to point at the base of the vector table. Given size I suspect this will need to a 256-byte aligned address, ie 0x00000000, 0x08000100

You can't put the CRC at the base of FLASH, you need an address pair for the initial SP/PC as the first two words

https://www.st.com/resource/en/programming_manual/pm0223-stm32-cortexm0-mcus-programming-manual-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
CTabo.1
CTabo.1Author
Senior
July 14, 2023

Thank you.