diff --git a/arch/xtensa/src/esp32s2/Bootloader.mk b/arch/xtensa/src/esp32s2/Bootloader.mk index f6c666d952f..6009802bb14 100644 --- a/arch/xtensa/src/esp32s2/Bootloader.mk +++ b/arch/xtensa/src/esp32s2/Bootloader.mk @@ -62,6 +62,7 @@ else ifeq ($(CONFIG_ESP32S2_APP_FORMAT_LEGACY),y) $(Q) { \ echo "CONFIG_PARTITION_TABLE_CUSTOM=y"; \ echo "CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions.csv\""; \ + echo "CONFIG_PARTITION_TABLE_OFFSET=$(CONFIG_ESP32S2_PARTITION_TABLE_OFFSET)"; \ } >> $(BOOTLOADER_CONFIG) endif diff --git a/arch/xtensa/src/esp32s2/Kconfig b/arch/xtensa/src/esp32s2/Kconfig index 0343984f311..1f4ba7323b9 100644 --- a/arch/xtensa/src/esp32s2/Kconfig +++ b/arch/xtensa/src/esp32s2/Kconfig @@ -987,31 +987,12 @@ config ESP32S2_APP_MCUBOOT_HEADER_SIZE default 32 depends on ESP32S2_APP_FORMAT_MCUBOOT -endmenu # Application Image Configuration - -if ESP32S2_APP_FORMAT_LEGACY - -config ESP32S2_PARTITION - bool "ESP32-S2 Partition" - default n - select ESP32S2_SPIFLASH - ---help--- - Decode partition file and initialize partition as MTD. - -menu "Partition Configuration" - depends on ESP32S2_PARTITION - -config ESP32S2_PARTITION_OFFSET - hex "Partition offset" +config ESP32S2_PARTITION_TABLE_OFFSET + hex "Partition Table offset" default "0x8000" + depends on ESP32S2_APP_FORMAT_LEGACY -config ESP32S2_PARTITION_MOUNT - string "Partition mount point" - default "/dev/esp/partition/" - -endmenu # Partition Configuration - -endif +endmenu # Application Image Configuration menu "AES accelerate" depends on ESP32S2_AES_ACCELERATOR diff --git a/tools/esp32s2/Config.mk b/tools/esp32s2/Config.mk index 26a7b76bef8..62b949657be 100644 --- a/tools/esp32s2/Config.mk +++ b/tools/esp32s2/Config.mk @@ -65,7 +65,7 @@ ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ) ifdef ESPTOOL_BINDIR ifeq ($(CONFIG_ESP32S2_APP_FORMAT_LEGACY),y) BL_OFFSET := 0x1000 - PT_OFFSET := 0x8000 + PT_OFFSET := $(CONFIG_ESP32S2_PARTITION_TABLE_OFFSET) BOOTLOADER := $(ESPTOOL_BINDIR)/bootloader-esp32s2.bin PARTITION_TABLE := $(ESPTOOL_BINDIR)/partition-table-esp32s2.bin FLASH_BL := $(BL_OFFSET) $(BOOTLOADER)