From d0a95b4083a3bf1e9e0ab1e4b596f4c022a49e9c Mon Sep 17 00:00:00 2001 From: Yasin Ustuner Date: Wed, 18 Dec 2024 14:05:02 +0300 Subject: [PATCH] soc: adi: max32: Add. shared section for MAX7800X SoC The SystemCoreClock variable must be placed in the '.shared' section for the MAX78000 and MAX78002 because the ARM core is responsible for changing the System Clock and updating the SystemCoreClock variable, and the RISC-V core knows what the System Clock frequency is through the shared variable. Signed-off-by: Yasin Ustuner --- soc/adi/max32/CMakeLists.txt | 6 ++++-- soc/adi/max32/{max78002.ld => max7800x.ld} | 0 2 files changed, 4 insertions(+), 2 deletions(-) rename soc/adi/max32/{max78002.ld => max7800x.ld} (100%) diff --git a/soc/adi/max32/CMakeLists.txt b/soc/adi/max32/CMakeLists.txt index 41041da7e08..b398dcd8d8f 100644 --- a/soc/adi/max32/CMakeLists.txt +++ b/soc/adi/max32/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2024 Analog Devices, Inc. +# Copyright (c) 2023-2025 Analog Devices, Inc. # SPDX-License-Identifier: Apache-2.0 zephyr_include_directories(${ZEPHYR_BASE}/drivers) @@ -6,6 +6,8 @@ zephyr_include_directories(common) zephyr_sources(soc.c) zephyr_linker_sources_ifdef(CONFIG_SOC_FLASH_MAX32 SECTIONS flash.ld) -zephyr_linker_sources_ifdef(CONFIG_SOC_MAX78002 SECTIONS max78002.ld) +if(CONFIG_SOC_MAX78000 OR CONFIG_SOC_MAX78002) + zephyr_linker_sources(SECTIONS max7800x.ld) +endif() set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "") diff --git a/soc/adi/max32/max78002.ld b/soc/adi/max32/max7800x.ld similarity index 100% rename from soc/adi/max32/max78002.ld rename to soc/adi/max32/max7800x.ld