Re: Question about non-XIP boot

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

Dear Benjamin,

I got it now, thank you very much.

On 2016年09月20日 04:23, Benjamin Walsh wrote:
On Mon, Sep 19, 2016 at 11:19:47AM +0800, Tidy Jiang wrote:
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 ?
In non-XIP mode, the image is supposed to already be in RAM, including
the data, so there is no data to copy from the flash. _data_copy() does
nothing in that case.

Join to automatically receive all group messages.