I am having an issue, related to vector table relocation in a Cortex - m0 based device, as VTOR isnt available there in this core, how can i manage the ISRs in a application which is not at default flash address i.e. 0x8000000, i am able to jump from my boot loader code to the application code, but after interrupt generation code stops. need help thanks in advance
You need to "relocate" the vectors yourself. Means, you let the vector point to some piece of code that fetches the final vector from RAM. This RAM contains either the addresses from boot load or from application.
To ease this, you also might want to direct all interrupts (not excpetions!) to one single vector (that's how an RTOS would do it).
If you are a chip designer, you can use memory remap technique in bus system design to remap the vector table accesses to other address.
If you are a microcontroller user, there is a chance that this address remap hardware is available (I see that in several popular Cortex-M0 devices).
thanks for the reply, i am using STM32F030RC micro-controller, but unable to proceed with vector table relocation. can u provide some more inputs for the same??
The reference manual of this chip does answer your question!
That's right. Please see ST manual 0360:
Section 9.1.1 SYSCFG configuration register 1
Bits 1:0 MEM_MODE[1:0]: Memory mapping selection bitsThese bits are set and cleared by software. They control the memory internal mapping ataddress 0x0000 0000. After reset these bits take on the value selected by the actual bootmode configuration. Refer to Chapter 2.5: Boot configuration for more details.x0: Main Flash memory mapped at 0x0000 000001: System Flash memory mapped at 0x0000 000011: Embedded SRAM mapped at 0x0000 0000
View all questions in Cortex-M / M-Profile forum