arm: linker.ld: Port the vector table to zephyr_linker_sources()
Also port vector table relay. Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This commit is contained in:
parent
1a2ff6deda
commit
321462b310
6 changed files with 36 additions and 36 deletions
|
@ -33,3 +33,5 @@ add_subdirectory_ifdef(CONFIG_ARM_SECURE_FIRMWARE cortex_m/tz)
|
|||
add_subdirectory_ifdef(CONFIG_ARM_NONSECURE_FIRMWARE cortex_m/tz)
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_CPU_CORTEX_R cortex_r)
|
||||
|
||||
zephyr_linker_sources(TEXT_START SORT_KEY 0x0vectors vector_table.ld)
|
||||
|
|
|
@ -11,6 +11,12 @@ zephyr_library_sources(
|
|||
thread_abort.c
|
||||
)
|
||||
|
||||
zephyr_linker_sources_ifdef(CONFIG_SW_VECTOR_RELAY
|
||||
TEXT_START
|
||||
SORT_KEY 0x0relay_vectors
|
||||
relay_vector_table.ld
|
||||
)
|
||||
|
||||
zephyr_linker_sources_ifdef(CONFIG_SW_VECTOR_RELAY
|
||||
RAM_SECTIONS
|
||||
vt_pointer_section.ld
|
||||
|
|
10
arch/arm/core/cortex_m/relay_vector_table.ld
Normal file
10
arch/arm/core/cortex_m/relay_vector_table.ld
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
KEEP(*(.vector_relay_table))
|
||||
KEEP(*(".vector_relay_table.*"))
|
||||
KEEP(*(.vector_relay_handler))
|
||||
KEEP(*(".vector_relay_handler.*"))
|
18
arch/arm/core/vector_table.ld
Normal file
18
arch/arm/core/vector_table.ld
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
_vector_start = .;
|
||||
KEEP(*(.exc_vector_table))
|
||||
KEEP(*(".exc_vector_table.*"))
|
||||
|
||||
KEEP(*(IRQ_VECTOR_TABLE))
|
||||
|
||||
KEEP(*(.vectors))
|
||||
|
||||
KEEP(*(.openocd_dbg))
|
||||
KEEP(*(".openocd_dbg.*"))
|
||||
|
||||
_vector_end = .;
|
|
@ -160,23 +160,6 @@ SECTIONS
|
|||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#if defined(CONFIG_SW_VECTOR_RELAY)
|
||||
KEEP(*(.vector_relay_table))
|
||||
KEEP(*(".vector_relay_table.*"))
|
||||
KEEP(*(.vector_relay_handler))
|
||||
KEEP(*(".vector_relay_handler.*"))
|
||||
#endif
|
||||
|
||||
_vector_start = .;
|
||||
KEEP(*(.exc_vector_table))
|
||||
KEEP(*(".exc_vector_table.*"))
|
||||
|
||||
KEEP(*(IRQ_VECTOR_TABLE))
|
||||
|
||||
KEEP(*(.vectors))
|
||||
|
||||
KEEP(*(.openocd_dbg))
|
||||
KEEP(*(".openocd_dbg.*"))
|
||||
|
||||
#ifdef CONFIG_KINETIS_FLASH_CONFIG
|
||||
. = CONFIG_KINETIS_FLASH_CONFIG_OFFSET;
|
||||
|
@ -184,7 +167,6 @@ SECTIONS
|
|||
KEEP(*(".kinetis_flash_config.*"))
|
||||
#endif
|
||||
|
||||
_vector_end = .;
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
#ifdef CONFIG_CODE_DATA_RELOCATION
|
||||
|
|
|
@ -157,30 +157,12 @@ SECTIONS
|
|||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-text-start.ld>
|
||||
#if defined(CONFIG_SW_VECTOR_RELAY)
|
||||
KEEP(*(.vector_relay_table))
|
||||
KEEP(*(".vector_relay_table.*"))
|
||||
KEEP(*(.vector_relay_handler))
|
||||
KEEP(*(".vector_relay_handler.*"))
|
||||
#endif
|
||||
|
||||
_vector_start = .;
|
||||
KEEP(*(.exc_vector_table))
|
||||
KEEP(*(".exc_vector_table.*"))
|
||||
|
||||
KEEP(*(IRQ_VECTOR_TABLE))
|
||||
|
||||
KEEP(*(.vectors))
|
||||
|
||||
KEEP(*(.openocd_dbg))
|
||||
KEEP(*(".openocd_dbg.*"))
|
||||
|
||||
/* Kinetis has to write 16 bytes at 0x400 */
|
||||
SKIP_TO_KINETIS_FLASH_CONFIG
|
||||
KEEP(*(.kinetis_flash_config))
|
||||
KEEP(*(".kinetis_flash_config.*"))
|
||||
|
||||
_vector_end = .;
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
#ifdef CONFIG_CODE_DATA_RELOCATION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue