Skip to content
Prev Previous commit
Next Next commit
Add partition scheme selection for menuconfig
  • Loading branch information
me-no-dev committed Apr 6, 2018
commit 535a55dd4ca19d7fa10d10e47367ed8edd7b866b
21 changes: 21 additions & 0 deletions Kconfig → Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,27 @@ config ARDUHAL_ESP_LOG

endmenu

choice ARDUHAL_PARTITION_SCHEME
bool "Used partition scheme"
default ARDUHAL_PARTITION_SCHEME_DEFAULT
help
Specify which partition scheme to be used.

config ARDUHAL_PARTITION_SCHEME_DEFAULT
bool "Default"
config ARDUHAL_PARTITION_SCHEME_MINIMAL
bool "Minimal (for 2MB FLASH)"
config ARDUHAL_PARTITION_SCHEME_NO_OTA
bool "No OTA (for large apps)"
endchoice

config ARDUHAL_PARTITION_SCHEME
string
default "default" if ARDUHAL_PARTITION_SCHEME_DEFAULT
default "minimal" if ARDUHAL_PARTITION_SCHEME_MINIMAL
default "no_ota" if ARDUHAL_PARTITION_SCHEME_NO_OTA


config AUTOCONNECT_WIFI
bool "Autoconnect WiFi on boot"
default "n"
Expand Down
2 changes: 1 addition & 1 deletion Makefile.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BOOT_APP_BIN_ROOT := $(call dequote,$(COMPONENT_PATH))
BOOT_APP_BIN_PATH := $(call dequote,$(abspath $(BOOT_APP_BIN_ROOT)/$(subst $(quote),,tools/partitions/boot_app0.bin)))

ifndef CONFIG_PARTITION_TABLE_CUSTOM
PARTITION_TABLE_CSV_PATH = $(call dequote,$(abspath $(BOOT_APP_BIN_ROOT)/$(subst $(quote),,tools/partitions/default.csv)))
PARTITION_TABLE_CSV_PATH = $(call dequote,$(abspath $(BOOT_APP_BIN_ROOT)/$(subst $(quote),,tools/partitions/$(CONFIG_ARDUHAL_PARTITION_SCHEME).csv)))
endif

BOOT_APP_BIN_FLASH_CMD = $(ESPTOOLPY_SERIAL) write_flash $(BOOT_APP_BIN_OFFSET) $(BOOT_APP_BIN_PATH)
Expand Down
6 changes: 6 additions & 0 deletions tools/partitions/no_ota.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
eeprom, data, 0x99, 0x210000,0x1000,
spiffs, data, spiffs, 0x211000,0x1EF000,