Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 2.59 KB

configuration.adoc

File metadata and controls

57 lines (42 loc) · 2.59 KB

General configuration

The central configuration tool for the build options and module configuration is menuconfig. It can be started with the idf.py tool:

idf.py menuconfig
menuconfig overview
Figure 1. Menuconfig start view

Many options can be customized here, but always make sure to have an understanding of the consequences changes of the configuration has on the build process and the final image.

The following sections give an overview of some important configuration options. Refer to ESP-IDF Project configuration for a detailed description of all options.

Menu: Bootloader config

This menu allows the user to configure the bootloader. Usually the default values are fine but can be fine tuned, like the verbosity of the logger or the optimization level of the compiler.

Menu bootloader config
Figure 2. Menu bootloader config

In case OTA updates are used, it might be interesting to enable a factory reset by using a button connected to a GPIO pin. By enabling the corresponding option, the bootloader adds some functionality to boot from the factory partition instead of any OTA partition, and optionally clears OTA partitions.

Additionally, app rollback can be enabled when using OTA. If enabled, a new OTA firmware image must set the new firmware partition as valid so that the bootloader will boot it on the next reboot. If it is not marked as valid, the bootloader will boot from the previous valid OTA partition.

Menu: Serial flasher config

With the options in this menu the parameters regarding the flashing process can be configured. Usually the defaults are fine, as shown in figure Menu serial flasher.

Menu serial flasher
Figure 3. Menu serial flasher

The size of the available flash is, by default, set to 2MB. Many widely available ESP32 boards have a different size of the flash, for example 4MB. Make sure to configure the correct size. If the size is not correct, for example smaller than the actual size, an error will be shown when flashing the binary image or building the partition table image, saying that the generated image does not fit into the flash.