1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_library() 4 5zephyr_library_sources( 6 fatal.c 7 nmi.c 8 nmi_on_reset.S 9) 10 11zephyr_library_sources_ifdef(CONFIG_CPP __aeabi_atexit.c) 12zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c) 13zephyr_library_sources_ifdef(CONFIG_THREAD_LOCAL_STORAGE tls.c) 14zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.S) 15zephyr_library_sources_ifdef(CONFIG_ARM_ZIMAGE_HEADER header.S) 16zephyr_library_sources_ifdef(CONFIG_LLEXT elf.c) 17zephyr_library_sources_ifdef(CONFIG_GDBSTUB gdbstub.c) 18 19add_subdirectory_ifdef(CONFIG_CPU_CORTEX_M cortex_m) 20add_subdirectory_ifdef(CONFIG_CPU_CORTEX_M_HAS_CMSE cortex_m/cmse) 21add_subdirectory_ifdef(CONFIG_ARM_SECURE_FIRMWARE cortex_m/tz) 22add_subdirectory_ifdef(CONFIG_ARM_NONSECURE_FIRMWARE cortex_m/tz) 23 24add_subdirectory_ifdef(CONFIG_ARM_MPU mpu) 25add_subdirectory_ifdef(CONFIG_ARM_AARCH32_MMU mmu) 26 27add_subdirectory_ifdef(CONFIG_CPU_AARCH32_CORTEX_R cortex_a_r) 28add_subdirectory_ifdef(CONFIG_CPU_AARCH32_CORTEX_A cortex_a_r) 29 30if (CONFIG_ARM_ZIMAGE_HEADER) 31zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors zimage_header.ld) 32zephyr_linker_sources(ROM_START SORT_KEY 0x1vectors vector_table.ld) 33zephyr_linker_sources(ROM_START SORT_KEY 0x2vectors cortex_m/vector_table_pad.ld) 34else() 35zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld) 36zephyr_linker_sources(ROM_START SORT_KEY 0x1vectors cortex_m/vector_table_pad.ld) 37endif() 38 39if(CONFIG_GEN_SW_ISR_TABLE) 40 if(CONFIG_DYNAMIC_INTERRUPTS) 41 zephyr_linker_sources(RWDATA swi_tables.ld) 42 else() 43 zephyr_linker_sources(RODATA swi_tables.ld) 44 endif() 45endif() 46