1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_include_directories(.)
4
5zephyr_sources(
6  soc.c
7  start.S
8  soc_irq.S
9)
10
11zephyr_sources_ifdef(CONFIG_SOC_ANDES_V5_PMA pma.c)
12zephyr_linker_sources(ROM_START SORT_KEY 0x0 common_linker/init.ld)
13zephyr_linker_sources_ifdef(CONFIG_SOC_ANDES_V5_EXECIT RODATA SORT_KEY 0x0 common_linker/execit.ld)
14zephyr_linker_sources_ifdef(CONFIG_XIP RAM_SECTIONS SORT_KEY 0x0 common_linker/ram_start_nonzero.ld)
15
16# Note: AndeStar V5 DSP needs custom Andes V5 toolchain
17if(CONFIG_SOC_ANDES_V5_HWDSP)
18  zephyr_cc_option(-mext-dsp)
19endif()
20
21# Note: AndeStar V5 EXEC.IT needs custom Andes V5 toolchain
22if(CONFIG_SOC_ANDES_V5_EXECIT)
23  zephyr_cc_option(-mexecit)
24  zephyr_ld_options(-Wl,--mexecit)
25endif()
26
27if(CONFIG_SOC_ANDES_AE350)
28  set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
29endif()
30