xtensa/esp32s2: Enable Partition Table allocation at custom offset

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2021-10-25 09:52:07 -03:00 committed by Alan Carvalho de Assis
parent eb7ffd014e
commit eb889b0884
3 changed files with 6 additions and 24 deletions

View File

@ -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

View File

@ -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

View File

@ -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)