From 1876f60f9f839d5692360ba5db47bee0a6835a74 Mon Sep 17 00:00:00 2001 From: Tahsin Mutlugun Date: Mon, 7 Apr 2025 15:10:13 +0300 Subject: [PATCH] soc: adi: max32: Move .flashprog into RAMFUNC section Move functions in .flashprog section into RAMFUNC so that they can be executed from SRAM. Signed-off-by: Tahsin Mutlugun --- soc/adi/max32/CMakeLists.txt | 2 +- soc/adi/max32/flash.ld | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/soc/adi/max32/CMakeLists.txt b/soc/adi/max32/CMakeLists.txt index 9042d934fee..74b3b29698b 100644 --- a/soc/adi/max32/CMakeLists.txt +++ b/soc/adi/max32/CMakeLists.txt @@ -8,7 +8,7 @@ zephyr_sources(soc.c) zephyr_library_sources_ifdef(CONFIG_CPU_HAS_CUSTOM_FIXED_SOC_MPU_REGIONS mpu_regions.c) zephyr_library_sources_ifdef(CONFIG_PM power.c) -zephyr_linker_sources_ifdef(CONFIG_SOC_FLASH_MAX32 SECTIONS flash.ld) +zephyr_linker_sources_ifdef(CONFIG_SOC_FLASH_MAX32 RAMFUNC_SECTION flash.ld) if(CONFIG_SOC_MAX78000 OR CONFIG_SOC_MAX78002) zephyr_linker_sources(SECTIONS max7800x.ld) endif() diff --git a/soc/adi/max32/flash.ld b/soc/adi/max32/flash.ld index 2014e209ea7..3ec1ab99dfb 100644 --- a/soc/adi/max32/flash.ld +++ b/soc/adi/max32/flash.ld @@ -1,10 +1,7 @@ /* - * Copyright (c) 2023 Analog Devices, Inc. + * Copyright (c) 2023-2025 Analog Devices, Inc. * * SPDX-License-Identifier: Apache-2.0 */ -SECTION_DATA_PROLOGUE(.flashprog,, SUBALIGN(4)) -{ - KEEP(*(.flashprog*)) /* Flash program */ -} +KEEP(*(.flashprog*)) /* Flash program */