How to change partition table using VSCode and Arduino framework

Is there any more detailed description than what one can find here: Espressif 32 — PlatformIO latest documentation ?

According to this I have added the following line to my platformio.ini:

board_build.partitions = default_16MB.csv

which has these additional settings:

platform = espressif32
board = az-delivery-devkit-v4
framework = arduino

The board has 16 MB flash.
However, trying to change the flash size with the additional line will put it into reset loop:

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
mode:DIO, clock div:2
entry 0x400806ac

Using anything else than default.csv will put it into the loop.
The default partition table works fine though. But it is only 1 MB.
I was using the blink example for this.
I also tried erasing. But it didn’t change the situation.
Seems like I am missing something?

What about default_8MB.csv? Does that lock up also?

1 Like

Yes. I tried several of the csv files. But same result for all of them.

[Edit] I actually only tested files >4 MB

1 Like

Can you manually execute to check that the module has the actual 16MB flash? You can open a terminal (or [PIO Terminal]), cd into the path for (usually C:\Users\<user>\.platformio\packages\tool-esptoolypy and execute

python --port COM22 flash_id

where COM22 is the actual COM port where the ESP32 is connected. What does that output?


Thanks for the hint! It doesn’t actually have 16 MB. I believed this data sheet:
as well as the PIO board info. However, in the terminal output it actually says that it detected only 4 MB. So next time I should look through the log more carefully. Here it is again just for completeness:

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 1.12.0 > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 16MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)

  • framework-arduinoespressif32 3.10004.200129 (1.0.4)
  • tool-esptoolpy 1.20600.0 (2.6.0)
  • tool-mkspiffs 2.230.0 (2.30)
  • toolchain-xtensa32 2.50200.80 (5.2.0)
    LDF: Library Dependency Finder → ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 26 compatible libraries
    Scanning dependencies…
    No dependencies
    Building in release mode
    Generating partitions .pio\build\az-delivery-devkit-v4\partitions.bin
    Linking .pio\build\az-delivery-devkit-v4\firmware.elf
    Retrieving maximum program size .pio\build\az-delivery-devkit-v4\firmware.elf
    Checking size .pio\build\az-delivery-devkit-v4\firmware.elf
    Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
    RAM: [ ] 2.9% (used 15436 bytes from 532480 bytes)
    Flash: [= ] 6.9% (used 216641 bytes from 3145728 bytes)
    Configuring upload protocol…
    AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
    CURRENT: upload_protocol = esptool
    Looking for upload port…
    Auto-detected: COM6
    Uploading .pio\build\az-delivery-devkit-v4\firmware.bin v2.6
    Serial port COM6
    Chip is ESP32D0WDQ6 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
    MAC: 24:6f:28:97:41:d0
    Uploading stub…
    Running stub…
    Stub running…
    Changing baud rate to 460800
    Configuring flash size…
    Auto-detected Flash size: 4MB

It supports 16 MB external flash, but internal flash size is 4 MB. Small but important detail :smiley:
Would be a good idea, to have this info also in the board details.

1 Like

It’s also very confusing to me how this module is described as 16MB in its datasheet when it has an ESP-WROOM-32 module for which Espressif says

Note that even PlatformIO has copied that flash size

Though when I look at their german distributor site they officiall comment:

How big is the Flash memory of this module? Is that SRAM actually 512 kb big?

Dear Customer, the difference in board layout do not have an influence on the specification of the chipset. The here used ESP-WROOM-32 is from Espressif and conforms to the technical specifications of the manufacturer, meaning 4MB internal flash with the support for up to 16MB external and 520 KB SRAM, by which circa 8KB are used for the RTC. For further questions I’m at your service. Regards …

So yes, pretty sure that their “16MB Flash” is not a 16MB flash.


Really… they went… there? :face_vomiting: :man_facepalming:

Time to sell my PC motherboard with 16GB DDR4 RAM onboard as a 64GB motherboard online I guess. After all it can handle 64GB external memory :joy:

Hm… now I wonder what mine is… oh… damn… Max. 16 GB, DDR3… looks like I need an upgrade… drooling over some of the Ryzen benchmarks… since I’m still running a Intel i5 (first gen, Clarkdale)… should be a bit of a performance boost!