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:09 UTC
[incubator-nuttx] 04/05: risc-v/esp32c3: 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 eb7ffd014e9f86d5c1accb113eb7ee7b4a4a996e
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Mon Oct 25 09:42:26 2021 -0300
risc-v/esp32c3: Enable Partition Table allocation at custom offset
Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
arch/risc-v/src/esp32c3/Bootloader.mk | 1 +
tools/esp32c3/Config.mk | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/risc-v/src/esp32c3/Bootloader.mk b/arch/risc-v/src/esp32c3/Bootloader.mk
index 8430a75..580221e 100644
--- a/arch/risc-v/src/esp32c3/Bootloader.mk
+++ b/arch/risc-v/src/esp32c3/Bootloader.mk
@@ -62,6 +62,7 @@ else ifeq ($(CONFIG_ESP32C3_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_ESP32C3_PARTITION_TABLE_OFFSET)"; \
} >> $(BOOTLOADER_CONFIG)
endif
diff --git a/tools/esp32c3/Config.mk b/tools/esp32c3/Config.mk
index af3f0ae..685cc2e 100644
--- a/tools/esp32c3/Config.mk
+++ b/tools/esp32c3/Config.mk
@@ -65,7 +65,7 @@ ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)
ifdef ESPTOOL_BINDIR
ifeq ($(CONFIG_ESP32C3_APP_FORMAT_LEGACY),y)
BL_OFFSET := 0x0
- PT_OFFSET := 0x8000
+ PT_OFFSET := $(CONFIG_ESP32C3_PARTITION_TABLE_OFFSET)
BOOTLOADER := $(ESPTOOL_BINDIR)/bootloader-esp32c3.bin
PARTITION_TABLE := $(ESPTOOL_BINDIR)/partition-table-esp32c3.bin
FLASH_BL := $(BL_OFFSET) $(BOOTLOADER)