Expansion of NVS partition requires adapt default app partition address in esptool

If you want to increase the size of the NVS partition, the start address of the app partition changes as well. But Arduino IDE (using esptool to flash the ESP32) has the start address hard-coded.

If, for example, you change your partition table into

The new start address for the application would be 0x20000 instead of 0x10000. Arduino IDE would flash the application, but to the wrong address.

To flash the app to the correct address there are 2 possibilities:

  1. Start esptool manually with the correct app start address
  2. Tell Arduino IDE to flash the app to the correct app start address.

The second one can be achieved by changing the file platform.txt in your <SKETCHBOOK_FOLDER>\hardware\espressif\esp32 folder.

Inside platform.txt search for the entriesĀ tools.esptool.upload.pattern andĀ tools.esptool.upload.pattern.linux

The pattern look like

Change the 0x10000 in the patterns to 0x20000 and esptool will flash the application to the correct location.

Loading...
Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Leave a Reply

Your email address will not be published. Required fields are marked *

Free Link Directory