Skip to content

Commit

Permalink
arch: arm: Update to support local ISR declaration
Browse files Browse the repository at this point in the history
This commit updates the arm and arm64 architecture files
to support the new ISR handlers creation parser.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
  • Loading branch information
rakons committed Dec 19, 2023
1 parent d80654d commit 7a1c55a
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/arm/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ else()
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)
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 changes: 8 additions & 0 deletions arch/arm/core/swi_tables.ld
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions arch/arm/core/vector_table.ld
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ KEEP(*(".exc_vector_table.*"))

KEEP(*(.vectors))

#if LINKER_ZEPHYR_FINAL
INCLUDE zephyr/isr_tables_vt.ld
#endif

_vector_end = .;
8 changes: 8 additions & 0 deletions arch/arm64/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
endif()

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 changes: 8 additions & 0 deletions arch/arm64/core/swi_tables.ld
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions include/zephyr/arch/arm64/scripts/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ SECTIONS

KEEP(*(.vectors))

#if LINKER_ZEPHYR_FINAL
INCLUDE zephyr/isr_tables_vt.ld
#endif
_vector_end = .;

*(.text)
Expand Down

0 comments on commit 7a1c55a

Please sign in to comment.