cancel
Showing results for 
Search instead for 
Did you mean: 

Where Vector Table resides in STMF0 devies

Radoslav Mar
Associate II
Posted on June 26, 2018 at 14:03

I am asking this because when referring to the Reference Manual I see that the vector table resides at addresses 0x0000 0000 to 0x0000 00BC:

0690X0000060LTpQAM.png

and the end of the table:

0690X0000060LJRQA2.png

But if I go the the linker script file I see that the vector table is actually located at the flash memory section:

/* Specify the memory areas */

MEMORY

{

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 4K

FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 32K

}

/* Define output sections */

SECTIONS

{

/* The startup code goes first into FLASH */

.isr_vector :

{

. = ALIGN(4);

KEEP(*(.isr_vector)) /* Startup code */

. = ALIGN(4);

} >FLASH

........

........

What am I missing? The document says that it starts from address 0x0, while the Linker Script file says it starts at the first flash section address address.

3 REPLIES 3
David SIORPAES
ST Employee
Posted on June 26, 2018 at 14:09

In STM32F0 the flash is aliased to 0x0 if booting from flash.

Posted on June 26, 2018 at 14:18

The CM0 parts it is always at address zero, other hardware then allows for the mapping/shadowing of RAM, FLASH or ROM at that address.

To use an alternate table (ie IAP loader + application) you would reserved some space at the base of RAM, copy your table there, and then remap the RAM so it appears at both 0x20000000 and 0x00000000

For the CM0+ parts the VTOR is available and you can program in an aligned tabled, ie SCB->VTOR = 0x08004000

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Radoslav Mar
Associate II
Posted on June 27, 2018 at 14:09

What does aliased mean? The same physical memory accessed by two different code addresses?

And why is  it necessary at all?