1# Copyright (c) 2025 Silicon Laboratories Inc. 2# SPDX-License-Identifier: Apache-2.0 3 4cmake_minimum_required(VERSION 3.20.0) 5 6find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 7 8project(ram_context_for_isr) 9 10FILE(GLOB app_sources src/*.c) 11target_sources(app PRIVATE ${app_sources}) 12 13zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 14 15if(CONFIG_CPU_CORTEX_M_HAS_VTOR) 16 zephyr_code_relocate(FILES ${ZEPHYR_BASE}/arch/arm/core/cortex_m/isr_wrapper.c LOCATION RAM) 17 zephyr_code_relocate(FILES ${ZEPHYR_BASE}/arch/arm/core/cortex_m/exc_exit.c LOCATION RAM) 18endif() 19 20zephyr_code_relocate(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c FILTER ".test_irq_callback" LOCATION RAM) 21zephyr_code_relocate(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/fake_driver.c FILTER ".fake_driver_isr" LOCATION RAM) 22 23# Only needed because the fake driver is defined in tests folder 24zephyr_linker_sources(SECTIONS sections-rom.ld) 25