soc: ambiq: Add shared_ram section

Add linker script file shared_ram.ld where defines sections used by
specific peripherals.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
This commit is contained in:
Swift Tian 2024-04-23 18:05:17 +08:00 committed by Anas Nashif
parent 292a4ebf21
commit 81e51f0356
2 changed files with 17 additions and 0 deletions

View file

@ -6,4 +6,6 @@
zephyr_sources(soc.c)
zephyr_include_directories(.)
zephyr_linker_sources(SECTIONS shared_ram.ld)
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "")

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2024 Ambiq Micro Inc. <www.ambiq.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#if CONFIG_DT_HAS_AMBIQ_MSPI_CONTROLLER_ENABLED
SECTION_PROLOGUE (mspi_buff, CONFIG_SRAM_BASE_ADDRESS + CONFIG_MSPI_AMBIQ_BUFF_RAM_LOCATION (NOLOAD),)
{
__mspi_buff_start = .;
KEEP(*(SORT_BY_NAME(".mspi_buff*")))
. = ALIGN(CONFIG_MSPI_AMBIQ_BUFF_ALIGNMENT);
__mspi_buff_end = .;
} GROUP_LINK_IN(RAMABLE_REGION)
#endif