Arduino core for ESP32 Wiki content

Change partition size (Arduino IDE)

DEPRECATED. The partition size can now be choosen from the Tools–>Partition Scheme menu.

To change the partition size for ESP32 using Arduino IDE I recommend this approach:

Create a new partition description file in <LOCATION_OF_ARDUINO_ESP32>/tools/partitions , e.g max.csv

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x1E0000,
app1,     app,  ota_1,   0x1F0000,0x1E0000,
eeprom,   data, 0x99,    0x3F0000,0x1000,
spiffs,   data, spiffs,  0x3F1000,0xF000,

The above example gives you a partition size of 0x1E0000 or 1966080 bytes on cost of a smaller SPIFFS partition.

Edit <LOCATION_OF_ARDUINO_ESP32>/boards.txt

Make a copy of the board description that you want to change the partition size for, in this example I copied ESP32 Dev Module. Rename all ‘esp32.‘ entries to ‘esp32max.‘. Change the lines

esp32.name=ESP32 Dev Module
...
esp32.upload.maximum_size=1310720
...
esp32.build.partitions=default
...

to

esp32max.name=ESP32 Dev Max
...
esp32max.upload.maximum_size=1966080
...
esp32max.build.partitions=max
...

Save all, restart ArduinoIDE and select the new board ‘ESP32 DEV MAX

Example output of a very large sketch including BLE and Bluetooth Serial:

Archiving
 built core (caching) in: 
C:\Users\BeeGee\AppData\Local\Temp\arduino_cache_147130\core\core_espressif_esp32_esp32max_FlashMode_qio,FlashFreq_80,FlashSize_4M,UploadSpeed_921600,DebugLevel_none_af83d5f1a3fa262478237a470cbae092.a
Sketch
 uses 1567406 bytes (79%) of program storage space. Maximum is 1966080 
bytes.
Global variables use 70308 bytes (23%) of dynamic memory, leaving 224604
 bytes for local variables. Maximum is 294912 bytes.
Sending invitation to 192.168.0.112 ..