From ac0ae62b587d72f17e2f45cb46df7871935c429a Mon Sep 17 00:00:00 2001 From: Daniel DeGrasse Date: Sun, 30 Apr 2023 19:25:59 -0500 Subject: [PATCH] soc: arm: nxp_imx: add FLEXSPI1 and FLEXSPI2 memory sections for RT5xx Add FLEXSPI1 and FLEXSPI2 memory sections for RT5xx SOC. These sections can be used by the user's application as part of a custom linker script, if the application needs to relocate a buffer to external SRAM connected to FLEXSPI1 or FLEXSPI2 Signed-off-by: Daniel DeGrasse --- soc/arm/nxp_imx/rt5xx/linker.ld | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/soc/arm/nxp_imx/rt5xx/linker.ld b/soc/arm/nxp_imx/rt5xx/linker.ld index 7710d698dd1..3b84d02a527 100644 --- a/soc/arm/nxp_imx/rt5xx/linker.ld +++ b/soc/arm/nxp_imx/rt5xx/linker.ld @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NXP + * Copyright 2021,2023 NXP * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,4 +9,16 @@ * * This is the linker script for both standard images and XIP images. */ + +#include + + MEMORY + { +#if (DT_REG_SIZE_BY_IDX(DT_NODELABEL(flexspi1), 1) > 0) + FLEXSPI1 (wx) : ORIGIN = DT_REG_ADDR_BY_IDX(DT_NODELABEL(flexspi1), 1), LENGTH = DT_REG_SIZE_BY_IDX(DT_NODELABEL(flexspi1), 1) +#endif +#if (DT_REG_SIZE_BY_IDX(DT_NODELABEL(flexspi2), 1) > 0) + FLEXSPI2 (wx) : ORIGIN = DT_REG_ADDR_BY_IDX(DT_NODELABEL(flexspi2), 1), LENGTH = DT_REG_SIZE_BY_IDX(DT_NODELABEL(flexspi2), 1) +#endif + } #include