ESP-IDF uses kconfiglib which is a Python-based extension to the Kconfig system which provides a compile-time project configuration mechanism. Kconfig is based around options of several types: integer, string, boolean. Kconfig files specify dependencies between options, default values of the options, the way the options are grouped together, etc.
For the complete list of available features please see Kconfig and kconfiglib extentions
Application developers can open a terminal-based project configuration menu with the idf.py menuconfig build target.
After being updated, this configuration is saved inside sdkconfig file in the project root directory. Based on sdkconfig, application build targets will generate sdkconfig.h file in the build directory, and will make sdkconfig options available to the project build system and source files.
In some cases, such as when sdkconfig file is under revision control, the fact that sdkconfig file gets changed by the build system may be inconvenient. The build system offers a way to avoid this, in the form of sdkconfig.defaults file. This file is never touched by the build system, and can be created manually or automatically. It can contain all the options which matter for the given application and are different from the default ones. The format is the same as that of the sdkconfig file. sdkconfig.defaults can be created manually when one remembers all the changed configurations. Otherwise, the file can be generated automatically by running the idf.py save-defconfig command.
Once sdkconfig.defaults is created, sdkconfig can be deleted and added to the ignore list of the revision control system (e.g. .gitignore file for git). Project build targets will automatically create sdkconfig file, populated with the settings from sdkconfig.defaults file, and the rest of the settings will be set to their default values. Note that the build process will not override settings that are already in sdkconfig by ones from sdkconfig.defaults. For more information, see Custom Sdkconfig Defaults .
The following attributes of Kconfig files are standardized:
Within any menu, option names should have a consistent prefix. The prefix length is currently set to at least 3 characters.
The indentation style is 4 characters created by spaces. All sub-items belonging to a parent item are indented by one level deeper. For example, menu is indented by 0 characters, the config inside of the menu by 4 characters, the help of the config by 8 characters and the text of the help by 12 characters.
No trailing spaces are allowed at the end of the lines.
The maximum length of options is set to 40 characters.
The maximum length of lines is set to 120 characters.
tools/check_kconfigs.py is provided for checking the Kconfig formatting rules. The checker checks all Kconfig and Kconfig.projbuild files in the ESP-IDF directory and generates a new file with suffix .new with some recommendations how to fix issues (if there are any). Please note that the checker cannot correct all rules and the responsibility of the developer is to check and make final corrections in order to pass the tests. For example, indentations will be corrected if there isn’t some misleading previous formatting but it cannot come up with a common prefix for options inside a menu.
The standard Kconfig tools ignore unknown options in sdkconfig. So if a developer has custom settings for options which are renamed in newer ESP-IDF releases then the given setting for the option would be silently ignored. Therefore, several features have been adopted to avoid this:
confgen.py is used by the tool chain to pre-process sdkconfig files before anything else, for examplemenuconfig, would read them. As the consequence, the settings for old options will be kept and not ignored.
confgen.py recursively finds all sdkconfig.rename files in ESP-IDF directory which contain old and newKconfig option names. Old options are replaced by new ones in the sdkconfig file. Renames that should only appear for a single target can be placed in a target specific rename file: sdkconfig.rename.TARGET, where TARGET is the target name, e.g. sdkconfig.rename.esp32s2.
confgen.py post-processes sdkconfig files and generates all build outputs (sdkconfig.h, sdkconfig.cmake, auto.conf) by adding a list of compatibility statements, i.e. value of the old option is set the value of the new option (after modification). This is done in order to not break customer codes where old option might still be used.
Deprecated options and their replacements are automatically generated by confgen.py.
Subsequent sections contain the list of available ESP-IDF options, automatically generated from Kconfig files. Note that depending on the options selected, some options listed here may not be visible by default in the interface of menuconfig.
By convention, all option names are upper case with underscores. When Kconfig generates sdkconfig and sdkconfig.h files, option names are prefixed with CONFIG_. So if an option ENABLE_FOO is defined in a Kconfig file and selected in menuconfig, then sdkconfig and sdkconfig.h files will have CONFIG_ENABLE_FOO defined. In this reference, option names are also prefixed with CONFIG_, same as in the source code.
Contains:
Application build type
Found in: Build type
Select the way the application is built.
By default, the application is built as a binary file in a format compatible with the ESP-IDF bootloader. In addition to this application, 2nd stage bootloader is also built. Application and bootloader binaries can be written into flash and loaded/executed from there.
Another option, useful for only very small and limited applications, is to only link the .elf file of the application, such that it can be loaded directly into RAM over JTAG. Note that since IRAM and DRAM sizes are very limited, it is not possible to build any complex application this way. However for kinds of testing and debugging, this option may provide faster iterations, since the application does not need to be written into flash. Note that at the moment, ESP-IDF does not contain all the startup code required to initialize the CPUs and ROM memory (data/bss). Therefore it is necessary to execute a bit of ROM code prior to executing the application. A gdbinit file may look as follows (for ESP32):
# Connect to a running instance of OpenOCD target remote :3333 # Reset and halt the target mon reset halt # Run to a specific point in ROM code, # where most of initialization is complete. thb *0x40007d54 c # Load the application into RAM load # Run till app_main tb app_main c
Execute this gdbinit file as follows:
xtensa-esp32-elf-gdb build/app-name.elf -x gdbinit
Example gdbinit files for other targets can be found in tools/test_apps/system/gdb_loadable_elf/
Recommended sdkconfig.defaults for building loadable ELF files is as follows. CONFIG_APP_BUILD_TYPE_ELF_RAM is required, other options help reduce application memory footprint.
CONFIG_APP_BUILD_TYPE_ELF_RAM=y CONFIG_VFS_SUPPORT_TERMIOS= CONFIG_NEWLIB_NANO_FORMAT=y CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y CONFIG_ESP_DEBUG_STUBS_ENABLE= CONFIG_ESP_ERR_TO_NAME_LOOKUP=
Available options:Default (binary application + 2nd stage bootloader) (APP_BUILD_TYPE_APP_2NDBOOT)
ELF file, loadable into RAM (EXPERIMENTAL)) (APP_BUILD_TYPE_ELF_RAM)
Enable reproducible build
Found in: Build type
If enabled, all date, time, and path information would be eliminated. A .gdbinit file would be create automatically. (or will be append if you have one already)
Default value:No (disabled)
No Binary Blobs
Found in: Build type
If enabled, this disables the linking of binary libraries in the application build. Note that after enabling this Wi-Fi/Bluetooth will not work.
Default value:No (disabled)
App compatible with bootloaders before ESP-IDF v2.1
Found in: Build type
Bootloaders before ESP-IDF v2.1 did less initialisation of the system clock. This setting needs to be enabled to build an app which can be booted by these older bootloaders.
If this setting is enabled, the app can be booted by any bootloader from IDF v1.0 up to the current version.
If this setting is disabled, the app can only be booted by bootloaders from IDF v2.1 or newer.
Enabling this setting adds approximately 1KB to the app’s IRAM usage.
Default value:No (disabled)
App compatible with bootloader and partition table before ESP-IDF v3.1
Found in: Build type
Partition tables before ESP-IDF V3.1 do not contain an MD5 checksum field, and the bootloader before ESP-IDF v3.1 cannot read a partition table that contains an MD5 checksum field.
Enable this option only if your app needs to boot on a bootloader and/or partition table that was generated from a version *before* ESP-IDF v3.1.
If this option and Flash Encryption are enabled at the same time, and any data partitions in the partition table are marked Encrypted, then the partition encrypted flag should be manually verified in the app before accessing the partition (see CVE-2021-27926).
Default value:No (disabled)
Contains:
Bootloader optimization Level
Found in: Bootloader config
This option sets compiler optimization level (gcc -O argument) for the bootloader.
The default “Size” setting will add the -0s flag to CFLAGS.
The “Debug” setting will add the -Og flag to CFLAGS.
The “Performance” setting will add the -O2 flag to CFLAGS.
The “None” setting will add the -O0 flag to CFLAGS.
Note that custom optimization levels may be unsupported.
Available options:Size (-Os) (BOOTLOADER_COMPILER_OPTIMIZATION_SIZE)
Debug (-Og) (BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG)
Optimize for performance (-O2) (BOOTLOADER_COMPILER_OPTIMIZATION_PERF)
Debug without optimization (-O0) (BOOTLOADER_COMPILER_OPTIMIZATION_NONE)
Bootloader log verbosity
Found in: Bootloader config
Specify how much output to see in bootloader logs.
Available options:No output (BOOTLOADER_LOG_LEVEL_NONE)
Error (BOOTLOADER_LOG_LEVEL_ERROR)
Warning (BOOTLOADER_LOG_LEVEL_WARN)
Info (BOOTLOADER_LOG_LEVEL_INFO)
Debug (BOOTLOADER_LOG_LEVEL_DEBUG)
Verbose (BOOTLOADER_LOG_LEVEL_VERBOSE)
Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)
Found in: Bootloader config
This setting is only used if the SPI flash pins have been overridden by setting the eFuses SPI_PAD_CONFIG_xxx, and the SPI flash mode is QIO or QOUT.
When this is the case, the eFuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka ESP32 pin “SD_DATA_3” or SPI flash pin “IO2”) is not specified in eFuse. The same pin is also used for external SPIRAM if it is enabled.
If this config item is set to N (default), the correct WP pin will be automatically used for any Espressif chip or module with integrated flash. If a custom setting is needed, set this config item to Y and specify the GPIO number connected to the WP.
Default value:No (disabled) if ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT
Custom SPI Flash WP Pin
Found in: Bootloader config
The option “Use custom SPI Flash WP Pin” must be set or this value is ignored
If burning a customized set of SPI flash pins in eFuse and using QIO or QOUT mode for flash, set this value to the GPIO number of the SPI flash WP pin.
Range:from 0 to 33 if ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT
7 if ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT
VDDSDIO LDO voltage
Found in: Bootloader config
If this option is enabled, and VDDSDIO LDO is set to 1.8V (using eFuse or MTDI bootstrapping pin), bootloader will change LDO settings to output 1.9V instead. This helps prevent flash chip from browning out during flash programming operations.
This option has no effect if VDDSDIO is set to 3.3V, or if the internal VDDSDIO regulator is disabled via eFuse.
Available options:1.8V (BOOTLOADER_VDDSDIO_BOOST_1_8V)
1.9V (BOOTLOADER_VDDSDIO_BOOST_1_9V)
GPIO triggers factory reset
Found in: Bootloader config
Allows to reset the device to factory settings: - clear one or more data partitions; - boot from “factory” partition. The factory reset will occur if there is a GPIO input held at the configured level while device starts up. See settings below.
Default value:No (disabled)
Number of the GPIO input for factory reset
Found in: Bootloader config > CONFIG_BOOTLOADER_FACTORY_RESET
The selected GPIO will be configured as an input with internal pull-up enabled (note that on some SoCs. not all pins have an internal pull-up, consult the hardware datasheet for details.) To trigger a factory reset, this GPIO must be held high or low (as configured) on startup.
Range:from 0 to 39 if CONFIG_BOOTLOADER_FACTORY_RESET
Factory reset GPIO level
Found in: Bootloader config > CONFIG_BOOTLOADER_FACTORY_RESET
Pin level for factory reset, can be triggered on low or high.
Available options:Reset on GPIO low (BOOTLOADER_FACTORY_RESET_PIN_LOW)
Reset on GPIO high (BOOTLOADER_FACTORY_RESET_PIN_HIGH)
Clear OTA data on factory reset (select factory partition)
Found in: Bootloader config > CONFIG_BOOTLOADER_FACTORY_RESET
The device will boot from “factory” partition (or OTA slot 0 if no factory partition is present) after a factory reset.
Comma-separated names of partitions to clear on factory reset
Found in: Bootloader config > CONFIG_BOOTLOADER_FACTORY_RESET
Allows customers to select which data partitions will be erased while factory reset.
Specify the names of partitions as a comma-delimited with optional spaces for readability. (Like this: “nvs, phy_init, …”) Make sure that the name specified in the partition table and here are the same. Partitions of type “app” cannot be specified here.
Default value:“nvs” if CONFIG_BOOTLOADER_FACTORY_RESET
GPIO triggers boot from test app partition
Found in: Bootloader config
Allows to run the test app from “TEST” partition. A boot from “test” partition will occur if there is a GPIO input pulled low while device starts up. See settings below.
Default value:No (disabled) if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
Number of the GPIO input to boot TEST partition
Found in: Bootloader config > CONFIG_BOOTLOADER_APP_TEST
The selected GPIO will be configured as an input with internal pull-up enabled. To trigger a test app, this GPIO must be pulled low on reset. After the GPIO input is deactivated and the device reboots, the old application will boot. (factory or OTA[x]). Note that GPIO34-39 do not have an internal pullup and an external one must be provided.
Range:from 0 to 39 if CONFIG_BOOTLOADER_APP_TEST
App test GPIO level
Found in: Bootloader config > CONFIG_BOOTLOADER_APP_TEST
Pin level for app test, can be triggered on low or high.
Available options:Enter test app on GPIO low (BOOTLOADER_APP_TEST_PIN_LOW)
Enter test app on GPIO high (BOOTLOADER_APP_TEST_PIN_HIGH)
Hold time of GPIO for reset/test mode (seconds)
Found in: Bootloader config
The GPIO must be held low continuously for this period of time after reset before a factory reset or test partition boot (as applicable) is performed.
Default value:Enable protection for unmapped memory regions
Found in: Bootloader config
Protects the unmapped memory regions of the entire address space from unintended accesses. This will ensure that an exception will be triggered whenever the CPU performs a memory operation on unmapped regions of the address space.
Default value:Yes (enabled)
Use RTC watchdog in start code
Found in: Bootloader config
Tracks the execution time of startup code. If the execution time is exceeded, the RTC_WDT will restart system. It is also useful to prevent a lock up in start code caused by an unstable power source. NOTE: Tracks the execution time starts from the bootloader code - re-set timeout, while selecting the source for slow_clk - and ends calling app_main. Re-set timeout is needed due to WDT uses a SLOW_CLK clock source. After changing a frequency slow_clk a time of WDT needs to re-set for new frequency. slow_clk depends on RTC_CLK_SRC (INTERNAL_RC or EXTERNAL_CRYSTAL).
Default value:Yes (enabled)
Allows RTC watchdog disable in user code
Found in: Bootloader config > CONFIG_BOOTLOADER_WDT_ENABLE
If this option is set, the ESP-IDF app must explicitly reset, feed, or disable the rtc_wdt in the app’s own code. If this option is not set (default), then rtc_wdt will be disabled by ESP-IDF before calling the app_main() function.
Use function rtc_wdt_feed() for resetting counter of rtc_wdt. Use function rtc_wdt_disable() for disabling rtc_wdt.
Default value:No (disabled)
Timeout for RTC watchdog (ms)
Found in: Bootloader config > CONFIG_BOOTLOADER_WDT_ENABLE
Verify that this parameter is correct and more then the execution time. Pay attention to options such as reset to factory, trigger test partition and encryption on boot - these options can increase the execution time. Note: RTC_WDT will reset while encryption operations will be performed.
Range:from 0 to 120000
9000
Enable app rollback support
Found in: Bootloader config
After updating the app, the bootloader runs a new app with the “ESP_OTA_IMG_PENDING_VERIFY” state set. This state prevents the re-run of this app. After the first boot of the new app in the user code, the function should be called to confirm the operability of the app or vice versa about its non-operability. If the app is working, then it is marked as valid. Otherwise, it is marked as not valid and rolls back to the previous working app. A reboot is performed, and the app is booted before the software update. Note: If during the first boot a new app the power goes out or the WDT works, then roll back will happen. Rollback is possible only between the apps with the same security versions.
Default value:No (disabled)
Enable app anti-rollback support
Found in: Bootloader config > CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
This option prevents rollback to previous firmware/application image with lower security version.
Default value:No (disabled) if CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
eFuse secure version of app
Found in: Bootloader config > CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE > CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
The secure version is the sequence number stored in the header of each firmware. The security version is set in the bootloader, version is recorded in the eFuse field as the number of set ones. The allocated number of bits in the efuse field for storing the security version is limited (see BOOTLOADER_APP_SEC_VER_SIZE_EFUSE_FIELD option).
Bootloader: When bootloader selects an app to boot, an app is selected that has a security version greater or equal that recorded in eFuse field. The app is booted with a higher (or equal) secure version.
The security version is worth increasing if in previous versions there is a significant vulnerability and their use is not acceptable.
Your partition table should has a scheme with ota_0 + ota_1 (without factory).
Default value:Size of the efuse secure version field
Found in: Bootloader config > CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE > CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
The size of the efuse secure version field. Its length is limited to 32 bits for ESP32 and 16 bits for ESP32-S2. This determines how many times the security version can be increased.
Range:from 1 to 32 if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
from 1 to 16 if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
Emulate operations with efuse secure version(only test)
Found in: Bootloader config > CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE > CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
This option allows to emulate read/write operations with all eFuses and efuse secure version. It allows to test anti-rollback implemention without permanent write eFuse bits. There should be an entry in partition table with following details: emul_efuse, data, efuse, , 0x2000.
This option enables: EFUSE_VIRTUAL and EFUSE_VIRTUAL_KEEP_IN_FLASH.
Default value:No (disabled) if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
Skip image validation when exiting deep sleep
Found in: Bootloader config
This option disables the normal validation of an image coming out of deep sleep (checksums, SHA256, and signature). This is a trade-off between wakeup performance from deep sleep, and image integrity checks.
Only enable this if you know what you are doing. It should not be used in conjunction with using deep_sleep() entry and changing the active OTA partition as this would skip the validation upon first load of the new OTA partition.
It is possible to enable this option with Secure Boot if “allow insecure options” is enabled, however it’s strongly recommended to NOT enable it as it may allow a Secure Boot bypass.
Default value:No (disabled) if ( CONFIG_SECURE_BOOT && CONFIG_SECURE_BOOT_INSECURE ) || CONFIG_SECURE_BOOT
Skip image validation from power on reset (READ HELP FIRST)
Found in: Bootloader config
Some applications need to boot very quickly from power on. By default, the entire app binary is read from flash and verified which takes up a significant portion of the boot time.
Enabling this option will skip validation of the app when the SoC boots from power on. Note that in this case it’s not possible for the bootloader to detect if an app image is corrupted in the flash, therefore it’s not possible to safely fall back to a different app partition. Flash corruption of this kind is unlikely but can happen if there is a serious firmware bug or physical damage.
Following other reset types, the bootloader will still validate the app image. This increases the chances that flash corruption resulting in a crash can be detected following soft reset, and the bootloader will fall back to a valid app image. To increase the chances of successfully recovering from a flash corruption event, keep the option BOOTLOADER_WDT_ENABLE enabled and consider also enabling BOOTLOADER_WDT_DISABLE_IN_USER_CODE - then manually disable the RTC Watchdog once the app is running. In addition, enable both the Task and Interrupt watchdog timers with reset options set.
Default value:No (disabled)
Skip image validation always (READ HELP FIRST)
Found in: Bootloader config
Selecting this option prevents the bootloader from ever validating the app image before booting it. Any flash corruption of the selected app partition will make the entire SoC unbootable.
Although flash corruption is a very rare case, it is not recommended to select this option. Consider selecting “Skip image validation from power on reset” instead. However, if boot time is the only important factor then it can be enabled.
Default value:No (disabled)
Reserve RTC FAST memory for custom purposes
Found in: Bootloader config
This option allows the customer to place data in the RTC FAST memory, this area remains valid when rebooted, except for power loss. This memory is located at a fixed address and is available for both the bootloader and the application. (The application and bootoloader must be compiled with the same option). The RTC FAST memory has access only through PRO_CPU.
Default value:No (disabled)
Size in bytes for custom purposes
Found in: Bootloader config > CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
This option reserves in RTC FAST memory the area for custom purposes. If you want to create your own bootloader and save more information in this area of memory, you can increase it. It must be a multiple of 4 bytes. This area (rtc_retain_mem_t) is reserved and has access from the bootloader and an application.
Default value:Enable the support for flash chips of XMC (READ HELP FIRST)
Found in: Bootloader config
Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow. XMC chips will be forbidden to be used, when this option is disabled.
DON’T DISABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
Default value:Yes (enabled)
Contains:
Require signed app images
Found in: Security features
Require apps to be signed to verify their integrity.
This option uses the same app signature scheme as hardware secure boot, but unlike hardware secure boot it does not prevent the bootloader from being physically updated. This means that the device can be secured against remote network access, but not physical access. Compared to using hardware Secure Boot this option is much simpler to implement.
App Signing Scheme
Found in: Security features
Select the Secure App signing scheme. Depends on the Chip Revision. There are two secure boot versions:
Legacy custom secure boot scheme. Supported in ESP32 SoC.
RSA based secure boot scheme. Supported in ESP32-ECO3 (ESP32 Chip Revision 3 onwards), ESP32-S2, ESP32-C3, ESP32-S3 SoCs.
ECDSA based secure boot scheme. Supported in ESP32-C2 SoC.
ECDSA (SECURE_SIGNED_APPS_ECDSA_SCHEME)
Embeds the ECDSA public key in the bootloader and signs the application with an ECDSA key. Refer to the documentation before enabling.
RSA (SECURE_SIGNED_APPS_RSA_SCHEME)
Appends the RSA-3072 based Signature block to the application. Refer to <Secure Boot Version 2 documentation link> before enabling.
ECDSA (V2) (SECURE_SIGNED_APPS_ECDSA_V2_SCHEME)
For Secure boot V2 (e.g., ESP32-C2 SoC), appends ECDSA based signature block to the application. Refer to documentation before enabling.
ECDSA key size
Found in: Security features
Select the ECDSA key size. Two key sizes are supported
192 bit key using NISTP192 curve
256 bit key using NISTP256 curve (Recommended)
The advantage of using 256 bit key is the extra randomness which makes it difficult to be bruteforced compared to 192 bit key. At present, both key sizes are practically implausible to bruteforce.
Available options:Using ECC curve NISTP192 (SECURE_BOOT_ECDSA_KEY_LEN_192_BITS)
Using ECC curve NISTP256 (Recommended) (SECURE_BOOT_ECDSA_KEY_LEN_256_BITS)
Bootloader verifies app signatures
Found in: Security features
If this option is set, the bootloader will be compiled with code to verify that an app is signed before booting it.
If hardware secure boot is enabled, this option is always enabled and cannot be disabled. If hardware secure boot is not enabled, this option doesn’t add significant security by itself so most users will want to leave it disabled.
Default value:No (disabled) if CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT && SECURE_SIGNED_APPS_ECDSA_SCHEME
Verify app signature on update
Found in: Security features
If this option is set, any OTA updated apps will have the signature verified before being considered valid.
When enabled, the signature is automatically checked whenever the esp_ota_ops.h APIs are used for OTA updates, or esp_image_format.h APIs are used to verify apps.
If hardware secure boot is enabled, this option is always enabled and cannot be disabled. If hardware secure boot is not enabled, this option still adds significant security against network-based attackers by preventing spoofing of OTA updates.
Default value:Yes (enabled) if CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT
Enable hardware Secure Boot in bootloader (READ DOCS FIRST)
Found in: Security features
Build a bootloader which enables Secure Boot on first boot.
Once enabled, Secure Boot will not boot a modified bootloader. The bootloader will only load a partition table or boot an app if the data has a verified digital signature. There are implications for reflashing updated apps once secure boot is enabled.
When enabling secure boot, JTAG and ROM BASIC Interpreter are permanently disabled by default.
Default value:No (disabled)
Select secure boot version
Found in: Security features > CONFIG_SECURE_BOOT
Select the Secure Boot Version. Depends on the Chip Revision. Secure Boot V2 is the new RSA / ECDSA based secure boot scheme.
RSA based scheme is supported in ESP32 (Revision 3 onwards), ESP32-S2, ESP32-C3 (ECO3), ESP32-S3.
ECDSA based scheme is supported in ESP32-C2 SoC.
Please note that, RSA or ECDSA secure boot is property of specific SoC based on its HW design, supported crypto accelerators, die-size, cost and similar parameters. Please note that RSA scheme has requirement for bigger key sizes but at the same time it is comparatively faster than ECDSA verification.
Secure Boot V1 is the AES based (custom) secure boot scheme supported in ESP32 SoC.
Available options:Enable Secure Boot version 1 (SECURE_BOOT_V1_ENABLED)
Build a bootloader which enables secure boot version 1 on first boot. Refer to the Secure Boot section of the ESP-IDF Programmer’s Guide for this version before enabling.
Enable Secure Boot version 2 (SECURE_BOOT_V2_ENABLED)
Build a bootloader which enables Secure Boot version 2 on first boot. Refer to Secure Boot V2 section of the ESP-IDF Programmer’s Guide for this version before enabling.
Secure bootloader mode
Found in: Security features
Available options:One-time flash (SECURE_BOOTLOADER_ONE_TIME_FLASH)
On first boot, the bootloader will generate a key which is not readable externally or by software. A digest is generated from the bootloader image itself. This digest will be verified on each subsequent boot.
Enabling this option means that the bootloader cannot be changed after the first time it is booted.
Reflashable (SECURE_BOOTLOADER_REFLASHABLE)
Generate a reusable secure bootloader key, derived (via SHA-256) from the secure boot signing key.
This allows the secure bootloader to be re-flashed by anyone with access to the secure boot signing key.
This option is less secure than one-time flash, because a leak of the digest key from one device allows reflashing of any device that uses it.
Sign binaries during build
Found in: Security features
Once secure boot or signed app requirement is enabled, app images are required to be signed.
If enabled (default), these binary files are signed as part of the build process. The file named in “Secure boot private signing key” will be used to sign the image.
If disabled, unsigned app/partition data will be built. They must be signed manually using espsecure.py. Version 1 to enable ECDSA Based Secure Boot and Version 2 to enable RSA based Secure Boot. (for example, on a remote signing server.)
Secure boot private signing key
Found in: Security features > CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES
Path to the key file used to sign app images.
Key file is an ECDSA private key (NIST256p curve) in PEM format for Secure Boot V1. Key file is an RSA private key in PEM format for Secure Boot V2.
Path is evaluated relative to the project directory.
You can generate a new signing key by running the following command: espsecure.py generate_signing_key secure_boot_signing_key.pem
See the Secure Boot section of the ESP-IDF Programmer’s Guide for this version for details.
Default value:“secure_boot_signing_key.pem” if CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES
Secure boot public signature verification key
Found in: Security features
Path to a public key file used to verify signed images. Secure Boot V1: This ECDSA public key is compiled into the bootloader and/or app, to verify app images. Secure Boot V2: This RSA public key is compiled into the signature block at the end of the bootloader/app.
Key file is in raw binary format, and can be extracted from a PEM formatted private key using the espsecure.py extract_public_key command.
Refer to the Secure Boot section of the ESP-IDF Programmer’s Guide for this version before enabling.
Enable Aggressive key revoke strategy
Found in: Security features
If this option is set, ROM bootloader will revoke the public key digest burned in efuse block if it fails to verify the signature of software bootloader with it. Revocation of keys does not happen when enabling secure boot. Once secure boot is enabled, key revocation checks will be done on subsequent boot-up, while verifying the software bootloader
This feature provides a strong resistance against physical attacks on the device.
NOTE: Once a digest slot is revoked, it can never be used again to verify an image This can lead to permanent bricking of the device, in case all keys are revoked because of signature verification failure.
Default value:No (disabled) if CONFIG_SECURE_BOOT && SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY
Hardware Key Encoding
Found in: Security features
In reflashable secure bootloader mode, a hardware key is derived from the signing key (with SHA-256) and can be written to eFuse with espefuse.py.
Normally this is a 256-bit key, but if 3/4 Coding Scheme is used on the device then the eFuse key is truncated to 192 bits.
This configuration item doesn’t change any firmware code, it only changes the size of key binary which is generated at build time.
Available options:No encoding (256 bit key) (SECURE_BOOTLOADER_KEY_ENCODING_256BIT)
3/4 encoding (192 bit key) (SECURE_BOOTLOADER_KEY_ENCODING_192BIT)
Allow potentially insecure options
Found in: Security features
You can disable some of the default protections offered by secure boot, in order to enable testing or a custom combination of security features.
Only enable these options if you are very sure.
Refer to the Secure Boot section of the ESP-IDF Programmer’s Guide for this version before enabling.
Default value:No (disabled) if CONFIG_SECURE_BOOT
Enable flash encryption on boot (READ DOCS FIRST)
Found in: Security features
If this option is set, flash contents will be encrypted by the bootloader on first boot.
Note: After first boot, the system will be permanently encrypted. Re-flashing an encrypted system is complicated and not always possible.
Read Flash Encryption before enabling.
Default value:No (disabled)
Size of generated AES-XTS key
Found in: Security features > CONFIG_SECURE_FLASH_ENC_ENABLED
Size of generated AES-XTS key.
AES-128 uses a 256-bit key (32 bytes) derived from 128 bits (16 bytes) burned in half Efuse key block. Internally, it calculates SHA256(128 bits)
AES-128 uses a 256-bit key (32 bytes) which occupies one Efuse key block.
AES-256 uses a 512-bit key (64 bytes) which occupies two Efuse key blocks.
This setting is ignored if either type of key is already burned to Efuse before the first boot. In this case, the pre-burned key is used and no new key is generated.
Available options:AES-128 key derived from 128 bits (SHA256(128 bits)) (SECURE_FLASH_ENCRYPTION_AES128_DERIVED)
AES-128 (256-bit key) (SECURE_FLASH_ENCRYPTION_AES128)
AES-256 (512-bit key) (SECURE_FLASH_ENCRYPTION_AES256)
Enable usage mode
Found in: Security features > CONFIG_SECURE_FLASH_ENC_ENABLED
By default Development mode is enabled which allows ROM download mode to perform flash encryption operations (plaintext is sent to the device, and it encrypts it internally and writes ciphertext to flash.) This mode is not secure, it’s possible for an attacker to write their own chosen plaintext to flash.
Release mode should always be selected for production or manufacturing. Once enabled it’s no longer possible for the device in ROM Download Mode to use the flash encryption hardware.
Refer to the Flash Encryption section of the ESP-IDF Programmer’s Guide for details.
Available options:Development (NOT SECURE) (SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT)
Release (SECURE_FLASH_ENCRYPTION_MODE_RELEASE)
Contains:
Leave ROM BASIC Interpreter available on reset
Found in: Security features > Potentially insecure options
By default, the BASIC ROM Console starts on reset if no valid bootloader is read from the flash.
When either flash encryption or secure boot are enabled, the default is to disable this BASIC fallback mode permanently via eFuse.
If this option is set, this eFuse is not burned and the BASIC ROM Console may remain accessible. Only set this option in testing environments.
Default value:No (disabled) if CONFIG_SECURE_BOOT_INSECURE || SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
Allow JTAG Debugging
Found in: Security features > Potentially insecure options
If not set (default), the bootloader will permanently disable JTAG (across entire chip) on first boot when either secure boot or flash encryption is enabled.
Setting this option leaves JTAG on for debugging, which negates all protections of flash encryption and some of the protections of secure boot.
Only set this option in testing environments.
Default value:No (disabled) if CONFIG_SECURE_BOOT_INSECURE || SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
Allow app partition length not 64KB aligned
Found in: Security features > Potentially insecure options
If not set (default), app partition size must be a multiple of 64KB. App images are padded to 64KB length, and the bootloader checks any trailing bytes after the signature (before the next 64KB boundary) have not been written. This is because flash cache maps entire 64KB pages into the address space. This prevents an attacker from appending unverified data after the app image in the flash, causing it to be mapped into the address space.
Setting this option allows the app partition length to be unaligned, and disables padding of the app image to this length. It is generally not recommended to set this option, unless you have a legacy partitioning scheme which doesn’t support 64KB aligned partition lengths.
Allow additional read protecting of efuses
Found in: Security features > Potentially insecure options
If not set (default, recommended), on first boot the bootloader will burn the WR_DIS_RD_DIS efuse when Secure Boot is enabled. This prevents any more efuses from being read protected.
If this option is set, it will remain possible to write the EFUSE_RD_DIS efuse field after Secure Boot is enabled. This may allow an attacker to read-protect the BLK2 efuse (for ESP32) and BLOCK4-BLOCK10 (i.e. BLOCK_KEY0-BLOCK_KEY5)(for other chips) holding the public key digest, causing an immediate denial of service and possibly allowing an additional fault injection attack to bypass the signature protection.
NOTE: Once a BLOCK is read-protected, the application will read all zeros from that block
NOTE: If “UART ROM download mode (Permanently disabled (recommended))” or “UART ROM download mode (Permanently switch to Secure mode (recommended))” is set, then it is __NOT__ possible to read/write efuses using espefuse.py utility. However, efuse can be read/written from the application
Leave unused digest slots available (not revoke)
Found in: Security features > Potentially insecure options
If not set (default), during startup in the app all unused digest slots will be revoked. To revoke unused slot will be called esp_efuse_set_digest_revoke(num_digest) for each digest. Revoking unused digest slots makes ensures that no trusted keys can be added later by an attacker. If set, it means that you have a plan to use unused digests slots later.
Default value:No (disabled) if CONFIG_SECURE_BOOT_INSECURE && SOC_EFUSE_REVOKE_BOOT_KEY_DIGESTS
Leave UART bootloader encryption enabled
Found in: Security features > Potentially insecure options
If not set (default), the bootloader will permanently disable UART bootloader encryption access on first boot. If set, the UART bootloader will still be able to access hardware encryption.
It is recommended to only set this option in testing environments.
Default value:No (disabled) if SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
Leave UART bootloader decryption enabled
Found in: Security features > Potentially insecure options
If not set (default), the bootloader will permanently disable UART bootloader decryption access on first boot. If set, the UART bootloader will still be able to access hardware decryption.
Only set this option in testing environments. Setting this option allows complete bypass of flash encryption.
Default value:No (disabled) if SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
Leave UART bootloader flash cache enabled
Found in: Security features > Potentially insecure options
If not set (default), the bootloader will permanently disable UART bootloader flash cache access on first boot. If set, the UART bootloader will still be able to access the flash cache.
Only set this option in testing environments.
Default value:No (disabled) if SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
Require flash encryption to be already enabled
Found in: Security features > Potentially insecure options
If not set (default), and flash encryption is not yet enabled in eFuses, the 2nd stage bootloader will enable flash encryption: generate the flash encryption key and program eFuses. If this option is set, and flash encryption is not yet enabled, the bootloader will error out and reboot. If flash encryption is enabled in eFuses, this option does not change the bootloader behavior.
Only use this option in testing environments, to avoid accidentally enabling flash encryption on the wrong device. The device needs to have flash encryption already enabled using espefuse.py.
Default value:No (disabled) if SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
Check Flash Encryption enabled on app startup
Found in: Security features
If set (default), in an app during startup code, there is a check of the flash encryption eFuse bit is on (as the bootloader should already have set it). The app requires this bit is on to continue work otherwise abort.
If not set, the app does not care if the flash encryption eFuse bit is set or not.
Default value:Yes (enabled) if CONFIG_SECURE_FLASH_ENC_ENABLED
UART ROM download mode
Found in: Security features
Available options:UART ROM download mode (Permanently disabled (recommended)) (SECURE_DISABLE_ROM_DL_MODE)
If set, during startup the app will burn an eFuse bit to permanently disable the UART ROM Download Mode. This prevents any future use of esptool.py, espefuse.py and similar tools.
Once disabled, if the SoC is booted with strapping pins set for ROM Download Mode then an error is printed instead.
It is recommended to enable this option in any production application where Flash Encryption and/or Secure Boot is enabled and access to Download Mode is not required.
It is also possible to permanently disable Download Mode by calling esp_efuse_disable_rom_download_mode() at runtime.
UART ROM download mode (Permanently switch to Secure mode (recommended)) (SECURE_ENABLE_SECURE_ROM_DL_MODE)
If set, during startup the app will burn an eFuse bit to permanently switch the UART ROM Download Mode into a separate Secure Download mode. This option can only work if Download Mode is not already disabled by eFuse.
Secure Download mode limits the use of Download Mode functions to simple flash read, write and erase operations, plus a command to return a summary of currently enabled security features.
Secure Download mode is not compatible with the esptool.py flasher stub feature, espefuse.py, read/writing memory or registers, encrypted download, or any other features that interact with unsupported Download Mode commands.
Secure Download mode should be enabled in any application where Flash Encryption and/or Secure Boot is enabled. Disabling this option does not immediately cancel the benefits of the security features, but it increases the potential “attack surface” for an attacker to try and bypass them with a successful physical attack.
It is also possible to enable secure download mode at runtime by calling esp_efuse_enable_rom_secure_download_mode()
Note: Secure Download mode is not available for ESP32 (includes revisions till ECO3).
UART ROM download mode (Enabled (not recommended)) (SECURE_INSECURE_ALLOW_DL_MODE)
This is a potentially insecure option. Enabling this option will allow the full UART download mode to stay enabled. This option SHOULD NOT BE ENABLED for production use cases.
Contains:
Use time/date stamp for app
Found in: Application manager
If set, then the app will be built with the current time/date stamp. It is stored in the app description structure. If not set, time/date stamp will be excluded from app image. This can be useful for getting the same binary image files made from the same source, but at different times.
Default value:Yes (enabled)
Exclude PROJECT_VER from firmware image
Found in: Application manager
The PROJECT_VER variable from the build system will not affect the firmware image. This value will not be contained in the esp_app_desc structure.
Default value:No (disabled)
Exclude PROJECT_NAME from firmware image
Found in: Application manager
The PROJECT_NAME variable from the build system will not affect the firmware image. This value will not be contained in the esp_app_desc structure.
Default value:No (disabled)
Get the project version from Kconfig
Found in: Application manager
If this is enabled, then config item APP_PROJECT_VER will be used for the variable PROJECT_VER. Other ways to set PROJECT_VER will be ignored.
Default value:No (disabled)
Project version
Found in: Application manager > CONFIG_APP_PROJECT_VER_FROM_CONFIG
Project version
Default value:The length of APP ELF SHA is stored in RAM(chars)
Found in: Application manager
At startup, the app will read this many hex characters from the embedded APP ELF SHA-256 hash value and store it in static RAM. This ensures the app ELF SHA-256 value is always available if it needs to be printed by the panic handler code. Changing this value will change the size of a static buffer, in bytes.
Range:from 8 to 64
16
Contains:
Disable download stub
Found in: Serial flasher config
The flasher tool sends a precompiled download stub first by default. That stub allows things like compressed downloads and more. Usually you should not need to disable that feature
Default value:No (disabled)
Flash SPI mode
Found in: Serial flasher config
Mode the flash chip is flashed in, as well as the default mode for the binary to run in.
Available options:QIO (ESPTOOLPY_FLASHMODE_QIO)
QOUT (ESPTOOLPY_FLASHMODE_QOUT)
DIO (ESPTOOLPY_FLASHMODE_DIO)
DOUT (ESPTOOLPY_FLASHMODE_DOUT)
OPI (ESPTOOLPY_FLASHMODE_OPI)
Flash Sampling Mode
Found in: Serial flasher config
Available options:STR Mode (ESPTOOLPY_FLASH_SAMPLE_MODE_STR)
DTR Mode (ESPTOOLPY_FLASH_SAMPLE_MODE_DTR)
Flash SPI speed
Found in: Serial flasher config
Available options:120 MHz (ESPTOOLPY_FLASHFREQ_120M)
80 MHz (ESPTOOLPY_FLASHFREQ_80M)
60 MHz (ESPTOOLPY_FLASHFREQ_60M)
48 MHz (ESPTOOLPY_FLASHFREQ_48M)
40 MHz (ESPTOOLPY_FLASHFREQ_40M)
30 MHz (ESPTOOLPY_FLASHFREQ_30M)
26 MHz (ESPTOOLPY_FLASHFREQ_26M)
24 MHz (ESPTOOLPY_FLASHFREQ_24M)
20 MHz (ESPTOOLPY_FLASHFREQ_20M)
15 MHz (ESPTOOLPY_FLASHFREQ_15M)
Flash size
Found in: Serial flasher config
SPI flash size, in megabytes
Available options:1 MB (ESPTOOLPY_FLASHSIZE_1MB)
2 MB (ESPTOOLPY_FLASHSIZE_2MB)
4 MB (ESPTOOLPY_FLASHSIZE_4MB)
8 MB (ESPTOOLPY_FLASHSIZE_8MB)
16 MB (ESPTOOLPY_FLASHSIZE_16MB)
32 MB (ESPTOOLPY_FLASHSIZE_32MB)
64 MB (ESPTOOLPY_FLASHSIZE_64MB)
128 MB (ESPTOOLPY_FLASHSIZE_128MB)
Detect flash size when flashing bootloader
Found in: Serial flasher config
If this option is set, flashing the project will automatically detect the flash size of the target chip and update the bootloader image before it is flashed.
Enabling this option turns off the image protection against corruption by a SHA256 digest. Updating the bootloader image before flashing would invalidate the digest.
Default value:No (disabled)
Before flashing
Found in: Serial flasher config
Configure whether esptool.py should reset the ESP32 before flashing.
Automatic resetting depends on the RTS & DTR signals being wired from the serial port to the ESP32. Most USB development boards do this internally.
Available options:Reset to bootloader (ESPTOOLPY_BEFORE_RESET)
No reset (ESPTOOLPY_BEFORE_NORESET)
After flashing
Found in: Serial flasher config
Configure whether esptool.py should reset the ESP32 after flashing.
Automatic resetting depends on the RTS & DTR signals being wired from the serial port to the ESP32. Most USB development boards do this internally.
Available options:Reset after flashing (ESPTOOLPY_AFTER_RESET)
Stay in bootloader (ESPTOOLPY_AFTER_NORESET)
Contains:
Partition Table
Found in: Partition Table
The partition table to flash to the ESP32. The partition table determines where apps, data and other resources are expected to be found.
The predefined partition table CSV descriptions can be found in the components/partition_table directory. These are mostly intended for example and development use, it’s expect that for production use you will copy one of these CSV files and create a custom partition CSV for your application.
Available options:Single factory app, no OTA (PARTITION_TABLE_SINGLE_APP)
This is the default partition table, designed to fit into a 2MB or larger flash with a single 1MB app partition.
The corresponding CSV file in the IDF directory is components/partition_table/partitions_singleapp.csv
This partition table is not suitable for an app that needs OTA (over the air update) capability.
Single factory app (large), no OTA (PARTITION_TABLE_SINGLE_APP_LARGE)
This is a variation of the default partition table, that expands the 1MB app partition size to 1.5MB to fit more code.
The corresponding CSV file in the IDF directory is components/partition_table/partitions_singleapp_large.csv
This partition table is not suitable for an app that needs OTA (over the air update) capability.
Factory app, two OTA definitions (PARTITION_TABLE_TWO_OTA)
This is a basic OTA-enabled partition table with a factory app partition plus two OTA app partitions. All are 1MB, so this partition table requires 4MB or larger flash size.
The corresponding CSV file in the IDF directory is components/partition_table/partitions_two_ota.csv
Custom partition table CSV (PARTITION_TABLE_CUSTOM)
Specify the path to the partition table CSV to use for your project.
Consult the Partition Table section in the ESP-IDF Programmers Guide for more information.
Single factory app, no OTA, encrypted NVS (PARTITION_TABLE_SINGLE_APP_ENCRYPTED_NVS)
This is a variation of the default “Single factory app, no OTA” partition table that supports encrypted NVS when using flash encryption. See the Flash Encryption section in the ESP-IDF Programmers Guide for more information.
The corresponding CSV file in the IDF directory is components/partition_table/partitions_singleapp_encr_nvs.csv
Single factory app (large), no OTA, encrypted NVS (PARTITION_TABLE_SINGLE_APP_LARGE_ENC_NVS)
This is a variation of the “Single factory app (large), no OTA” partition table that supports encrypted NVS when using flash encryption. See the Flash Encryption section in the ESP-IDF Programmers Guide for more information.
The corresponding CSV file in the IDF directory is components/partition_table/partitions_singleapp_large_encr_nvs.csv
Factory app, two OTA definitions, encrypted NVS (PARTITION_TABLE_TWO_OTA_ENCRYPTED_NVS)
This is a variation of the “Factory app, two OTA definitions” partition table that supports encrypted NVS when using flash encryption. See the Flash Encryption section in the ESP-IDF Programmers Guide for more information.
The corresponding CSV file in the IDF directory is components/partition_table/partitions_two_ota_encr_nvs.csv
Custom partition CSV file
Found in: Partition Table
Name of the custom partition CSV filename. This path is evaluated relative to the project root directory.
Default value:“partitions.csv”
Offset of partition table
Found in: Partition Table
The address of partition table (by default 0x8000). Allows you to move the partition table, it gives more space for the bootloader. Note that the bootloader and app will both need to be compiled with the same PARTITION_TABLE_OFFSET value.
This number should be a multiple of 0x1000.
Note that partition offsets in the partition table CSV file may need to be changed if this value is set to a higher value. To have each partition offset adapt to the configured partition table offset, leave all partition offsets blank in the CSV file.
Default value:“0x8000”
Generate an MD5 checksum for the partition table
Found in: Partition Table
Generate an MD5 checksum for the partition table for protecting the integrity of the table. The generation should be turned off for legacy bootloaders which cannot recognize the MD5 checksum in the partition table.
Default value:Yes (enabled) if CONFIG_APP_COMPATIBLE_PRE_V3_1_BOOTLOADERS
Contains:
Optimization Level
Found in: Compiler options
This option sets compiler optimization level (gcc -O argument) for the app.
The “Default” setting will add the -0g flag to CFLAGS.
The “Size” setting will add the -0s flag to CFLAGS.
The “Performance” setting will add the -O2 flag to CFLAGS.
The “None” setting will add the -O0 flag to CFLAGS.
The “Size” setting cause the compiled code to be smaller and faster, but may lead to difficulties of correlating code addresses to source file lines when debugging.
The “Performance” setting causes the compiled code to be larger and faster, but will be easier to correlated code addresses to source file lines.
“None” with -O0 produces compiled code without optimization.
Note that custom optimization levels may be unsupported.
Compiler optimization for the IDF bootloader is set separately, see the BOOTLOADER_COMPILER_OPTIMIZATION setting.
Available options:Debug (-Og) (COMPILER_OPTIMIZATION_DEFAULT)
Optimize for size (-Os) (COMPILER_OPTIMIZATION_SIZE)
Optimize for performance (-O2) (COMPILER_OPTIMIZATION_PERF)
Debug without optimization (-O0) (COMPILER_OPTIMIZATION_NONE)
Assertion level
Found in: Compiler options
Assertions can be:
Enabled. Failure will print verbose assertion details. This is the default.
Set to “silent” to save code size (failed assertions will abort() but user needs to use the aborting address to find the line number with the failed assertion.)
Disabled entirely (not recommended for most configurations.) -DNDEBUG is added to CPPFLAGS in this case.
Enabled (COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE)
Enable assertions. Assertion content and line number will be printed on failure.
Silent (saves code size) (COMPILER_OPTIMIZATION_ASSERTIONS_SILENT)
Enable silent assertions. Failed assertions will abort(), user needs to use the aborting address to find the line number with the failed assertion.
Disabled (sets -DNDEBUG) (COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE)
If assertions are disabled, -DNDEBUG is added to CPPFLAGS.
Compiler float lib source
Found in: Compiler options
In the soft-fp part of libgcc, riscv version is written in C, and handles all edge cases in IEEE754, which makes it larger and performance is slow.
RVfplib is an optimized RISC-V library for FP arithmetic on 32-bit integer processors, for single and double-precision FP. RVfplib is “fast”, but it has a few exceptions from IEEE 754 compliance.
Available options:libgcc (COMPILER_FLOAT_LIB_FROM_GCCLIB)
librvfp (COMPILER_FLOAT_LIB_FROM_RVFPLIB)
Disable messages in ESP_RETURN_ON_* and ESP_EXIT_ON_* macros
Found in: Compiler options
If enabled, the error messages will be discarded in following check macros: - ESP_RETURN_ON_ERROR - ESP_EXIT_ON_ERROR - ESP_RETURN_ON_FALSE - ESP_EXIT_ON_FALSE
Default value:No (disabled)
Replace ESP-IDF and project paths in binaries
Found in: Compiler options
When expanding the __FILE__ and __BASE_FILE__ macros, replace paths inside ESP-IDF with paths relative to the placeholder string “IDF”, and convert paths inside the project directory to relative paths.
This allows building the project with assertions or other code that embeds file paths, without the binary containing the exact path to the IDF or project directories.
This option passes -fmacro-prefix-map options to the GCC command line. To replace additional paths in your binaries, modify the project CMakeLists.txt file to pass custom -fmacro-prefix-map or -ffile-prefix-map arguments.
Default value:Yes (enabled)
Enable C++ exceptions
Found in: Compiler options
Enabling this option compiles all IDF C++ files with exception support enabled.
Disabling this option disables C++ exception support in all compiled files, and any libstdc++ code which throws an exception will abort instead.
Enabling this option currently adds an additional ~500 bytes of heap overhead when an exception is thrown in user code for the first time.
Default value:No (disabled)
Contains:
Emergency Pool Size
Found in: Compiler options > CONFIG_COMPILER_CXX_EXCEPTIONS
Size (in bytes) of the emergency memory pool for C++ exceptions. This pool will be used to allocate memory for thrown exceptions when there is not enough memory on the heap.
Default value:Enable C++ run-time type info (RTTI)
Found in: Compiler options
Enabling this option compiles all C++ files with RTTI support enabled. This increases binary size (typically by tens of kB) but allows using dynamic_cast conversion and typeid operator.
Default value:No (disabled)
Stack smashing protection mode
Found in: Compiler options
Stack smashing protection mode. Emit extra code to check for buffer overflows, such as stack smashing attacks. This is done by adding a guard variable to functions with vulnerable objects. The guards are initialized when a function is entered and then checked when the function exits. If a guard check fails, program is halted. Protection has the following modes:
In NORMAL mode (GCC flag: -fstack-protector) only functions that call alloca, and functions with buffers larger than 8 bytes are protected.
STRONG mode (GCC flag: -fstack-protector-strong) is like NORMAL, but includes additional functions to be protected – those that have local array definitions, or have references to local frame addresses.
In OVERALL mode (GCC flag: -fstack-protector-all) all functions are protected.
Modes have the following impact on code performance and coverage:
performance: NORMAL > STRONG > OVERALL
coverage: NORMAL < STRONG < OVERALL
The performance impact includes increasing the amount of stack memory required for each task.
Available options:None (COMPILER_STACK_CHECK_MODE_NONE)
Normal (COMPILER_STACK_CHECK_MODE_NORM)
Strong (COMPILER_STACK_CHECK_MODE_STRONG)
Overall (COMPILER_STACK_CHECK_MODE_ALL)
Enable -Wwrite-strings warning flag
Found in: Compiler options
Adds -Wwrite-strings flag for the C/C++ compilers.
For C, this gives string constants the type const char[] so that copying the address of one into a non-const char \* pointer produces a warning. This warning helps to find at compile time code that tries to write into a string constant.
For C++, this warns about the deprecated conversion from string literals to char \*.
Default value:No (disabled)
Dump RTL files during compilation
Found in: Compiler options
If enabled, RTL files will be produced during compilation. These files can be used by other tools, for example to calculate call graphs.
Contains:
Contains:
Data Destination 1
Found in: Component config > Application Level Tracing
Select destination for application trace: JTAG or none (to disable).
Available options:JTAG (APPTRACE_DEST_JTAG)
None (APPTRACE_DEST_NONE)
Data Destination 2
Found in: Component config > Application Level Tracing
Select destination for application trace: UART(XX) or none (to disable).
Available options:UART0 (APPTRACE_DEST_UART0)
UART1 (APPTRACE_DEST_UART1)
UART2 (APPTRACE_DEST_UART2)
USB_CDC (APPTRACE_DEST_USB_CDC)
None (APPTRACE_DEST_UART_NONE)
UART TX on GPIO#
Found in: Component config > Application Level Tracing
This GPIO is used for UART TX pin.
UART RX on GPIO#
Found in: Component config > Application Level Tracing
This GPIO is used for UART RX pin.
UART baud rate
Found in: Component config > Application Level Tracing
This baud rate is used for UART.
The app’s maximum baud rate depends on the UART clock source. If Power Management is disabled, the UART clock source is the APB clock and all baud rates in the available range will be sufficiently accurate. If Power Management is enabled, REF_TICK clock source is used so the baud rate is divided from 1MHz. Baud rates above 1Mbps are not possible and values between 500Kbps and 1Mbps may not be accurate.
UART RX ring buffer size
Found in: Component config > Application Level Tracing
Size of the UART input ring buffer. This size related to the baudrate, system tick frequency and amount of data to transfer. The data placed to this buffer before sent out to the interface.
UART TX ring buffer size
Found in: Component config > Application Level Tracing
Size of the UART output ring buffer. This size related to the baudrate, system tick frequency and amount of data to transfer.
UART TX message size
Found in: Component config > Application Level Tracing
Maximum size of the single message to transfer.
UART Task Priority
Found in: Component config > Application Level Tracing
UART task priority. In case of high events rate, this parameter could be changed up to (configMAX_PRIORITIES-1).
Range:from 1 to 32
1
Timeout for flushing last trace data to host on panic
Found in: Component config > Application Level Tracing
Timeout for flushing last trace data to host in case of panic. In ms. Use -1 to disable timeout and wait forever.
Threshold for flushing last trace data to host on panic
Found in: Component config > Application Level Tracing
Threshold for flushing last trace data to host on panic in post-mortem mode. This is minimal amount of data needed to perform flush. In bytes.
Size of the apptrace buffer
Found in: Component config > Application Level Tracing
Size of the memory buffer for trace data in bytes.
Size of the pending data buffer
Found in: Component config > Application Level Tracing
Size of the buffer for events in bytes. It is useful for buffering events from the time critical code (scheduler, ISRs etc). If this parameter is 0 then events will be discarded when main HW buffer is full.
Contains:
SystemView Tracing Enable
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables supporrt for SEGGER SystemView tracing functionality.
SystemView destination
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing > CONFIG_APPTRACE_SV_ENABLE
SystemView witt transfer data trough defined interface.
Available options:Data destination JTAG (APPTRACE_SV_DEST_JTAG)
Send SEGGER SystemView events through JTAG interface.
Data destination UART (APPTRACE_SV_DEST_UART)
Send SEGGER SystemView events through UART interface.
CPU to trace
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Define the CPU to trace by SystemView.
Available options:CPU0 (APPTRACE_SV_DEST_CPU_0)
Send SEGGER SystemView events for Pro CPU.
CPU1 (APPTRACE_SV_DEST_CPU_1)
Send SEGGER SystemView events for App CPU.
Timer to use as timestamp source
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
SystemView needs to use a hardware timer as the source of timestamps when tracing. This option selects the timer for it.
Available options:CPU cycle counter (CCOUNT) (APPTRACE_SV_TS_SOURCE_CCOUNT)
General Purpose Timer (Timer Group) (APPTRACE_SV_TS_SOURCE_GPTIMER)
esp_timer high resolution timer (APPTRACE_SV_TS_SOURCE_ESP_TIMER)
Maximum supported tasks
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Configures maximum supported tasks in sysview debug
Trace buffer wait timeout
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Configures timeout (in us) to wait for free space in trace buffer. Set to -1 to wait forever and avoid lost events.
Trace Buffer Overflow Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Trace Buffer Overflow” event.
ISR Enter Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “ISR Enter” event.
ISR Exit Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “ISR Exit” event.
ISR Exit to Scheduler Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “ISR to Scheduler” event.
Task Start Execution Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Task Start Execution” event.
Task Stop Execution Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Task Stop Execution” event.
Task Start Ready State Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Task Start Ready State” event.
Task Stop Ready State Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Task Stop Ready State” event.
Task Create Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Task Create” event.
Task Terminate Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Task Terminate” event.
System Idle Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “System Idle” event.
Timer Enter Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Timer Enter” event.
Timer Exit Event
Found in: Component config > Application Level Tracing > FreeRTOS SystemView Tracing
Enables “Timer Exit” event.
GCOV to Host Enable
Found in: Component config > Application Level Tracing
Enables support for GCOV data transfer to host.
Contains:
Bluetooth
Found in: Component config > Bluetooth
Select this option to enable Bluetooth and show the submenu with Bluetooth configuration choices.
Host
Found in: Component config > Bluetooth > CONFIG_BT_ENABLED
This helps to choose Bluetooth host stack
Available options:Bluedroid - Dual-mode (BT_BLUEDROID_ENABLED)
This option is recommended for classic Bluetooth or for dual-mode usecases
NimBLE - BLE only (BT_NIMBLE_ENABLED)
This option is recommended for BLE only usecases to save on memory
Disabled (BT_CONTROLLER_ONLY)
This option is recommended when you want to communicate directly with the controller (without any host) or when you are using any other host stack not supported by Espressif (not mentioned here).
Controller
Found in: Component config > Bluetooth > CONFIG_BT_ENABLED
This helps to choose Bluetooth controller stack
Available options:Enabled (BT_CONTROLLER_ENABLED)
This option is recommended for Bluetooth controller usecases
Disabled (BT_CONTROLLER_DISABLED)
This option is recommended for Bluetooth Host only usecases
Contains:
Bluetooth event (callback to application) task stack size
Found in: Component config > Bluetooth > Bluedroid Options
This select btc task stack size
Default value:3072 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
The cpu core which Bluedroid run
Found in: Component config > Bluetooth > Bluedroid Options
Which the cpu core to run Bluedroid. Can choose core0 and core1. Can not specify no-affinity.
Available options:Core 0 (PRO CPU) (BT_BLUEDROID_PINNED_TO_CORE_0)
Core 1 (APP CPU) (BT_BLUEDROID_PINNED_TO_CORE_1)
Bluetooth Bluedroid Host Stack task stack size
Found in: Component config > Bluetooth > Bluedroid Options
This select btu task stack size
Default value:4096 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Bluedroid memory debug
Found in: Component config > Bluetooth > Bluedroid Options
Bluedroid memory debug
Default value:No (disabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Classic Bluetooth
Found in: Component config > Bluetooth > Bluedroid Options
For now this option needs “SMP_ENABLE” to be set to yes
Default value:No (disabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
A2DP
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_CLASSIC_ENABLED
Advanced Audio Distrubution Profile
Default value:No (disabled) if CONFIG_BT_CLASSIC_ENABLED && BT_BLUEDROID_ENABLED
SPP
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_CLASSIC_ENABLED
This enables the Serial Port Profile
Default value:No (disabled) if CONFIG_BT_CLASSIC_ENABLED && BT_BLUEDROID_ENABLED
BT L2CAP
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_CLASSIC_ENABLED
This enables the Logical Link Control and Adaptation Layer Protocol. Only supported classic bluetooth.
Default value:No (disabled) if CONFIG_BT_CLASSIC_ENABLED && BT_BLUEDROID_ENABLED
Hands Free/Handset Profile
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_CLASSIC_ENABLED
Default value:No (disabled) if CONFIG_BT_CLASSIC_ENABLED && BT_BLUEDROID_ENABLED
Hands-free Profile Role configuration
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_CLASSIC_ENABLED > CONFIG_BT_HFP_ENABLE
Available options:Hands Free Unit (BT_HFP_CLIENT_ENABLE)
Audio Gateway (BT_HFP_AG_ENABLE)
audio(SCO) data path
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_CLASSIC_ENABLED > CONFIG_BT_HFP_ENABLE
SCO data path, i.e. HCI or PCM. This option is set using API “esp_bredr_sco_datapath_set” in Bluetooth host. Default SCO data path can also be set in Bluetooth Controller.
Available options:PCM (BT_HFP_AUDIO_DATA_PATH_PCM)
HCI (BT_HFP_AUDIO_DATA_PATH_HCI)
Wide Band Speech
Found in: Component config > Bluetooth > Bluedroid Options
This enables Wide Band Speech. Should disable it when SCO data path is PCM. Otherwise there will be no data transmited via GPIOs.
Default value:Yes (enabled) if BT_HFP_AUDIO_DATA_PATH_HCI && BT_BLUEDROID_ENABLED
Classic BT HID
Found in: Component config > Bluetooth > Bluedroid Options
This enables the BT HID Host
Default value:No (disabled) if CONFIG_BT_CLASSIC_ENABLED && BT_BLUEDROID_ENABLED
Profile Role configuration
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_HID_ENABLED
Available options:Classic BT HID Host (BT_HID_HOST_ENABLED)
This enables the BT HID Host
Classic BT HID Device (BT_HID_DEVICE_ENABLED)
This enables the BT HID Device
Secure Simple Pairing
Found in: Component config > Bluetooth > Bluedroid Options
This enables the Secure Simple Pairing. If disable this option, Bluedroid will only support Legacy Pairing
Default value:Yes (enabled) if CONFIG_BT_CLASSIC_ENABLED && BT_BLUEDROID_ENABLED
Bluetooth Low Energy
Found in: Component config > Bluetooth > Bluedroid Options
This enables Bluetooth Low Energy
Default value:Yes (enabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Include GATT server module(GATTS)
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED
This option can be disabled when the app work only on gatt client mode
Default value:Yes (enabled) if CONFIG_BT_BLE_ENABLED && BT_BLUEDROID_ENABLED
Enable Peripheral Preferred Connection Parameters characteristic in GAP service
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_GATTS_ENABLE
This enables “Peripheral Preferred Connection Parameters” characteristic (UUID: 0x2A04) in GAP service that has connection parameters like min/max connection interval, slave latency and supervision timeout multiplier
Default value:No (disabled) if CONFIG_BT_GATTS_ENABLE && BT_BLUEDROID_ENABLED
Include blufi function
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_GATTS_ENABLE
This option can be close when the app does not require blufi function.
Default value:No (disabled) if CONFIG_BT_GATTS_ENABLE && BT_BLUEDROID_ENABLED
Max GATT Server Profiles
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_GATTS_ENABLE
Maximum GATT Server Profiles Count
Range:from 1 to 32 if CONFIG_BT_GATTS_ENABLE && BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
8 if CONFIG_BT_GATTS_ENABLE && BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Max GATT Service Attributes
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_GATTS_ENABLE
Maximum GATT Service Attributes Count
Range:from 1 to 500 if CONFIG_BT_GATTS_ENABLE && BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
100 if CONFIG_BT_GATTS_ENABLE && BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
GATTS Service Change Mode
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_GATTS_ENABLE
Service change indication mode for GATT Server.
Available options:GATTS manually send service change indication (BT_GATTS_SEND_SERVICE_CHANGE_MANUAL)
Manually send service change indication through API esp_ble_gatts_send_service_change_indication()
GATTS automatically send service change indication (BT_GATTS_SEND_SERVICE_CHANGE_AUTO)
Let Bluedroid handle the service change indication internally
Include GATT client module(GATTC)
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED
This option can be close when the app work only on gatt server mode
Default value:Yes (enabled) if CONFIG_BT_BLE_ENABLED && BT_BLUEDROID_ENABLED
Save gattc cache data to nvs flash
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_GATTC_ENABLE
This select can save gattc cache data to nvs flash
Default value:No (disabled) if CONFIG_BT_GATTC_ENABLE && BT_BLUEDROID_ENABLED
The number of attempts to reconnect if the connection establishment failed
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_GATTC_ENABLE
The number of attempts to reconnect if the connection establishment failed
Range:from 0 to 7 if CONFIG_BT_GATTC_ENABLE && BT_BLUEDROID_ENABLED
3 if CONFIG_BT_GATTC_ENABLE && BT_BLUEDROID_ENABLED
Include BLE security module(SMP)
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED
This option can be close when the app not used the ble security connect.
Default value:Yes (enabled) if CONFIG_BT_BLE_ENABLED && BT_BLUEDROID_ENABLED
Slave enable connection parameters update during pairing
Found in: Component config > Bluetooth > Bluedroid Options > CONFIG_BT_BLE_ENABLED > CONFIG_BT_BLE_SMP_ENABLE
In order to reduce the pairing time, slave actively initiates connection parameters update during pairing.
Default value:No (disabled) if CONFIG_BT_BLE_SMP_ENABLE && BT_BLUEDROID_ENABLED
Disable BT debug logs (minimize bin size)
Found in: Component config > Bluetooth > Bluedroid Options
This select can save the rodata code size
Default value:No (disabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Contains:
HCI layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for HCI layer
Available options:NONE (BT_LOG_HCI_TRACE_LEVEL_NONE)
ERROR (BT_LOG_HCI_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_HCI_TRACE_LEVEL_WARNING)
API (BT_LOG_HCI_TRACE_LEVEL_API)
EVENT (BT_LOG_HCI_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_HCI_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_HCI_TRACE_LEVEL_VERBOSE)
BTM layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for BTM layer
Available options:NONE (BT_LOG_BTM_TRACE_LEVEL_NONE)
ERROR (BT_LOG_BTM_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_BTM_TRACE_LEVEL_WARNING)
API (BT_LOG_BTM_TRACE_LEVEL_API)
EVENT (BT_LOG_BTM_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_BTM_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_BTM_TRACE_LEVEL_VERBOSE)
L2CAP layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for L2CAP layer
Available options:NONE (BT_LOG_L2CAP_TRACE_LEVEL_NONE)
ERROR (BT_LOG_L2CAP_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_L2CAP_TRACE_LEVEL_WARNING)
API (BT_LOG_L2CAP_TRACE_LEVEL_API)
EVENT (BT_LOG_L2CAP_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_L2CAP_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_L2CAP_TRACE_LEVEL_VERBOSE)
RFCOMM layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for RFCOMM layer
Available options:NONE (BT_LOG_RFCOMM_TRACE_LEVEL_NONE)
ERROR (BT_LOG_RFCOMM_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_RFCOMM_TRACE_LEVEL_WARNING)
API (BT_LOG_RFCOMM_TRACE_LEVEL_API)
EVENT (BT_LOG_RFCOMM_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_RFCOMM_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_RFCOMM_TRACE_LEVEL_VERBOSE)
SDP layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for SDP layer
Available options:NONE (BT_LOG_SDP_TRACE_LEVEL_NONE)
ERROR (BT_LOG_SDP_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_SDP_TRACE_LEVEL_WARNING)
API (BT_LOG_SDP_TRACE_LEVEL_API)
EVENT (BT_LOG_SDP_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_SDP_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_SDP_TRACE_LEVEL_VERBOSE)
GAP layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for GAP layer
Available options:NONE (BT_LOG_GAP_TRACE_LEVEL_NONE)
ERROR (BT_LOG_GAP_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_GAP_TRACE_LEVEL_WARNING)
API (BT_LOG_GAP_TRACE_LEVEL_API)
EVENT (BT_LOG_GAP_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_GAP_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_GAP_TRACE_LEVEL_VERBOSE)
BNEP layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for BNEP layer
Available options:NONE (BT_LOG_BNEP_TRACE_LEVEL_NONE)
ERROR (BT_LOG_BNEP_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_BNEP_TRACE_LEVEL_WARNING)
API (BT_LOG_BNEP_TRACE_LEVEL_API)
EVENT (BT_LOG_BNEP_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_BNEP_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_BNEP_TRACE_LEVEL_VERBOSE)
PAN layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for PAN layer
Available options:NONE (BT_LOG_PAN_TRACE_LEVEL_NONE)
ERROR (BT_LOG_PAN_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_PAN_TRACE_LEVEL_WARNING)
API (BT_LOG_PAN_TRACE_LEVEL_API)
EVENT (BT_LOG_PAN_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_PAN_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_PAN_TRACE_LEVEL_VERBOSE)
A2D layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for A2D layer
Available options:NONE (BT_LOG_A2D_TRACE_LEVEL_NONE)
ERROR (BT_LOG_A2D_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_A2D_TRACE_LEVEL_WARNING)
API (BT_LOG_A2D_TRACE_LEVEL_API)
EVENT (BT_LOG_A2D_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_A2D_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_A2D_TRACE_LEVEL_VERBOSE)
AVDT layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for AVDT layer
Available options:NONE (BT_LOG_AVDT_TRACE_LEVEL_NONE)
ERROR (BT_LOG_AVDT_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_AVDT_TRACE_LEVEL_WARNING)
API (BT_LOG_AVDT_TRACE_LEVEL_API)
EVENT (BT_LOG_AVDT_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_AVDT_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_AVDT_TRACE_LEVEL_VERBOSE)
AVCT layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for AVCT layer
Available options:NONE (BT_LOG_AVCT_TRACE_LEVEL_NONE)
ERROR (BT_LOG_AVCT_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_AVCT_TRACE_LEVEL_WARNING)
API (BT_LOG_AVCT_TRACE_LEVEL_API)
EVENT (BT_LOG_AVCT_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_AVCT_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_AVCT_TRACE_LEVEL_VERBOSE)
AVRC layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for AVRC layer
Available options:NONE (BT_LOG_AVRC_TRACE_LEVEL_NONE)
ERROR (BT_LOG_AVRC_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_AVRC_TRACE_LEVEL_WARNING)
API (BT_LOG_AVRC_TRACE_LEVEL_API)
EVENT (BT_LOG_AVRC_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_AVRC_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_AVRC_TRACE_LEVEL_VERBOSE)
MCA layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for MCA layer
Available options:NONE (BT_LOG_MCA_TRACE_LEVEL_NONE)
ERROR (BT_LOG_MCA_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_MCA_TRACE_LEVEL_WARNING)
API (BT_LOG_MCA_TRACE_LEVEL_API)
EVENT (BT_LOG_MCA_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_MCA_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_MCA_TRACE_LEVEL_VERBOSE)
HID layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for HID layer
Available options:NONE (BT_LOG_HID_TRACE_LEVEL_NONE)
ERROR (BT_LOG_HID_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_HID_TRACE_LEVEL_WARNING)
API (BT_LOG_HID_TRACE_LEVEL_API)
EVENT (BT_LOG_HID_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_HID_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_HID_TRACE_LEVEL_VERBOSE)
APPL layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for APPL layer
Available options:NONE (BT_LOG_APPL_TRACE_LEVEL_NONE)
ERROR (BT_LOG_APPL_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_APPL_TRACE_LEVEL_WARNING)
API (BT_LOG_APPL_TRACE_LEVEL_API)
EVENT (BT_LOG_APPL_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_APPL_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_APPL_TRACE_LEVEL_VERBOSE)
GATT layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for GATT layer
Available options:NONE (BT_LOG_GATT_TRACE_LEVEL_NONE)
ERROR (BT_LOG_GATT_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_GATT_TRACE_LEVEL_WARNING)
API (BT_LOG_GATT_TRACE_LEVEL_API)
EVENT (BT_LOG_GATT_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_GATT_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_GATT_TRACE_LEVEL_VERBOSE)
SMP layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for SMP layer
Available options:NONE (BT_LOG_SMP_TRACE_LEVEL_NONE)
ERROR (BT_LOG_SMP_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_SMP_TRACE_LEVEL_WARNING)
API (BT_LOG_SMP_TRACE_LEVEL_API)
EVENT (BT_LOG_SMP_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_SMP_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_SMP_TRACE_LEVEL_VERBOSE)
BTIF layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for BTIF layer
Available options:NONE (BT_LOG_BTIF_TRACE_LEVEL_NONE)
ERROR (BT_LOG_BTIF_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_BTIF_TRACE_LEVEL_WARNING)
API (BT_LOG_BTIF_TRACE_LEVEL_API)
EVENT (BT_LOG_BTIF_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_BTIF_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_BTIF_TRACE_LEVEL_VERBOSE)
BTC layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for BTC layer
Available options:NONE (BT_LOG_BTC_TRACE_LEVEL_NONE)
ERROR (BT_LOG_BTC_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_BTC_TRACE_LEVEL_WARNING)
API (BT_LOG_BTC_TRACE_LEVEL_API)
EVENT (BT_LOG_BTC_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_BTC_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_BTC_TRACE_LEVEL_VERBOSE)
OSI layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for OSI layer
Available options:NONE (BT_LOG_OSI_TRACE_LEVEL_NONE)
ERROR (BT_LOG_OSI_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_OSI_TRACE_LEVEL_WARNING)
API (BT_LOG_OSI_TRACE_LEVEL_API)
EVENT (BT_LOG_OSI_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_OSI_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_OSI_TRACE_LEVEL_VERBOSE)
BLUFI layer
Found in: Component config > Bluetooth > Bluedroid Options > BT DEBUG LOG LEVEL
Define BT trace level for BLUFI layer
Available options:NONE (BT_LOG_BLUFI_TRACE_LEVEL_NONE)
ERROR (BT_LOG_BLUFI_TRACE_LEVEL_ERROR)
WARNING (BT_LOG_BLUFI_TRACE_LEVEL_WARNING)
API (BT_LOG_BLUFI_TRACE_LEVEL_API)
EVENT (BT_LOG_BLUFI_TRACE_LEVEL_EVENT)
DEBUG (BT_LOG_BLUFI_TRACE_LEVEL_DEBUG)
VERBOSE (BT_LOG_BLUFI_TRACE_LEVEL_VERBOSE)
BT/BLE MAX ACL CONNECTIONS(1~7)
Found in: Component config > Bluetooth > Bluedroid Options
Maximum BT/BLE connection count
Range:from 1 to 7 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
4 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Enable BLE multi-conections
Found in: Component config > Bluetooth > Bluedroid Options
Enable this option if there are multiple connections
Default value:Yes (enabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
BT/BLE will first malloc the memory from the PSRAM
Found in: Component config > Bluetooth > Bluedroid Options
This select can save the internal RAM if there have the PSRAM
Default value:No (disabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Use dynamic memory allocation in BT/BLE stack
Found in: Component config > Bluetooth > Bluedroid Options
This select can make the allocation of memory will become more flexible
Default value:No (disabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
BLE queue congestion check
Found in: Component config > Bluetooth > Bluedroid Options
When scanning and scan duplicate is not enabled, if there are a lot of adv packets around or application layer handling adv packets is slow, it will cause the controller memory to run out. if enabled, adv packets will be lost when host queue is congested.
Default value:No (disabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Report adv data and scan response individually when BLE active scan
Found in: Component config > Bluetooth > Bluedroid Options
Originally, when doing BLE active scan, Bluedroid will not report adv to application layer until receive scan response. This option is used to disable the behavior. When enable this option, Bluedroid will report adv data or scan response to application layer immediately.
# Memory reserved at start of DRAM for Bluetooth stack
Default value:No (disabled) if BT_BLUEDROID_ENABLED && (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY) && BT_BLUEDROID_ENABLED
Timeout of BLE connection establishment
Found in: Component config > Bluetooth > Bluedroid Options
Bluetooth Connection establishment maximum time, if connection time exceeds this value, the connection establishment fails, ESP_GATTC_OPEN_EVT or ESP_GATTS_OPEN_EVT is triggered.
Range:from 1 to 60 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
30 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
length of bluetooth device name
Found in: Component config > Bluetooth > Bluedroid Options
Bluetooth Device name length shall be no larger than 248 octets, If the broadcast data cannot contain the complete device name, then only the shortname will be displayed, the rest parts that can’t fit in will be truncated.
Range:from 32 to 248 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
32 if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Update RPA to Controller
Found in: Component config > Bluetooth > Bluedroid Options
This enables controller RPA list function. For ESP32, ESP32 only support network privacy mode. If this option is enabled, ESP32 will only accept advertising packets from peer devices that contain private address, HW will not receive the advertising packets contain identity address after IRK changed. If this option is disabled, address resolution will be performed in the host, so the functions that require controller to resolve address in the white list cannot be used. This option is disabled by default on ESP32, please enable or disable this option according to your own needs.
For ESP32C3, ESP32S3, ESP32H2 and ESP32C2, devices support network privacy mode and device privacy mode, users can switch the two modes according to their own needs. So this option is enabled by default.
Default value:No (disabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Yes (enabled) if BT_BLUEDROID_ENABLED && BT_BLUEDROID_ENABLED
Enable BLE 5.0 features
Found in: Component config > Bluetooth > Bluedroid Options
This enables BLE 5.0 features, this option only support esp32c3/esp32s3 chip
Default value:Yes (enabled) if BT_BLUEDROID_ENABLED && SOC_ESP_NIMBLE_CONTROLLER && BT_BLUEDROID_ENABLED
Enable BLE 4.2 features
Found in: Component config > Bluetooth > Bluedroid Options
This enables BLE 4.2 features.
Default value:No (disabled) if BT_BLUEDROID_ENABLED && SOC_ESP_NIMBLE_CONTROLLER && BT_BLUEDROID_ENABLED
Contains:
Memory allocation strategy
Found in: Component config > Bluetooth > NimBLE Options
Allocation strategy for NimBLE host stack, essentially provides ability to allocate all required dynamic allocations from,
Internal DRAM memory only
External SPIRAM memory only
Either internal or external memory based on default malloc() behavior in ESP-IDF
Internal IRAM memory wherever applicable else internal DRAM
Internal memory (BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL)
External SPIRAM (BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL)
Default alloc mode (BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT)
Internal IRAM (BT_NIMBLE_MEM_ALLOC_MODE_IRAM_8BIT)
Allows to use IRAM memory region as 8bit accessible region.
Every unaligned (8bit or 16bit) access will result in an exception and incur penalty of certain clock cycles per unaligned read/write.
NimBLE Host log verbosity
Found in: Component config > Bluetooth > NimBLE Options
Select NimBLE log level. Please make a note that the selected NimBLE log verbosity can not exceed the level set in “Component config –> Log output –> Default log verbosity”.
Available options:No logs (BT_NIMBLE_LOG_LEVEL_NONE)
Error logs (BT_NIMBLE_LOG_LEVEL_ERROR)
Warning logs (BT_NIMBLE_LOG_LEVEL_WARNING)
Info logs (BT_NIMBLE_LOG_LEVEL_INFO)
Debug logs (BT_NIMBLE_LOG_LEVEL_DEBUG)
Maximum number of concurrent connections
Found in: Component config > Bluetooth > NimBLE Options
Defines maximum number of concurrent BLE connections. For ESP32, user is expected to configure BTDM_CTRL_BLE_MAX_CONN from controller menu along with this option. Similarly for ESP32-C3 or ESP32-S3, user is expected to configure BT_CTRL_BLE_MAX_ACT from controller menu.
Range:from 1 to 9 if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Maximum number of bonds to save across reboots
Found in: Component config > Bluetooth > NimBLE Options
Defines maximum number of bonds to save for peer security and our security
Default value:3 if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Maximum number of CCC descriptors to save across reboots
Found in: Component config > Bluetooth > NimBLE Options
Defines maximum number of CCC descriptors to save
Default value:8 if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Maximum number of connection oriented channels
Found in: Component config > Bluetooth > NimBLE Options
Defines maximum number of BLE Connection Oriented Channels. When set to (0), BLE COC is not compiled in
Range:from 0 to 9 if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
0 if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
The CPU core on which NimBLE host will run
Found in: Component config > Bluetooth > NimBLE Options
The CPU core on which NimBLE host will run. You can choose Core 0 or Core 1. Cannot specify no-affinity
Available options:Core 0 (PRO CPU) (BT_NIMBLE_PINNED_TO_CORE_0)
Core 1 (APP CPU) (BT_NIMBLE_PINNED_TO_CORE_1)
NimBLE Host task stack size
Found in: Component config > Bluetooth > NimBLE Options
This configures stack size of NimBLE host task
Default value:5120 if CONFIG_BLE_MESH && BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
4096 if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Enable BLE Central role
Found in: Component config > Bluetooth > NimBLE Options
Enables central role
Default value:Yes (enabled) if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Enable BLE Peripheral role
Found in: Component config > Bluetooth > NimBLE Options
Enable peripheral role
Default value:Yes (enabled) if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Enable BLE Broadcaster role
Found in: Component config > Bluetooth > NimBLE Options
Enables broadcaster role
Default value:Yes (enabled) if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Enable BLE Observer role
Found in: Component config > Bluetooth > NimBLE Options
Enables observer role
Default value:Yes (enabled) if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Persist the BLE Bonding keys in NVS
Found in: Component config > Bluetooth > NimBLE Options
Enable this flag to make bonding persistent across device reboots
Default value:No (disabled) if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Enable BLE SM feature
Found in: Component config > Bluetooth > NimBLE Options
Enable BLE sm feature
Default value:Yes (enabled) if BT_NIMBLE_ENABLED && BT_NIMBLE_ENABLED
Contains:
Security manager legacy pairing
Found in: Component config > Bluetooth > NimBLE Options > CONFIG_BT_NIMBLE_SECURITY_ENABLE
Enable security manager legacy pairing
Default value:Yes (enabled) if CONFIG_BT_NIMBLE_SECURITY_ENABLE && BT_NIMBLE_ENABLED
Security manager secure connections (4.2)
Found in: Component config > Bluetooth > NimBLE Options > CONFIG_BT_NIMBLE_SECURITY_ENABLE
Enable security manager secure connections
Default value:Yes (enabled) if CONFIG_BT_NIMBLE_SECURITY_ENABLE && BT_NIMBLE_ENABLED
Use predefined public-private key pair
Found in: Component config > Bluetooth > NimBLE Options > CONFIG_BT_NIMBLE_SECURITY_ENABLE > CONFIG_BT_NIMBLE_SM_SC
If this option is enabled, SM uses predefined DH key pair as described in Core Specification, Vol. 3, Part H, 2.3.5.6.1. This allows to decrypt air traffic easily and thus should only be used for debugging.
Default value:No (disabled) if CONFIG_BT_NIMBLE_SECURITY_ENABLE && CONFIG_BT_NIMBLE_SM_SC && BT_NIMBLE_ENABLED
Enable LE encryption
Found in: Component config > Bluetooth > NimBLE Options > CONFIG_BT_NIMBLE_SECURITY_ENABLE
Enable encryption connection
Default value:Yes (enabled) if