cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F1 - Int Vector Table in RAM setup?

mwp
Senior
Posted on October 31, 2013 at 14:44

Hi all,

Ive got a bit of a problem with a bootloader. Everything is running just fine out of RAM (.text .rodata .data), but im having issues moving over the vector table. Ive reserved 0x200 bytes at the start of RAM in the linker script, then at the start of the bootloader i do:

memcpy((char*)0x20000000, (char*)0x8000000, 0x1E4);
NVIC_SetVectorTable(NVIC_VectTab_RAM, 0);

Is there anything wrong with doing this? When i do, i have a weird issue with FatFS not being able to open a file on a uSD card. If i comment out those two lines and leave the table in flash, it works just fine. Any ideas? Thanks in advance!!
1 REPLY 1
Posted on October 31, 2013 at 17:43

It's doesn't look offensive, moving it won't relocate what it points too.

Make sure you've carved the space out properly, review the .MAP and check it doesn't use that area of RAM.  Check variables, stack, etc.

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