2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2018-12-11 23:33:23 +08:00
|
|
|
cmake_minimum_required(VERSION 3.13.1)
|
2018-11-26 23:20:23 +08:00
|
|
|
|
2020-05-29 12:02:17 +08:00
|
|
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
2018-11-26 23:20:23 +08:00
|
|
|
project(test_relocation)
|
|
|
|
|
|
|
|
FILE(GLOB app_sources src/*.c)
|
|
|
|
target_sources(app PRIVATE ${app_sources})
|
|
|
|
|
|
|
|
# Code relocation feature
|
|
|
|
zephyr_code_relocate(src/test_file1.c SRAM2)
|
|
|
|
|
|
|
|
zephyr_code_relocate(src/test_file2.c SRAM)
|
|
|
|
|
|
|
|
zephyr_code_relocate(src/test_file3.c SRAM2_TEXT)
|
|
|
|
zephyr_code_relocate(src/test_file3.c SRAM_DATA)
|
|
|
|
zephyr_code_relocate(src/test_file3.c SRAM2_BSS)
|
|
|
|
|
|
|
|
zephyr_code_relocate(../../../kernel/sem.c SRAM)
|
2019-03-20 19:53:49 +08:00
|
|
|
|
|
|
|
zephyr_linker_sources(SECTIONS custom-sections.ld)
|