Use custom parition table with 1.5MB for firmware (#2567)
This commit is contained in:
parent
423c733db8
commit
9bd8df4693
|
@ -1,7 +1,7 @@
|
|||
# Espressif ESP32 Partition Table
|
||||
# Espressif ESP32 Partition Table for 2MB flash
|
||||
# Name, Type, SubType, Offset, Size
|
||||
nvs, data, nvs, 0x9000, 0x6000
|
||||
phy_init, data, phy, 0xf000, 0x1000
|
||||
factory, app, factory, 0x10000, 1M
|
||||
factory, app, factory, 0x10000, 0x180000
|
||||
# 0xC2 => NodeMCU, 0x0 => Spiffs
|
||||
spiffs, 0xC2, 0x0, , 960K
|
||||
nodemcuspiffs, 0xC2, 0x0, , 0x70000
|
||||
|
|
|
|
@ -0,0 +1,5 @@
|
|||
# Espressif ESP32 Partition Table for 2MB flash
|
||||
# Name, Type, SubType, Offset, Size
|
||||
nvs, data, nvs, 0x9000, 0x6000
|
||||
phy_init, data, phy, 0xf000, 0x1000
|
||||
factory, app, factory, 0x10000, 0x180000
|
|
|
@ -92,9 +92,9 @@ Serial flasher config --->
|
|||
```
|
||||
|
||||
### Partition Table
|
||||
It is not required to set a custom partition table. Per default the IDF will select `Single factory app, no OTA` and the firmware will create a partition for SPIFFS automatically which fills the remaining flash space.
|
||||
IDF's default partition table `Single factory app, no OTA` does not provide enough room for a firmware including large modules like e.g. `http` or `sodium`. To enable full feature sets, NodeMCU uses a custom partition table from `components/platform/partitions.csv` which allocates ~1.5 MB for the firmware image. During first boot, the firmware creates an additional partition for SPIFFS in the remaining flash space.
|
||||
|
||||
There is a template partition table available in `components/platform/partitions-2MB.csv` locates the SPIFFS partition at a fixed location. The file can be used as a template for custom partition tables with menuconfig:
|
||||
For 2MB flash modules an alternative partition table available as `components/platform/partitions-2MB.csv`. It restricts the SPIFFS partition to ~448 kB and can be used with menuconfig:
|
||||
|
||||
```
|
||||
Partition Table --->
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# set custom partition table for 1.5MB firmware
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="components/platform/partitions.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="components/platform/partitions.csv"
|
||||
|
||||
# Don't warn about undefined variables
|
||||
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=n
|
||||
|
||||
|
|
Loading…
Reference in New Issue