arch: arm: cortex-m: move the relay table section after vector table
In CPUs with VTOR we are free to place the relay vector table section anywhere inside ROM_START section (as long as we respect alignment requirements). This PR moves the relay table towards the end of ROM_START. This leaves sufficient area for placing some SoC-specific sections inside ROM_START that need to start at a fixed address. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
9dd220dc2b
commit
b0c5e6335a
1 changed files with 14 additions and 2 deletions
|
@ -13,11 +13,23 @@ zephyr_library_sources(
|
|||
thread_abort.c
|
||||
)
|
||||
|
||||
zephyr_linker_sources_ifdef(CONFIG_SW_VECTOR_RELAY
|
||||
if (CONFIG_SW_VECTOR_RELAY)
|
||||
if (CONFIG_CPU_CORTEX_M_HAS_VTOR)
|
||||
set(relay_vector_table_sort_key relay_vectors)
|
||||
else()
|
||||
# Using 0x0 prefix will result in placing the relay vector table section
|
||||
# at the beginning of ROM_START (i.e before other sections in ROM_START);
|
||||
# required for CPUs without VTOR, which need to have the exception vector
|
||||
# table starting at a fixed address at the beginning of ROM.
|
||||
set(relay_vector_table_sort_key 0x0relay_vectors)
|
||||
endif()
|
||||
|
||||
zephyr_linker_sources(
|
||||
ROM_START
|
||||
SORT_KEY 0x0relay_vectors
|
||||
SORT_KEY ${relay_vector_table_sort_key}
|
||||
relay_vector_table.ld
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CONFIG_SW_VECTOR_RELAY OR CONFIG_SW_VECTOR_RELAY_CLIENT)
|
||||
zephyr_linker_sources(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue