Skip to content

Commit cccb15e

Browse files
mmahadevan108ioannisg
authored andcommitted
drivers: flash: MCUX: Split the relocate define based on target memory
Use the CODE_DATA_RELOCATION_SRAM config to indentify code relocated to SRAM so we can setup the MPU for the SRAM region used for code relocation. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 64e973f commit cccb15e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/flash/Kconfig.mcux

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ config FLASH_MCUX_FLEXSPI_XIP
4848
depends on MEMC_MCUX_FLEXSPI
4949
depends on (CODE_FLEXSPI || CODE_FLEXSPI2)
5050
select XIP
51-
select CODE_DATA_RELOCATION
5251
help
5352
Allows using the flash API while running in XIP.
5453
WARNING: It is possible to overwrite the running application itself.
@@ -64,9 +63,11 @@ choice FLASH_MCUX_FLEXSPI_XIP_MEM_TARGET
6463

6564
config FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM
6665
bool "ITCM"
66+
select CODE_DATA_RELOCATION
6767

6868
config FLASH_MCUX_FLEXSPI_XIP_MEM_SRAM
6969
bool "SRAM"
70+
select CODE_DATA_RELOCATION_SRAM
7071

7172
endchoice
7273

0 commit comments

Comments
 (0)