Skip to content
Permalink
Browse files

arch: Port the ramfunc section to the Cmake function

Remove it from linker.ld

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
  • Loading branch information...
oyvindronningstad authored and nashif committed Mar 12, 2019
1 parent 0001039 commit 6d0039444c40c4856eacde6b2c2bb630252b26aa
Showing with 26 additions and 14 deletions.
  1. +6 −0 arch/common/CMakeLists.txt
  2. +20 −0 arch/common/ramfunc.ld
  3. +0 −14 include/arch/arm/cortex_m/scripts/linker.ld
@@ -14,3 +14,9 @@ zephyr_sources_ifdef(
CONFIG_EXECUTION_BENCHMARKING
timing_info_bench.c
)


zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
RAM_SECTIONS
ramfunc.ld
)
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

/* Copied from linker.ld */

SECTION_DATA_PROLOGUE(.ramfunc,,)
{
MPU_ALIGN(_ramfunc_ram_size);
_ramfunc_ram_start = .;
*(.ramfunc)
*(".ramfunc.*")
MPU_ALIGN(_ramfunc_ram_size);
_ramfunc_ram_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
_ramfunc_ram_size = _ramfunc_ram_end - _ramfunc_ram_start;
_ramfunc_rom_start = LOADADDR(.ramfunc);
@@ -375,20 +375,6 @@ SECTIONS
_nocache_ram_size = _nocache_ram_end - _nocache_ram_start;
#endif /* CONFIG_NOCACHE_MEMORY */

#if defined(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT)
SECTION_DATA_PROLOGUE(.ramfunc,,)
{
MPU_ALIGN(_ramfunc_ram_size);
_ramfunc_ram_start = .;
*(.ramfunc)
*(".ramfunc.*")
MPU_ALIGN(_ramfunc_ram_size);
_ramfunc_ram_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
_ramfunc_ram_size = _ramfunc_ram_end - _ramfunc_ram_start;
_ramfunc_rom_start = LOADADDR(.ramfunc);
#endif /* CONFIG_ARCH_HAS_RAMFUNC_SUPPORT */

/* Located in generated directory. This file is populated by the
* zephyr_linker_sources() Cmake function.
*/

0 comments on commit 6d00394

Please sign in to comment.
You can’t perform that action at this time.