Skip to content

Commit

Permalink
soc: ambiq: Add shared_ram section
Browse files Browse the repository at this point in the history
Add linker script file shared_ram.ld where defines sections used by
specific peripherals.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
  • Loading branch information
swift-tk authored and nashif committed Jun 15, 2024
1 parent 292a4eb commit 81e51f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions soc/ambiq/apollo3x/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
15 changes: 15 additions & 0 deletions soc/ambiq/apollo3x/shared_ram.ld
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 81e51f0

Please sign in to comment.