1# Copyright (c) 2024 Cypress Semiconductor Corporation. 2# SPDX-License-Identifier: Apache-2.0 3 4if(CONFIG_SOC_FAMILY_PSOC6) 5 zephyr_include_directories(common) 6 zephyr_sources(common/soc.c) 7 8 # Add sections 9 zephyr_linker_sources(NOINIT common/noinit.ld) 10 11 # Add section for cm0p image ROM 12 zephyr_linker_sources(ROM_START SORT_KEY 0x0cm0p common/rom_cm0image.ld) 13 14 # Add section for cm0p image RAM 15 zephyr_linker_sources(RAM_SECTIONS SORT_KEY 0 common/ram_cm0image.ld) 16 zephyr_linker_sources(RAMFUNC_SECTION SORT_KEY 0 common/ram_func.ld) 17 zephyr_linker_sources(RODATA SORT_KEY 0 common/rom.ld) 18 19endif() 20 21if(CONFIG_SOC_FAMILY_PSOC6_LEGACY) 22 zephyr_include_directories(psoc6_legacy) 23 zephyr_sources(psoc6_legacy/soc.c) 24 25 zephyr_linker_sources(NOINIT psoc6_legacy/noinit.ld) 26 zephyr_linker_sources(RWDATA psoc6_legacy/rwdata.ld) 27endif() 28 29set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "") 30