soc: esp32: XIP removed from Espressif targets
The way ESP32 XIP works (with MMU and cache) does no fit the way Zephyr XIP is implemented, causing issues related to included Zephyr linker files. Flash code still resides in flash for execution, but MMU/Cache handles it in such way that XIP might not (or should not) be used with current Zephyr approach. To address this problem, XIP configuration option is being removed from Espressif targets. Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
This commit is contained in:
parent
cb583995b8
commit
baf62b7a98
17 changed files with 56 additions and 44 deletions
|
@ -8,7 +8,6 @@ config SOC_SERIES_ESP32
|
||||||
select ARCH_HAS_GDBSTUB
|
select ARCH_HAS_GDBSTUB
|
||||||
select ARCH_SUPPORTS_COREDUMP
|
select ARCH_SUPPORTS_COREDUMP
|
||||||
select PINCTRL
|
select PINCTRL
|
||||||
select XIP if !MCUBOOT
|
|
||||||
select HAS_ESPRESSIF_HAL
|
select HAS_ESPRESSIF_HAL
|
||||||
select CPU_HAS_FPU
|
select CPU_HAS_FPU
|
||||||
select HAS_PM
|
select HAS_PM
|
||||||
|
|
|
@ -42,12 +42,21 @@ user_dram_2_seg_len = SRAM1_USER_SIZE;
|
||||||
#define RAMABLE_REGION_1 dram0_0_seg
|
#define RAMABLE_REGION_1 dram0_0_seg
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef GROUP_DATA_LINK_IN
|
||||||
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
|
||||||
|
|
||||||
|
#undef GROUP_NOLOAD_LINK_IN
|
||||||
|
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
/* Flash segments (rodata and text) should be mapped in virtual address space by providing VMA.
|
/* Flash segments (rodata and text) should be mapped in virtual address space by providing VMA.
|
||||||
* Executing directly from LMA is not possible. */
|
* Executing directly from LMA is not possible. */
|
||||||
#undef GROUP_ROM_LINK_IN
|
#undef GROUP_ROM_LINK_IN
|
||||||
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
||||||
|
|
||||||
/* Make sure new sections have consistent alignment between input and output sections */
|
/* Make sure new sections have consistent alignment between input and output sections */
|
||||||
|
#undef SECTION_DATA_PROLOGUE
|
||||||
|
#define SECTION_DATA_PROLOGUE(name, options, align) name options : ALIGN_WITH_INPUT
|
||||||
|
|
||||||
#undef SECTION_PROLOGUE
|
#undef SECTION_PROLOGUE
|
||||||
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,6 @@
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
#ifdef CONFIG_XIP
|
|
||||||
#error "Xtensa bootloader cannot use XIP"
|
|
||||||
#endif /* CONFIG_XIP */
|
|
||||||
|
|
||||||
/* Disable all romable LMA */
|
/* Disable all romable LMA */
|
||||||
#undef GROUP_DATA_LINK_IN
|
#undef GROUP_DATA_LINK_IN
|
||||||
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
|
@ -12,7 +12,6 @@ config SOC_SERIES_ESP32C2
|
||||||
select RISCV_ISA_EXT_C
|
select RISCV_ISA_EXT_C
|
||||||
select RISCV_ISA_EXT_ZICSR
|
select RISCV_ISA_EXT_ZICSR
|
||||||
select HAS_ESPRESSIF_HAL
|
select HAS_ESPRESSIF_HAL
|
||||||
select XIP if !MCUBOOT
|
|
||||||
|
|
||||||
if SOC_SERIES_ESP32C2
|
if SOC_SERIES_ESP32C2
|
||||||
|
|
||||||
|
|
|
@ -36,12 +36,21 @@ user_dram_seg_len = user_idram_size;
|
||||||
#define RAMABLE_REGION dram0_0_seg
|
#define RAMABLE_REGION dram0_0_seg
|
||||||
#define ROMABLE_REGION FLASH
|
#define ROMABLE_REGION FLASH
|
||||||
|
|
||||||
|
#undef GROUP_DATA_LINK_IN
|
||||||
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
|
||||||
|
|
||||||
|
#undef GROUP_NOLOAD_LINK_IN
|
||||||
|
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
||||||
* Executing directly from LMA is not possible. */
|
* Executing directly from LMA is not possible. */
|
||||||
#undef GROUP_ROM_LINK_IN
|
#undef GROUP_ROM_LINK_IN
|
||||||
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
||||||
|
|
||||||
/* Make sure new sections have consistent alignment between input and output sections */
|
/* Make sure new sections have consistent alignment between input and output sections */
|
||||||
|
#undef SECTION_DATA_PROLOGUE
|
||||||
|
#define SECTION_DATA_PROLOGUE(name, options, align) name options : ALIGN_WITH_INPUT
|
||||||
|
|
||||||
#undef SECTION_PROLOGUE
|
#undef SECTION_PROLOGUE
|
||||||
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
||||||
|
|
||||||
|
@ -727,14 +736,6 @@ SECTIONS
|
||||||
.flash.rodata_end : ALIGN(0x10)
|
.flash.rodata_end : ALIGN(0x10)
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
#ifdef CONFIG_THREAD_LOCAL_STORAGE
|
|
||||||
/* create explicit symbol for __tdata_start so that it is loaded
|
|
||||||
* into proper DROM region atributted by AT keyword below
|
|
||||||
*/
|
|
||||||
__tdata_start = ADDR(tdata);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_rodata_reserved_end = ABSOLUTE(.);
|
_rodata_reserved_end = ABSOLUTE(.);
|
||||||
_image_rodata_end = ABSOLUTE(.);
|
_image_rodata_end = ABSOLUTE(.);
|
||||||
} GROUP_DATA_LINK_IN(RODATA_REGION, ROMABLE_REGION)
|
} GROUP_DATA_LINK_IN(RODATA_REGION, ROMABLE_REGION)
|
||||||
|
|
|
@ -10,12 +10,8 @@
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
#ifdef CONFIG_XIP
|
|
||||||
#error "ESP32C2 bootloader cannot use XIP"
|
|
||||||
#endif /* CONFIG_XIP */
|
|
||||||
|
|
||||||
/* Disable all romable LMA */
|
/* Disable all romable LMA */
|
||||||
#udef GROUP_DATA_LINK_IN
|
#undef GROUP_DATA_LINK_IN
|
||||||
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
#define RAMABLE_REGION dram_seg
|
#define RAMABLE_REGION dram_seg
|
||||||
|
|
|
@ -12,7 +12,6 @@ config SOC_SERIES_ESP32C3
|
||||||
select RISCV_ISA_EXT_C
|
select RISCV_ISA_EXT_C
|
||||||
select RISCV_ISA_EXT_ZICSR
|
select RISCV_ISA_EXT_ZICSR
|
||||||
select HAS_ESPRESSIF_HAL
|
select HAS_ESPRESSIF_HAL
|
||||||
select XIP if !MCUBOOT
|
|
||||||
select HAS_PM
|
select HAS_PM
|
||||||
select HAS_POWEROFF
|
select HAS_POWEROFF
|
||||||
|
|
||||||
|
|
|
@ -36,12 +36,21 @@ user_dram_seg_len = user_idram_size;
|
||||||
#define RAMABLE_REGION dram0_0_seg
|
#define RAMABLE_REGION dram0_0_seg
|
||||||
#define ROMABLE_REGION FLASH
|
#define ROMABLE_REGION FLASH
|
||||||
|
|
||||||
|
#undef GROUP_DATA_LINK_IN
|
||||||
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
|
||||||
|
|
||||||
|
#undef GROUP_NOLOAD_LINK_IN
|
||||||
|
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
||||||
* Executing directly from LMA is not possible. */
|
* Executing directly from LMA is not possible. */
|
||||||
#undef GROUP_ROM_LINK_IN
|
#undef GROUP_ROM_LINK_IN
|
||||||
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
||||||
|
|
||||||
/* Make sure new sections have consistent alignment between input and output sections */
|
/* Make sure new sections have consistent alignment between input and output sections */
|
||||||
|
#undef SECTION_DATA_PROLOGUE
|
||||||
|
#define SECTION_DATA_PROLOGUE(name, options, align) name options : ALIGN_WITH_INPUT
|
||||||
|
|
||||||
#undef SECTION_PROLOGUE
|
#undef SECTION_PROLOGUE
|
||||||
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
||||||
|
|
||||||
|
@ -793,14 +802,6 @@ SECTIONS
|
||||||
.flash.rodata_end : ALIGN(0x10)
|
.flash.rodata_end : ALIGN(0x10)
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
||||||
#ifdef CONFIG_THREAD_LOCAL_STORAGE
|
|
||||||
/* create explicit symbol for __tdata_start so that it is loaded
|
|
||||||
* into proper DROM region atributted by AT keyword below
|
|
||||||
*/
|
|
||||||
__tdata_start = ADDR(tdata);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_rodata_reserved_end = ABSOLUTE(.);
|
_rodata_reserved_end = ABSOLUTE(.);
|
||||||
_image_rodata_end = ABSOLUTE(.);
|
_image_rodata_end = ABSOLUTE(.);
|
||||||
} GROUP_DATA_LINK_IN(RODATA_REGION, ROMABLE_REGION)
|
} GROUP_DATA_LINK_IN(RODATA_REGION, ROMABLE_REGION)
|
||||||
|
|
|
@ -10,12 +10,8 @@
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
#ifdef CONFIG_XIP
|
|
||||||
#error "ESP32C3 bootloader cannot use XIP"
|
|
||||||
#endif /* CONFIG_XIP */
|
|
||||||
|
|
||||||
/* Disable all romable LMA */
|
/* Disable all romable LMA */
|
||||||
#udef GROUP_DATA_LINK_IN
|
#undef GROUP_DATA_LINK_IN
|
||||||
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
#define RAMABLE_REGION dram_seg
|
#define RAMABLE_REGION dram_seg
|
||||||
|
|
|
@ -13,7 +13,6 @@ config SOC_SERIES_ESP32C6
|
||||||
select RISCV_ISA_EXT_C
|
select RISCV_ISA_EXT_C
|
||||||
select RISCV_ISA_EXT_ZICSR
|
select RISCV_ISA_EXT_ZICSR
|
||||||
select HAS_ESPRESSIF_HAL
|
select HAS_ESPRESSIF_HAL
|
||||||
select XIP if !MCUBOOT
|
|
||||||
select HAS_PM
|
select HAS_PM
|
||||||
select HAS_POWEROFF
|
select HAS_POWEROFF
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,21 @@ user_sram_size = (user_sram_end - user_sram_org);
|
||||||
#define RAMABLE_REGION sram0_0_seg
|
#define RAMABLE_REGION sram0_0_seg
|
||||||
#define ROMABLE_REGION FLASH
|
#define ROMABLE_REGION FLASH
|
||||||
|
|
||||||
|
#undef GROUP_DATA_LINK_IN
|
||||||
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
|
||||||
|
|
||||||
|
#undef GROUP_NOLOAD_LINK_IN
|
||||||
|
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
||||||
* Executing directly from LMA is not possible. */
|
* Executing directly from LMA is not possible. */
|
||||||
#undef GROUP_ROM_LINK_IN
|
#undef GROUP_ROM_LINK_IN
|
||||||
#define GROUP_ROM_LINK_IN(vregion, lregion) > CACHED_REGION AT > lregion
|
#define GROUP_ROM_LINK_IN(vregion, lregion) > CACHED_REGION AT > lregion
|
||||||
|
|
||||||
/* Make sure new sections have consistent alignment between input and output sections */
|
/* Make sure new sections have consistent alignment between input and output sections */
|
||||||
|
#undef SECTION_DATA_PROLOGUE
|
||||||
|
#define SECTION_DATA_PROLOGUE(name, options, align) name options : ALIGN_WITH_INPUT
|
||||||
|
|
||||||
#undef SECTION_PROLOGUE
|
#undef SECTION_PROLOGUE
|
||||||
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ config SOC_SERIES_ESP32S2
|
||||||
select DYNAMIC_INTERRUPTS
|
select DYNAMIC_INTERRUPTS
|
||||||
select CLOCK_CONTROL
|
select CLOCK_CONTROL
|
||||||
select PINCTRL
|
select PINCTRL
|
||||||
select XIP if !MCUBOOT
|
|
||||||
select HAS_ESPRESSIF_HAL
|
select HAS_ESPRESSIF_HAL
|
||||||
select ARCH_SUPPORTS_COREDUMP
|
select ARCH_SUPPORTS_COREDUMP
|
||||||
select HAS_PM
|
select HAS_PM
|
||||||
|
|
|
@ -37,12 +37,21 @@ user_dram_seg_len = user_idram_size;
|
||||||
#define RAMABLE_REGION dram0_0_seg
|
#define RAMABLE_REGION dram0_0_seg
|
||||||
#define ROMABLE_REGION FLASH
|
#define ROMABLE_REGION FLASH
|
||||||
|
|
||||||
|
#undef GROUP_DATA_LINK_IN
|
||||||
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
|
||||||
|
|
||||||
|
#undef GROUP_NOLOAD_LINK_IN
|
||||||
|
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
/* Flash segments (rodata and text) should be mapped in virtual address space by providing VMA.
|
/* Flash segments (rodata and text) should be mapped in virtual address space by providing VMA.
|
||||||
* Executing directly from LMA is not possible. */
|
* Executing directly from LMA is not possible. */
|
||||||
#undef GROUP_ROM_LINK_IN
|
#undef GROUP_ROM_LINK_IN
|
||||||
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
||||||
|
|
||||||
/* Make sure new sections have consistent alignment between input and output sections */
|
/* Make sure new sections have consistent alignment between input and output sections */
|
||||||
|
#undef SECTION_DATA_PROLOGUE
|
||||||
|
#define SECTION_DATA_PROLOGUE(name, options, align) name options : ALIGN_WITH_INPUT
|
||||||
|
|
||||||
#undef SECTION_PROLOGUE
|
#undef SECTION_PROLOGUE
|
||||||
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,6 @@
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
#ifdef CONFIG_XIP
|
|
||||||
#error "Xtensa bootloader cannot use XIP"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Disable all romable LMA */
|
/* Disable all romable LMA */
|
||||||
#undef GROUP_DATA_LINK_IN
|
#undef GROUP_DATA_LINK_IN
|
||||||
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
|
@ -7,7 +7,6 @@ config SOC_SERIES_ESP32S3
|
||||||
select ARCH_SUPPORTS_COREDUMP
|
select ARCH_SUPPORTS_COREDUMP
|
||||||
select CLOCK_CONTROL
|
select CLOCK_CONTROL
|
||||||
select PINCTRL
|
select PINCTRL
|
||||||
select XIP if !MCUBOOT
|
|
||||||
select HAS_ESPRESSIF_HAL
|
select HAS_ESPRESSIF_HAL
|
||||||
select CPU_HAS_FPU
|
select CPU_HAS_FPU
|
||||||
select HAS_PM
|
select HAS_PM
|
||||||
|
|
|
@ -36,12 +36,21 @@ user_dram_seg_len = user_idram_size;
|
||||||
#define RAMABLE_REGION dram0_0_seg
|
#define RAMABLE_REGION dram0_0_seg
|
||||||
#define ROMABLE_REGION FLASH
|
#define ROMABLE_REGION FLASH
|
||||||
|
|
||||||
|
#undef GROUP_DATA_LINK_IN
|
||||||
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
|
||||||
|
|
||||||
|
#undef GROUP_NOLOAD_LINK_IN
|
||||||
|
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
||||||
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
/* Flash segments (rodata and text) should be mapped in the virtual address spaces.
|
||||||
* Executing directly from LMA is not possible. */
|
* Executing directly from LMA is not possible. */
|
||||||
#undef GROUP_ROM_LINK_IN
|
#undef GROUP_ROM_LINK_IN
|
||||||
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
|
||||||
|
|
||||||
/* Make sure new sections have consistent alignment between input and output sections */
|
/* Make sure new sections have consistent alignment between input and output sections */
|
||||||
|
#undef SECTION_DATA_PROLOGUE
|
||||||
|
#define SECTION_DATA_PROLOGUE(name, options, align) name options : ALIGN_WITH_INPUT
|
||||||
|
|
||||||
#undef SECTION_PROLOGUE
|
#undef SECTION_PROLOGUE
|
||||||
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
#define SECTION_PROLOGUE SECTION_DATA_PROLOGUE
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,6 @@
|
||||||
|
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
#ifdef CONFIG_XIP
|
|
||||||
#error "Xtensa bootloader cannot use XIP"
|
|
||||||
#endif /* CONFIG_XIP */
|
|
||||||
|
|
||||||
/* Disable all romable LMA */
|
/* Disable all romable LMA */
|
||||||
#undef GROUP_DATA_LINK_IN
|
#undef GROUP_DATA_LINK_IN
|
||||||
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue