Question about non-XIP boot

Tidy(ChunHua) Jiang <tidyjiang@...>

Hi All,

I'm reading the boot code for cortex-m, but confused about something,
please help me.

Before jumping to C code:

void _PrepC(void)


static inline void relocate_vector_table(void) { /* do nothing */ }
static inline void relocate_vector_table(void)
/* vector table is already in SRAM, just point to it */
_scs_relocate_vector_table((void *)CONFIG_SRAM_BASE_ADDRESS);


In non-XIP mode, from my view, before relocate vector table to RAM, we
should copy the data from flash to RAM. But above code firstly relocates
and then copy data, why ?

Thx & Rgds.

Join to automatically receive all group messages.