13.Add hardware partition configuration option in Arduino IDE

The flash memory of the ESP32 board has 16M, and the range of the storage address expressed in hexadecimal is 0x0-0x01000000.

This is the partition table that has been configured by the system, as shown in the figure below:

The storage location of this partition table file on the computer:


It can be seen from the above partition table: APP0 area and APP1 area are 4.5M each; the data area is SPIFFS, and the size is 6.9M.

But in the Arduino IDE, this configuration is not included in the hardware partition configuration options of the ESP32 Dev Module:

We need to add this configuration to the ESP32 Dev Module.

Open the development board configuration file:


Locate the name of the development board: esp32.name=ESP32 Dev Module, as shown in the figure below:

The line of text in the ESP32 Dev Module partition configuration in the configuration file:


Add the following 3 lines of text below this line:

esp32.menu.PartitionScheme.large_spiffs=BiBoard V0(4.5 MB APP with OTA /6.9 MB SPIFFS)

The following explains the meaning of the three lines of text:

esp32.menu.PartitionScheme.large_spiffs=BiBoard V0(4.5 MB APP with OTA /6.9 MB SPIFFS)

The name of the ESP32 partition configuration, we named it BiBoard V0 (4.5M APP with OTA /6.9 MB SPIFFS), or it can be replaced with other names you are familiar with.


The partition configuration file information is the file large_spiffs_16MB.csv . You can also write a partition file to adjust the file size of the APP and data area.


This line of text specifies that the maximum upload program size is 4685824 bytes.

Let's try to compile a simple program to test whether the above configuration is set successfully.

Reopen the Arduino IDE, we can see the BiBoard just configured:

After compiling the program, the result is as shown in the figure below:

Compilation is complete, using 213KB of Flash (4%), and the maximum usable size is 4,685,824 bytes.

In this passage, โ€œ4685824 bytesโ€ is specified in the third line of text just added to the configuration file.

If you use Arduino IDE 2.0.*, the partition option may not appear automatically. To fix:

  1. Select File > Quit from the Arduino IDE menu to close all active Arduino windows and quit the process.

  2. Delete the "User data" folder:

    • Windows:

      • C:\Users\<user name>\AppData\Roaming\arduino-ide\
    • Linux:

      • ~/.config/arduino-ide/
    • macOS:

      • ~/Library/Application Support/arduino-ide/
  3. Restart the Arduino IDE.

The custom board options menus should now reflect any changes that were made to boards.txt.

So far, you have completed the configuration of the development board with the largest flash memory space in Arduino IDE.

Last updated