arch: arm: Update to support local ISR declaration
This commit updates the arm and arm64 architecture files to support the new ISR handlers creation parser. Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
parent
8174c7e049
commit
1ff24b34eb
9 changed files with 56 additions and 1 deletions
|
@ -35,3 +35,11 @@ else()
|
||||||
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)
|
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)
|
||||||
zephyr_linker_sources(ROM_START SORT_KEY 0x1vectors cortex_m/vector_table_pad.ld)
|
zephyr_linker_sources(ROM_START SORT_KEY 0x1vectors cortex_m/vector_table_pad.ld)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_GEN_SW_ISR_TABLE)
|
||||||
|
if(CONFIG_DYNAMIC_INTERRUPTS)
|
||||||
|
zephyr_linker_sources(RWDATA swi_tables.ld)
|
||||||
|
else()
|
||||||
|
zephyr_linker_sources(RODATA swi_tables.ld)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
8
arch/arm/core/swi_tables.ld
Normal file
8
arch/arm/core/swi_tables.ld
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
#if LINKER_ZEPHYR_FINAL
|
||||||
|
INCLUDE zephyr/isr_tables_swi.ld
|
||||||
|
#endif
|
|
@ -51,6 +51,10 @@ _vector_start = .;
|
||||||
KEEP(*(.exc_vector_table))
|
KEEP(*(.exc_vector_table))
|
||||||
KEEP(*(".exc_vector_table.*"))
|
KEEP(*(".exc_vector_table.*"))
|
||||||
|
|
||||||
|
#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION
|
||||||
|
INCLUDE zephyr/isr_tables_vt.ld
|
||||||
|
#else
|
||||||
KEEP(*(.vectors))
|
KEEP(*(.vectors))
|
||||||
|
#endif
|
||||||
|
|
||||||
_vector_end = .;
|
_vector_end = .;
|
||||||
|
|
|
@ -55,3 +55,11 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory_ifdef(CONFIG_XEN xen)
|
add_subdirectory_ifdef(CONFIG_XEN xen)
|
||||||
|
|
||||||
|
if(CONFIG_GEN_SW_ISR_TABLE)
|
||||||
|
if(CONFIG_DYNAMIC_INTERRUPTS)
|
||||||
|
zephyr_linker_sources(RWDATA swi_tables.ld)
|
||||||
|
else()
|
||||||
|
zephyr_linker_sources(RODATA swi_tables.ld)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
8
arch/arm64/core/swi_tables.ld
Normal file
8
arch/arm64/core/swi_tables.ld
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Nordic Semiconductor ASA
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
#if LINKER_ZEPHYR_FINAL
|
||||||
|
INCLUDE zephyr/isr_tables_swi.ld
|
||||||
|
#endif
|
|
@ -39,6 +39,11 @@ zephyr_linker_sources_ifdef(CONFIG_GEN_ISR_TABLES
|
||||||
${ZEPHYR_BASE}/include/zephyr/linker/intlist.ld
|
${ZEPHYR_BASE}/include/zephyr/linker/intlist.ld
|
||||||
)
|
)
|
||||||
|
|
||||||
|
zephyr_linker_sources_ifdef(CONFIG_ISR_TABLES_LOCAL_DECLARATION
|
||||||
|
SECTIONS
|
||||||
|
${ZEPHYR_BASE}/include/zephyr/linker/isr-local-drop-unused.ld
|
||||||
|
)
|
||||||
|
|
||||||
zephyr_linker_sources_ifdef(CONFIG_GEN_IRQ_VECTOR_TABLE
|
zephyr_linker_sources_ifdef(CONFIG_GEN_IRQ_VECTOR_TABLE
|
||||||
ROM_START
|
ROM_START
|
||||||
SORT_KEY 0x0vectors
|
SORT_KEY 0x0vectors
|
||||||
|
|
|
@ -111,8 +111,11 @@ SECTIONS
|
||||||
KEEP(*(.exc_vector_table))
|
KEEP(*(.exc_vector_table))
|
||||||
KEEP(*(".exc_vector_table.*"))
|
KEEP(*(".exc_vector_table.*"))
|
||||||
|
|
||||||
|
#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION
|
||||||
|
INCLUDE zephyr/isr_tables_vt.ld
|
||||||
|
#else
|
||||||
KEEP(*(.vectors))
|
KEEP(*(.vectors))
|
||||||
|
#endif
|
||||||
_vector_end = .;
|
_vector_end = .;
|
||||||
|
|
||||||
*(.text)
|
*(.text)
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
/* SPDX-License-Identifier: Apache-2.0 */
|
/* SPDX-License-Identifier: Apache-2.0 */
|
||||||
|
|
||||||
|
#if !(LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION)
|
||||||
. = ALIGN(CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN);
|
. = ALIGN(CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN);
|
||||||
KEEP(*(_IRQ_VECTOR_TABLE_SECTION_SYMS))
|
KEEP(*(_IRQ_VECTOR_TABLE_SECTION_SYMS))
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some ARM platforms require this symbol to be placed after the IRQ vector
|
* Some ARM platforms require this symbol to be placed after the IRQ vector
|
||||||
|
|
9
include/zephyr/linker/isr-local-drop-unused.ld
Normal file
9
include/zephyr/linker/isr-local-drop-unused.ld
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/* SPDX-License-Identifier: Apache-2.0 */
|
||||||
|
|
||||||
|
#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION
|
||||||
|
/DISCARD/ :
|
||||||
|
{
|
||||||
|
KEEP(*(.vectors))
|
||||||
|
KEEP(*(_IRQ_VECTOR_TABLE_SECTION_SYMS))
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue