From 6ca84e3c9a79d7354b2a0c4bd68f6e746b97d02a Mon Sep 17 00:00:00 2001 From: Nhut Nguyen Date: Tue, 1 Apr 2025 16:11:56 +0700 Subject: [PATCH] soc: renesas: rz: Fix loader program Due to a change in linker script cortex_a_r/scripts/linker.ld , the _image_ram_start has been changed so the Zephyr image cannot be copied from flash to ram as expected and cannot run properly. It is replaced by CONFIG_SRAM_BASE_ADDRESS, the _image_ram_size is also replaced by _flash_used as a preventive measure. Signed-off-by: Nhut Nguyen --- soc/renesas/rz/common/loader_program.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/soc/renesas/rz/common/loader_program.S b/soc/renesas/rz/common/loader_program.S index 581896ef555..5556f42eada 100644 --- a/soc/renesas/rz/common/loader_program.S +++ b/soc/renesas/rz/common/loader_program.S @@ -7,9 +7,10 @@ #include #include +/* Require CONFIG_XIP=n */ #define ROM_START (CONFIG_FLASH_BASE_ADDRESS + DT_REG_ADDR(DT_CHOSEN(zephyr_code_partition))) -#define RAM_START _image_ram_start // Require CONFIG_XIP=n -#define APP_SIZE _image_ram_size +#define RAM_START CONFIG_SRAM_BASE_ADDRESS +#define APP_SIZE _flash_used _ASM_FILE_PROLOGUE