arm: set default vector table address in prep_c when XIP
It is called before early SoC initialization, so remove the duplicated code from other boards and just set it by default when using XIP. This can later be used when adding bootloader support, as an additional option could be created to move the VTOR offset to a different address. Change-Id: Ia1f5d9a066de61858ee287215cefdd58596b6b1c Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
This commit is contained in:
parent
90f38f395e
commit
58460a52c9
6 changed files with 11 additions and 26 deletions
|
@ -22,8 +22,15 @@
|
|||
#include <linker-defs.h>
|
||||
#include <nano_internal.h>
|
||||
|
||||
#ifdef CONFIG_XIP
|
||||
#ifdef CONFIG_ARMV6_M
|
||||
static inline void relocate_vector_table(void) { /* do nothing */ }
|
||||
#elif defined(CONFIG_ARMV7_M)
|
||||
#ifdef CONFIG_XIP
|
||||
static inline void relocate_vector_table(void)
|
||||
{
|
||||
/* vector table is located at the the beginning of the flash */
|
||||
_scs_relocate_vector_table((void *)CONFIG_FLASH_BASE_ADDRESS);
|
||||
}
|
||||
#else
|
||||
static inline void relocate_vector_table(void)
|
||||
{
|
||||
|
@ -31,6 +38,9 @@ static inline void relocate_vector_table(void)
|
|||
_scs_relocate_vector_table((void *)CONFIG_SRAM_BASE_ADDRESS);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#error Unknown ARM architecture
|
||||
#endif /* CONFIG_ARMv6_M */
|
||||
|
||||
#ifdef CONFIG_FLOAT
|
||||
static inline void enable_floating_point(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue