2012-07-11 10:09 PM
hi,
i search and search but i cant find where i can change Vector Table base location in memory.map i can find .text 0x08004000 0x718 *(.isr_vector .isr_vector.*) .isr_vector 0x08004000 0x124 ..\obj\startup_stm32f10x_md_vl.o 0x08004000 g_pfnVectors *(.text .text.* .gnu.linkonce.t.*) in memory.ld rom (rx) : ORIGIN = 0x08004000, LENGTH = 0x00002000 but i need to change vector table address to 0x08000000 NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x08000000); - this isnt working ..... i am using stm32f100 and coocox ide ....2012-07-12 01:21 AM
> in memory.ld rom (rx) : ORIGIN = 0x08004000, LENGTH = 0x00002000
Well, you've found it, change this, and linker will place the code at the different address.2012-07-12 09:57 PM
ok but then my application will be on address 0x08000004 :)
but i want have application on address 0x08004004 and told it to use vector table on address 0x08000000 my bootloader starts at address 0x08000004 i want to use bootloaders vector table - i have my custom bootloader and i read that i must used bootloaders vector table in my application2012-07-12 10:10 PM
ok i read more and ....
i think i was wrong - i must set VECT_TAB_OFFSET in bootloader not in aplication so for example bootloader location is 0x08000000 length 4000 aplication location is 0x08000000 length 4000 and in bootloader code i just set in stm32f10x.c #define VECT_TAB_OFFSET 0x4000 //0x08004000 - vect table location am i right now ? thanks for answer and sorry for dummy questions :-[2012-07-16 05:54 AM
hello friend i am also working on the bootloader.
my application address is 0x0800f000 but my .map file doesn't get updated. My controller is STM32F100xxSettings done in application:
1) Linker script file (.ld):
FLASH (rx) : ORIGIN = 0x0800F000, LENGTH = 50K
2) system_stm32f10x.c
Line 132: #define VECT_TAB_OFFSET 0xF000
Do i need to make anymore changes?
thanks in advance2012-07-16 06:57 AM
@redkofka I don't understand why you'd put the boot loader at 0x08004000, the point of the boot loader is that the CPU starts it, and then calls the application. Thus the boot loader is going to want to start at 0x08000000, and the application at 0x08004000
@bikash I don't understand why the MAP file doesn't change, it should reflect the address spaces you defined in the linker script (.ld), make sure that the linker is using the right script. Also you need to be specific about what part you are using, as having 50KB of FLASH beyond 0x0800F000 seems decidedly odd. In both cases, in order for you to use interrupts the vector table must be set up to match where you've placed it. The application itself can do that, which is most typical, or the boot loader can set it to the application base before it jumps into the application via the Reset_Handler, or whatever method you choose to transfer control.2015-06-03 08:18 AM
2015-06-03 08:36 AM
And you're using which STM32 exactly?
How will moving the vector table impact your current failure? The Vector Table is generally situated using the code in, or called by, SystemInit() [system_stm32fxxx.c], as a write to SCB->VTOR. If you are getting unexplained interrupts, you need to review what you're enabling and servicing now, and if those are being reached. If you're getting Hard Faults, then get a proper handler their which can direct you at the faulting instructions, and processor state.2015-06-03 09:38 AM
I'm using STM32f030c6t6 series controller.
2015-06-03 11:49 AM
I'm using STM32f030c6t6 series controller.
Ok, and you've looked at the IAP examples, got answers for the other questions? The Cortex-M0 can't relocate the vector table, here you're going to have to copy the new table to RAM, and change the shadowing/mapping of the zero address memory from FLASH to SRAM.