You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/10/25 19:35:07 UTC

[incubator-nuttx] 02/05: xtensa/esp32: Enable Partition Table allocation at custom offset

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 9d7b9821b3f98bb5082c23842811b375d296eae9
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Mon Oct 25 09:51:45 2021 -0300

    xtensa/esp32: Enable Partition Table allocation at custom offset
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 arch/xtensa/src/esp32/Bootloader.mk | 1 +
 tools/esp32/Config.mk               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/xtensa/src/esp32/Bootloader.mk b/arch/xtensa/src/esp32/Bootloader.mk
index c264f89..4d06770 100644
--- a/arch/xtensa/src/esp32/Bootloader.mk
+++ b/arch/xtensa/src/esp32/Bootloader.mk
@@ -62,6 +62,7 @@ else ifeq ($(CONFIG_ESP32_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_ESP32_PARTITION_TABLE_OFFSET)";                    \
 	} >> $(BOOTLOADER_CONFIG)
 endif
 
diff --git a/tools/esp32/Config.mk b/tools/esp32/Config.mk
index fe242b4..5f0c867 100644
--- a/tools/esp32/Config.mk
+++ b/tools/esp32/Config.mk
@@ -65,7 +65,7 @@ ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)
 ifdef ESPTOOL_BINDIR
 	ifeq ($(CONFIG_ESP32_APP_FORMAT_LEGACY),y)
 		BL_OFFSET       := 0x1000
-		PT_OFFSET       := 0x8000
+		PT_OFFSET       := $(CONFIG_ESP32_PARTITION_TABLE_OFFSET)
 		BOOTLOADER      := $(ESPTOOL_BINDIR)/bootloader-esp32.bin
 		PARTITION_TABLE := $(ESPTOOL_BINDIR)/partition-table-esp32.bin
 		FLASH_BL        := $(BL_OFFSET) $(BOOTLOADER)