Skip to main content
mwp
Associate III
October 31, 2013
Question

STM32F1 - Int Vector Table in RAM setup?

  • October 31, 2013
  • 1 reply
  • 604 views
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!!
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    October 31, 2013
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..