This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit eb889b0884bb9c8ccdc37dcde6493492439c0153 Author: Gustavo Henrique Nihei <[email protected]> AuthorDate: Mon Oct 25 09:52:07 2021 -0300 xtensa/esp32s2: Enable Partition Table allocation at custom offset Signed-off-by: Gustavo Henrique Nihei <[email protected]> --- arch/xtensa/src/esp32s2/Bootloader.mk | 1 + arch/xtensa/src/esp32s2/Kconfig | 27 ++++----------------------- tools/esp32s2/Config.mk | 2 +- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/arch/xtensa/src/esp32s2/Bootloader.mk b/arch/xtensa/src/esp32s2/Bootloader.mk index f6c666d..6009802 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 0343984..1f4ba73 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 26a7b76..62b9496 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)
