diff --git a/Kconfig.zephyr b/Kconfig.zephyr index ce1a01ea09d..50cce1a41a6 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -62,15 +62,6 @@ config LINKER_ORPHAN_SECTION_ERROR endchoice -config CODE_DATA_RELOCATION - bool "Relocate code/data sections" - depends on ARM - help - When selected this will relocate .text, data and .bss sections from - the specified files and places it in the required memory region. The - files should be specified in the CMakeList.txt file with - a cmake API zephyr_code_relocate(). - config HAS_FLASH_LOAD_OFFSET bool help diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f991e8a1fe9..34b38e53658 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -34,6 +34,26 @@ config ARM_CUSTOM_INTERRUPT_CONTROLLER family cores. The Cortex-M family cores are always equipped with the ARM Nested Vectored Interrupt Controller (NVIC). +config CODE_DATA_RELOCATION + bool "Relocate code/data sections" + depends on CPU_CORTEX_M + help + When selected this will relocate .text, data and .bss sections from + the specified files and places it in the required memory region. The + files should be specified in the CMakeList.txt file with + a cmake API zephyr_code_relocate(). + +config CODE_DATA_RELOCATION_SRAM + bool "Relocate code/data sections to SRAM" + depends on CPU_CORTEX_M + select CODE_DATA_RELOCATION + help + When selected this will relocate .text, data and .bss sections from + the specified files and places it in SRAM. The files should be specified + in the CMakeList.txt file with a cmake API zephyr_code_relocate(). This + config is used to create an MPU entry for the SRAM space used for code + relocation. + rsource "core/aarch32/Kconfig" endmenu