Merge branch 'bugfix/correct_kconfigs' into 'master'

Correct Kconfigs according to the coding style

See merge request idf/esp-idf!4172
This commit is contained in:
Angus Gratton
2019-01-30 09:24:22 +08:00
106 changed files with 7563 additions and 7535 deletions

View File

@@ -4,10 +4,9 @@ config APP_COMPILE_TIME_DATE
bool "Use time/date stamp for app" bool "Use time/date stamp for app"
default y default y
help help
If set, then the app will be built with the current time/date stamp. It is stored in the app description structure. If set, then the app will be built with the current time/date stamp. It is stored in the app description
If not set, time/date stamp will be excluded from app image. structure. If not set, time/date stamp will be excluded from app image. This can be useful for getting the
This can be useful for getting the same binary image files made from the same source, same binary image files made from the same source, but at different times.
but at different times.
config APP_EXCLUDE_PROJECT_VER_VAR config APP_EXCLUDE_PROJECT_VER_VAR
bool "Exclude PROJECT_VER from firmware image" bool "Exclude PROJECT_VER from firmware image"

View File

@@ -95,7 +95,8 @@ config AWS_IOT_OVERRIDE_THING_SHADOW_RX_BUFFER
size. This is the maximum size of a Thing Shadow size. This is the maximum size of a Thing Shadow
message in bytes, plus one. message in bytes, plus one.
If not overridden, the default value is the MQTT RX Buffer length plus one. If overriden, do not set higher than the default value. If not overridden, the default value is the MQTT RX Buffer length plus one. If overriden, do not set
higher than the default value.
config AWS_IOT_SHADOW_MAX_SIZE_OF_RX_BUFFER config AWS_IOT_SHADOW_MAX_SIZE_OF_RX_BUFFER
int "Maximum RX Buffer (bytes)" int "Maximum RX Buffer (bytes)"
@@ -122,7 +123,8 @@ config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_ACKS
default 10 default 10
range 1 100 range 1 100
help help
At any given time we will wait for this many responses. This will correlate to the rate at which the shadow actions are requested At any given time we will wait for this many responses. This will correlate to the rate at which the
shadow actions are requested
config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES
int "Maximum simultaneous Thing Name operations" int "Maximum simultaneous Thing Name operations"
@@ -130,14 +132,16 @@ config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES
default 10 default 10
range 1 100 range 1 100
help help
We could perform shadow action on any thing Name and this is maximum Thing Names we can act on at any given time We could perform shadow action on any thing Name and this is maximum Thing Names we can act on at any
given time
config AWS_IOT_SHADOW_MAX_JSON_TOKEN_EXPECTED config AWS_IOT_SHADOW_MAX_JSON_TOKEN_EXPECTED
int "Maximum expected JSON tokens" int "Maximum expected JSON tokens"
depends on AWS_IOT_SDK depends on AWS_IOT_SDK
default 120 default 120
help help
These are the max tokens that is expected to be in the Shadow JSON document. Includes the metadata which is published These are the max tokens that is expected to be in the Shadow JSON document. Includes the metadata which
is published
config AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME config AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME
int "Maximum topic length (not including Thing Name)" int "Maximum topic length (not including Thing Name)"
@@ -145,7 +149,9 @@ config AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME
default 60 default 60
range 10 1000 range 10 1000
help help
All shadow actions have to be published or subscribed to a topic which is of the format $aws/things/{thingName}/shadow/update/accepted. This refers to the size of the topic without the Thing Name All shadow actions have to be published or subscribed to a topic which is of the format
$aws/things/{thingName}/shadow/update/accepted. This refers to the size of the topic without the Thing
Name
config AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME config AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME
int "Maximum Thing Name length" int "Maximum Thing Name length"
@@ -156,4 +162,3 @@ config AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME
Maximum length of a Thing Name. Maximum length of a Thing Name.
endmenu # Thing Shadow endmenu # Thing Shadow

View File

@@ -29,17 +29,17 @@ config LOG_BOOTLOADER_LEVEL
default 5 if LOG_BOOTLOADER_LEVEL_VERBOSE default 5 if LOG_BOOTLOADER_LEVEL_VERBOSE
config BOOTLOADER_SPI_WP_PIN config BOOTLOADER_SPI_WP_PIN
int "SPI Flash WP Pin when customising pins via efuse (read help)" int "SPI Flash WP Pin when customising pins via eFuse (read help)"
range 0 33 range 0 33
default 7 default 7
depends on FLASHMODE_QIO || FLASHMODE_QOUT depends on FLASHMODE_QIO || FLASHMODE_QOUT
help help
This value is ignored unless flash mode is set to QIO or QOUT *and* the SPI flash pins have been This value is ignored unless flash mode is set to QIO or QOUT *and* the SPI flash pins have been
overriden by setting the efuses SPI_PAD_CONFIG_xxx. overriden by setting the eFuses SPI_PAD_CONFIG_xxx.
When this is the case, the Efuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka ESP32 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. That pin number is compiled into the bootloader pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in eFuse. That pin number is compiled into the
instead. bootloader instead.
The default value (GPIO 7) is correct for WP pin on ESP32-D2WD integrated flash. The default value (GPIO 7) is correct for WP pin on ESP32-D2WD integrated flash.
@@ -47,13 +47,13 @@ choice BOOTLOADER_VDDSDIO_BOOST
bool "VDDSDIO LDO voltage" bool "VDDSDIO LDO voltage"
default BOOTLOADER_VDDSDIO_BOOST_1_9V default BOOTLOADER_VDDSDIO_BOOST_1_9V
help help
If this option is enabled, and VDDSDIO LDO is set to 1.8V (using EFUSE 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 or MTDI bootstrapping pin), bootloader will change LDO settings to
output 1.9V instead. This helps prevent flash chip from browning out output 1.9V instead. This helps prevent flash chip from browning out
during flash programming operations. during flash programming operations.
This option has no effect if VDDSDIO is set to 3.3V, or if the internal This option has no effect if VDDSDIO is set to 3.3V, or if the internal
VDDSDIO regulator is disabled via efuse. VDDSDIO regulator is disabled via eFuse.
config BOOTLOADER_VDDSDIO_BOOST_1_8V config BOOTLOADER_VDDSDIO_BOOST_1_8V
bool "1.8V" bool "1.8V"
@@ -86,7 +86,8 @@ config BOOTLOADER_OTA_DATA_ERASE
bool "Clear OTA data on factory reset (select factory partition)" bool "Clear OTA data on factory reset (select factory partition)"
depends on BOOTLOADER_FACTORY_RESET depends on BOOTLOADER_FACTORY_RESET
help help
The device will boot from "factory" partition (or OTA slot 0 if no factory partition is present) after a factory reset. The device will boot from "factory" partition (or OTA slot 0 if no factory partition is present) after a
factory reset.
config BOOTLOADER_DATA_FACTORY_RESET config BOOTLOADER_DATA_FACTORY_RESET
string "Comma-separated names of partitions to clear on factory reset" string "Comma-separated names of partitions to clear on factory reset"
@@ -95,7 +96,8 @@ config BOOTLOADER_DATA_FACTORY_RESET
help help
Allows customers to select which data partitions will be erased while 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, ...") 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. Make sure that the name specified in the partition table and here are the same.
Partitions of type "app" cannot be specified here. Partitions of type "app" cannot be specified here.
@@ -134,8 +136,10 @@ config BOOTLOADER_WDT_ENABLE
Tracks the execution time of startup code. Tracks the execution time of startup code.
If the execution time is exceeded, the RTC_WDT will restart system. 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. 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. NOTE: Tracks the execution time starts from the bootloader code - re-set timeout, while selecting the
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. 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 ESP32_RTC_CLOCK_SOURCE (INTERNAL_RC or EXTERNAL_CRYSTAL). slow_clk depends on ESP32_RTC_CLOCK_SOURCE (INTERNAL_RC or EXTERNAL_CRYSTAL).
config BOOTLOADER_WDT_DISABLE_IN_USER_CODE config BOOTLOADER_WDT_DISABLE_IN_USER_CODE
@@ -164,11 +168,10 @@ config APP_ROLLBACK_ENABLE
default n default n
help help
After updating the app, the bootloader runs a new app with the "ESP_OTA_IMG_PENDING_VERIFY" state set. 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. This state prevents the re-run of this app. After the first boot of the new app in the user code, the
After the first boot of the new app in the user code, the function should be called to confirm function should be called to confirm the operability of the app or vice versa about its non-operability.
the operability of the app or vice versa about its non-operability. If the app is working, If the app is working, then it is marked as valid. Otherwise, it is marked as not valid and rolls back to
then it is marked as valid. Otherwise, it is marked as not valid and rolls back to the previous working app. the previous working app. A reboot is performed, and the app is booted before the software update.
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. Note: If during the first boot a new app the power goes out or the WDT works, then roll back will happen.
endmenu # Bootloader endmenu # Bootloader
@@ -201,17 +204,22 @@ config SECURE_SIGNED_APPS_NO_SECURE_BOOT
help help
Require apps to be signed to verify their integrity. 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. 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.
config SECURE_SIGNED_ON_BOOT_NO_SECURE_BOOT config SECURE_SIGNED_ON_BOOT_NO_SECURE_BOOT
bool "Bootloader verifies app signatures" bool "Bootloader verifies app signatures"
default n default n
depends on SECURE_SIGNED_APPS_NO_SECURE_BOOT depends on SECURE_SIGNED_APPS_NO_SECURE_BOOT
help help
If this option is set, the bootloader will be compiled with code to verify that an app is signed before booting it. 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 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. 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.
config SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT config SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
bool "Verify app signature on update" bool "Verify app signature on update"
@@ -220,11 +228,12 @@ config SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
help help
If this option is set, any OTA updated apps will have the signature verified before being considered valid. 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, When enabled, the signature is automatically checked whenever the esp_ota_ops.h APIs are used for OTA
or esp_image_format.h APIs are used to verify apps. 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 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. If hardware secure boot is not enabled, this option still adds significant security against network-based
attackers by preventing spoofing of OTA updates.
config SECURE_BOOT_ENABLED config SECURE_BOOT_ENABLED
bool "Enable hardware secure boot in bootloader (READ DOCS FIRST)" bool "Enable hardware secure boot in bootloader (READ DOCS FIRST)"
@@ -232,7 +241,9 @@ config SECURE_BOOT_ENABLED
help help
Build a bootloader which enables secure boot on first boot. 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. 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. When enabling secure boot, JTAG and ROM BASIC Interpreter are permanently disabled by default.
@@ -246,7 +257,9 @@ choice SECURE_BOOTLOADER_MODE
config SECURE_BOOTLOADER_ONE_TIME_FLASH config SECURE_BOOTLOADER_ONE_TIME_FLASH
bool "One-time flash" bool "One-time flash"
help help
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. 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. Enabling this option means that the bootloader cannot be changed after the first time it is booted.
@@ -255,9 +268,11 @@ config SECURE_BOOTLOADER_REFLASHABLE
help help
Generate a reusable secure bootloader key, derived (via SHA-256) from the secure boot signing key. 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 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. 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.
endchoice endchoice
@@ -268,9 +283,11 @@ config SECURE_BOOT_BUILD_SIGNED_BINARIES
help help
Once secure boot or signed app requirement is enabled, app images are required to be signed. 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 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 (for example, on a remote signing server.) If disabled, unsigned app/partition data will be built. They must be signed manually using espsecure.py
(for example, on a remote signing server.)
config SECURE_BOOT_SIGNING_KEY config SECURE_BOOT_SIGNING_KEY
string "Secure boot private signing key" string "Secure boot private signing key"
@@ -286,15 +303,15 @@ config SECURE_BOOT_SIGNING_KEY
You can generate a new signing key by running the following command: You can generate a new signing key by running the following command:
espsecure.py generate_signing_key secure_boot_signing_key.pem espsecure.py generate_signing_key secure_boot_signing_key.pem
See docs/security/secure-boot.rst for details. See https://docs.espressif.com/projects/esp-idf/en/latest/security/secure-boot.html for details.
config SECURE_BOOT_VERIFICATION_KEY config SECURE_BOOT_VERIFICATION_KEY
string "Secure boot public signature verification key" string "Secure boot public signature verification key"
depends on SECURE_SIGNED_APPS && !SECURE_BOOT_BUILD_SIGNED_BINARIES depends on SECURE_SIGNED_APPS && !SECURE_BOOT_BUILD_SIGNED_BINARIES
default signature_verification_key.bin default signature_verification_key.bin
help help
Path to a public key file used to verify signed images. This key is compiled into the bootloader and/or app, Path to a public key file used to verify signed images. This key is compiled into the bootloader and/or
to verify app images. app, to verify app images.
Key file is in raw binary format, and can be extracted from a Key file is in raw binary format, and can be extracted from a
PEM formatted private key using the espsecure.py PEM formatted private key using the espsecure.py
@@ -308,12 +325,14 @@ choice SECURE_BOOTLOADER_KEY_ENCODING
default SECURE_BOOTLOADER_NO_ENCODING default SECURE_BOOTLOADER_NO_ENCODING
help help
In reflashable secure bootloader mode, a hardware key is derived from the signing key (with SHA-256) and can be written to efuse In reflashable secure bootloader mode, a hardware key is derived from the signing key (with SHA-256) and
with espefuse.py. 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. 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. This configuration item doesn't change any firmware code, it only changes the size of key binary which is
generated at build time.
config SECURE_BOOTLOADER_KEY_ENCODING_256BIT config SECURE_BOOTLOADER_KEY_ENCODING_256BIT
bool "No encoding (256 bit key)" bool "No encoding (256 bit key)"
@@ -328,7 +347,8 @@ config SECURE_BOOT_INSECURE
depends on SECURE_BOOT_ENABLED depends on SECURE_BOOT_ENABLED
default N default N
help help
You can disable some of the default protections offered by secure boot, in order to enable testing or a custom combination of 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. Only enable these options if you are very sure.
@@ -350,11 +370,13 @@ config FLASH_ENCRYPTION_INSECURE
depends on FLASH_ENCRYPTION_ENABLED depends on FLASH_ENCRYPTION_ENABLED
default N default N
help help
You can disable some of the default protections offered by flash encryption, in order to enable testing or a custom combination of security features. You can disable some of the default protections offered by flash encryption, in order to enable testing or
a custom combination of security features.
Only enable these options if you are very sure. Only enable these options if you are very sure.
Refer to docs/security/secure-boot.rst and docs/security/flash-encryption.rst for details. Refer to https://docs.espressif.com/projects/esp-idf/en/latest/security/secure-boot.html and
https://docs.espressif.com/projects/esp-idf/en/latest/security/flash-encryption.html for details.
menu "Potentially insecure options" menu "Potentially insecure options"
visible if FLASH_ENCRYPTION_INSECURE || SECURE_BOOT_INSECURE visible if FLASH_ENCRYPTION_INSECURE || SECURE_BOOT_INSECURE
@@ -374,9 +396,9 @@ config SECURE_BOOT_ALLOW_ROM_BASIC
read from the flash. read from the flash.
When either flash encryption or secure boot are enabled, the default is to When either flash encryption or secure boot are enabled, the default is to
disable this BASIC fallback mode permanently via efuse. disable this BASIC fallback mode permanently via eFuse.
If this option is set, this efuse is not burned and the BASIC ROM Console may 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. remain accessible. Only set this option in testing environments.
config SECURE_BOOT_ALLOW_JTAG config SECURE_BOOT_ALLOW_JTAG
@@ -384,9 +406,11 @@ config SECURE_BOOT_ALLOW_JTAG
depends on SECURE_BOOT_INSECURE || FLASH_ENCRYPTION_INSECURE depends on SECURE_BOOT_INSECURE || FLASH_ENCRYPTION_INSECURE
default N default N
help help
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. 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. 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. Only set this option in testing environments.
@@ -394,16 +418,23 @@ config SECURE_BOOT_ALLOW_SHORT_APP_PARTITION
bool "Allow app partition length not 64KB aligned" bool "Allow app partition length not 64KB aligned"
depends on SECURE_BOOT_INSECURE depends on SECURE_BOOT_INSECURE
help help
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. 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. 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.
config FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_ENCRYPT config FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_ENCRYPT
bool "Leave UART bootloader encryption enabled" bool "Leave UART bootloader encryption enabled"
depends on FLASH_ENCRYPTION_INSECURE depends on FLASH_ENCRYPTION_INSECURE
default N default N
help help
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. 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. It is recommended to only set this option in testing environments.
@@ -412,30 +443,32 @@ config FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_DECRYPT
depends on FLASH_ENCRYPTION_INSECURE depends on FLASH_ENCRYPTION_INSECURE
default N default N
help help
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. 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. Only set this option in testing environments. Setting this option allows complete bypass of flash
encryption.
config FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE config FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE
bool "Leave UART bootloader flash cache enabled" bool "Leave UART bootloader flash cache enabled"
depends on FLASH_ENCRYPTION_INSECURE depends on FLASH_ENCRYPTION_INSECURE
default N default N
help help
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. 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. Only set this option in testing environments.
config SECURE_BOOT_TEST_MODE config SECURE_BOOT_TEST_MODE
bool "Secure boot test mode: don't permanently set any efuses" bool "Secure boot test mode: don't permanently set any eFuses"
depends on SECURE_BOOT_INSECURE depends on SECURE_BOOT_INSECURE
default N default N
help help
If this option is set, all permanent secure boot changes (via Efuse) are disabled. If this option is set, all permanent secure boot changes (via eFuse) are disabled.
Log output will state changes which would be applied, but they will not be. Log output will state changes which would be applied, but they will not be.
This option is for testing purposes only - it completely disables secure boot protection. This option is for testing purposes only - it completely disables secure boot protection.
endmenu # Potentially Insecure endmenu # Potentially Insecure
endmenu # Security features endmenu # Security features

View File

@@ -60,12 +60,14 @@ config BTDM_CONTROLLER_BLE_MAX_CONN_EFF
config BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF config BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF
int int
default BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN if BTDM_CONTROLLER_MODE_BR_EDR_ONLY || BTDM_CONTROLLER_MODE_BTDM default \
BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN if BTDM_CONTROLLER_MODE_BR_EDR_ONLY || BTDM_CONTROLLER_MODE_BTDM
default 0 default 0
config BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF config BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF
int int
default BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN if BTDM_CONTROLLER_MODE_BR_EDR_ONLY || BTDM_CONTROLLER_MODE_BTDM default \
BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN if BTDM_CONTROLLER_MODE_BR_EDR_ONLY || BTDM_CONTROLLER_MODE_BTDM
default 0 default 0
choice BTDM_CONTROLLER_PINNED_TO_CORE_CHOICE choice BTDM_CONTROLLER_PINNED_TO_CORE_CHOICE
@@ -146,13 +148,15 @@ choice BTDM_MODEM_SLEEP_MODE
config BTDM_MODEM_SLEEP_MODE_ORIG config BTDM_MODEM_SLEEP_MODE_ORIG
bool "ORIG Mode(sleep with low power clock)" bool "ORIG Mode(sleep with low power clock)"
help help
ORIG mode is a bluetooth sleep mode that can be used for dual mode controller. In this mode, bluetooth controller ORIG mode is a bluetooth sleep mode that can be used for dual mode controller. In this mode,
sleeps between BR/EDR frames and BLE events. A low power clock is used to maintain bluetooth reference clock. bluetooth controller sleeps between BR/EDR frames and BLE events. A low power clock is used to
maintain bluetooth reference clock.
config BTDM_MODEM_SLEEP_MODE_EVED config BTDM_MODEM_SLEEP_MODE_EVED
bool "EVED Mode(For internal test only)" bool "EVED Mode(For internal test only)"
help help
EVED mode is for BLE only and is only for internal test. Do not use it for production. this mode is not compatible EVED mode is for BLE only and is only for internal test. Do not use it for production. this
with DFS nor light sleep mode is not compatible with DFS nor light sleep
endchoice endchoice
choice BTDM_LOW_POWER_CLOCK choice BTDM_LOW_POWER_CLOCK
@@ -164,9 +168,11 @@ choice BTDM_LOW_POWER_CLOCK
config BTDM_LPCLK_SEL_MAIN_XTAL config BTDM_LPCLK_SEL_MAIN_XTAL
bool "Main crystal" bool "Main crystal"
help help
Main crystal can be used as low power clock for bluetooth modem sleep. If this option is selected, bluetooth Main crystal can be used as low power clock for bluetooth modem sleep. If this option is
modem sleep can work under Dynamic Frequency Scaling(DFS) enabled, but cannot work when light sleep is enabled. selected, bluetooth modem sleep can work under Dynamic Frequency Scaling(DFS) enabled, but
Main crystal has a relatively better performance than other bluetooth low power clock sources. cannot work when light sleep is enabled. Main crystal has a relatively better performance than
other bluetooth low power clock sources.
config BTDM_LPCLK_SEL_EXT_32K_XTAL config BTDM_LPCLK_SEL_EXT_32K_XTAL
bool "External 32kHz crystal" bool "External 32kHz crystal"
depends on ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL depends on ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL
@@ -186,29 +192,31 @@ choice SCAN_DUPLICATE_TYPE
default SCAN_DUPLICATE_BY_DEVICE_ADDR default SCAN_DUPLICATE_BY_DEVICE_ADDR
depends on BLE_SCAN_DUPLICATE depends on BLE_SCAN_DUPLICATE
help help
Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use advertiser address Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use
filtering. The adv packet of the same address is only allowed to be reported once. Another way is "Scan Duplicate advertiser address filtering. The adv packet of the same address is only allowed to be reported once.
By Device Address And Advertising Data". This way is to use advertising data and device address filtering. All Another way is "Scan Duplicate By Device Address And Advertising Data". This way is to use advertising
different adv packets with the same address are allowed to be reported. The last way is "Scan Duplicate By Advertising data and device address filtering. All different adv packets with the same address are allowed to be
Data". This way is to use advertising data filtering. All same advertising data only allow to be reported once even though reported. The last way is "Scan Duplicate By Advertising Data". This way is to use advertising data
they are from different devices. filtering. All same advertising data only allow to be reported once even though they are from
different devices.
config SCAN_DUPLICATE_BY_DEVICE_ADDR config SCAN_DUPLICATE_BY_DEVICE_ADDR
bool "Scan Duplicate By Device Address" bool "Scan Duplicate By Device Address"
help help
This way is to use advertiser address filtering. The adv packet of the same address is only allowed to be reported once This way is to use advertiser address filtering. The adv packet of the same address is only
allowed to be reported once
config SCAN_DUPLICATE_BY_ADV_DATA config SCAN_DUPLICATE_BY_ADV_DATA
bool "Scan Duplicate By Advertising Data" bool "Scan Duplicate By Advertising Data"
help help
This way is to use advertising data filtering. All same advertising data only allow to be reported once even though This way is to use advertising data filtering. All same advertising data only allow to be reported
they are from different devices. once even though they are from different devices.
config SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR config SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR
bool "Scan Duplicate By Device Address And Advertising Data" bool "Scan Duplicate By Device Address And Advertising Data"
help help
This way is to use advertising data and device address filtering. All different adv packets with the same address are This way is to use advertising data and device address filtering. All different adv packets with
allowed to be reported. the same address are allowed to be reported.
endchoice endchoice
config SCAN_DUPLICATE_TYPE config SCAN_DUPLICATE_TYPE
@@ -1197,9 +1205,9 @@ config BLE_HOST_QUEUE_CONGESTION_CHECK
depends on BLUEDROID_ENABLED depends on BLUEDROID_ENABLED
default n default n
help help
When scanning and scan duplicate is not enabled, if there are a lot of adv packets around or application layer When scanning and scan duplicate is not enabled, if there are a lot of adv packets around or application
handling adv packets is slow, it will cause the controller memory to run out. if enabled, adv packets will be layer handling adv packets is slow, it will cause the controller memory to run out. if enabled, adv
lost when host queue is congested. packets will be lost when host queue is congested.
config SMP_ENABLE config SMP_ENABLE
bool bool

View File

@@ -14,7 +14,8 @@ config ADC2_DISABLE_DAC
bool "Disable DAC when ADC2 is used on GPIO 25 and 26" bool "Disable DAC when ADC2 is used on GPIO 25 and 26"
default y default y
help help
If this is set, the ADC2 driver will disables the output of the DAC corresponding to the specified channel. This is the default value. If this is set, the ADC2 driver will disables the output of the DAC corresponding to the specified
channel. This is the default value.
For testing, disable this option so that we can measure the output of DAC by internal ADC. For testing, disable this option so that we can measure the output of DAC by internal ADC.

View File

@@ -104,10 +104,11 @@ choice SPIRAM_SPEED
2. Flash SPI running at 80Mhz and RAM SPI running at 40Mhz 2. Flash SPI running at 80Mhz and RAM SPI running at 40Mhz
3. Flash SPI running at 80Mhz and RAM SPI running at 80Mhz 3. Flash SPI running at 80Mhz and RAM SPI running at 80Mhz
Note: If the third mode(80Mhz+80Mhz) is enabled for SPI RAM of type 32MBit, one of the HSPI/VSPI host will Note: If the third mode(80Mhz+80Mhz) is enabled for SPI RAM of type 32MBit, one of the HSPI/VSPI host
be occupied by the system. Which SPI host to use can be selected by the config item SPIRAM_OCCUPY_SPI_HOST. will be occupied by the system. Which SPI host to use can be selected by the config item
Application code should never touch HSPI/VSPI hardware in this case. The option to select SPIRAM_OCCUPY_SPI_HOST. Application code should never touch HSPI/VSPI hardware in this case. The
80MHz will only be visible if the flash SPI speed is also 80MHz. (ESPTOOLPY_FLASHFREQ_80M is true) option to select 80MHz will only be visible if the flash SPI speed is also 80MHz.
(ESPTOOLPY_FLASHFREQ_80M is true)
config SPIRAM_SPEED_40M config SPIRAM_SPEED_40M
bool "40MHz clock speed" bool "40MHz clock speed"
@@ -133,8 +134,8 @@ config SPIRAM_CACHE_WORKAROUND
when the cache line needs to be fetched from external RAM and an interrupt occurs. This enables a when the cache line needs to be fetched from external RAM and an interrupt occurs. This enables a
fix in the compiler that makes sure the specific code that is vulnerable to this will not be emitted. fix in the compiler that makes sure the specific code that is vulnerable to this will not be emitted.
This will also not use any bits of newlib that are located in ROM, opting for a version that is compiled This will also not use any bits of newlib that are located in ROM, opting for a version that is
with the workaround and located in flash instead. compiled with the workaround and located in flash instead.
config SPIRAM_BANKSWITCH_ENABLE config SPIRAM_BANKSWITCH_ENABLE
bool "Enable bank switching for >4MiB external RAM" bool "Enable bank switching for >4MiB external RAM"
@@ -145,8 +146,9 @@ config SPIRAM_BANKSWITCH_ENABLE
memories, but these have to be bank-switched in and out of this address space. Enabling this allows you memories, but these have to be bank-switched in and out of this address space. Enabling this allows you
to reserve some MMU pages for this, which allows the use of the esp_himem api to manage these banks. to reserve some MMU pages for this, which allows the use of the esp_himem api to manage these banks.
#Note that this is limited to 62 banks, as esp_spiram_writeback_cache needs some kind of mapping of some banks #Note that this is limited to 62 banks, as esp_spiram_writeback_cache needs some kind of mapping of
#below that mark to work. We cannot at this moment guarantee this to exist when himem is enabled. #some banks below that mark to work. We cannot at this moment guarantee this to exist when himem is
#enabled.
config SPIRAM_BANKSWITCH_RESERVE config SPIRAM_BANKSWITCH_RESERVE
int "Amount of 32K pages to reserve for bank switching" int "Amount of 32K pages to reserve for bank switching"
depends on SPIRAM_BANKSWITCH_ENABLE depends on SPIRAM_BANKSWITCH_ENABLE
@@ -166,17 +168,19 @@ config SPIRAM_MALLOC_ALWAYSINTERNAL
default 16384 default 16384
range 0 131072 range 0 131072
help help
If malloc() is capable of also allocating SPI-connected ram, its allocation strategy will prefer to allocate chunks less If malloc() is capable of also allocating SPI-connected ram, its allocation strategy will prefer to
than this size in internal memory, while allocations larger than this will be done from external RAM. allocate chunks less than this size in internal memory, while allocations larger than this will be
If allocation from the preferred region fails, an attempt is made to allocate from the non-preferred done from external RAM. If allocation from the preferred region fails, an attempt is made to allocate
region instead, so malloc() will not suddenly fail when either internal or external memory is full. from the non-preferred region instead, so malloc() will not suddenly fail when either internal or
external memory is full.
config WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST config WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST
bool "Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, allocate internal memory" bool "Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, allocate internal memory"
depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
default "n" default "n"
help help
Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, try to allocate internal memory then. Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, try to allocate internal
memory then.
config SPIRAM_MALLOC_RESERVE_INTERNAL config SPIRAM_MALLOC_RESERVE_INTERNAL
int "Reserve this amount of bytes for data that specifically needs to be in DMA or internal memory" int "Reserve this amount of bytes for data that specifically needs to be in DMA or internal memory"
@@ -204,20 +208,20 @@ config SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
default n default n
depends on SPIRAM_USE_MALLOC depends on SPIRAM_USE_MALLOC
help help
Because some bits of the ESP32 code environment cannot be recompiled with the cache workaround, normally Because some bits of the ESP32 code environment cannot be recompiled with the cache workaround,
tasks cannot be safely run with their stack residing in external memory; for this reason xTaskCreate and normally tasks cannot be safely run with their stack residing in external memory; for this reason
friends always allocate stack in internal memory and xTaskCreateStatic will check if the memory passed xTaskCreate and friends always allocate stack in internal memory and xTaskCreateStatic will check if
to it is in internal memory. If you have a task that needs a large amount of stack and does not call on the memory passed to it is in internal memory. If you have a task that needs a large amount of stack
ROM code in any way (no direct calls, but also no Bluetooth/WiFi), you can try to disable this and use and does not call on ROM code in any way (no direct calls, but also no Bluetooth/WiFi), you can try to
xTaskCreateStatic to create the tasks stack in external memory. disable this and use xTaskCreateStatic to create the tasks stack in external memory.
config SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY config SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
bool "Allow .bss segment placed in external memory" bool "Allow .bss segment placed in external memory"
default n default n
depends on SPIRAM_SUPPORT depends on SPIRAM_SUPPORT
help help
If enabled the option,and add EXT_RAM_ATTR defined your variable,then your variable will be placed If enabled the option,and add EXT_RAM_ATTR defined your variable,then your variable will be placed in
in PSRAM instead of internal memory, and placed most of variables of lwip,net802.11,pp,bluedroid library PSRAM instead of internal memory, and placed most of variables of lwip,net802.11,pp,bluedroid library
to external memory defaultly. to external memory defaultly.
choice SPIRAM_OCCUPY_SPI_HOST choice SPIRAM_OCCUPY_SPI_HOST
@@ -670,9 +674,9 @@ config TASK_WDT_CHECK_IDLE_TASK_CPU1
If this option is enabled, the Task Wtachdog Timer will wach the CPU1 If this option is enabled, the Task Wtachdog Timer will wach the CPU1
Idle Task. Idle Task.
#The brownout detector code is disabled (by making it depend on a nonexisting symbol) because the current revision of ESP32
#silicon has a bug in the brown-out detector, rendering it unusable for resetting the CPU.
config BROWNOUT_DET config BROWNOUT_DET
#The brownout detector code is disabled (by making it depend on a nonexisting symbol) because the current
#revision of ESP32 silicon has a bug in the brown-out detector, rendering it unusable for resetting the CPU.
bool "Hardware brownout detect & reset" bool "Hardware brownout detect & reset"
default y default y
help help
@@ -802,7 +806,8 @@ config ESP32_RTC_CLK_CAL_CYCLES
int "Number of cycles for RTC_SLOW_CLK calibration" int "Number of cycles for RTC_SLOW_CLK calibration"
default 3000 if ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL default 3000 if ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL
default 1024 if ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC default 1024 if ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC
range 0 27000 if ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL || ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC || ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 range 0 27000 if ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL || ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC \
|| ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256
range 0 32766 if ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC range 0 32766 if ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC
help help
When the startup code initializes RTC_SLOW_CLK, it can perform When the startup code initializes RTC_SLOW_CLK, it can perform
@@ -890,7 +895,7 @@ config DISABLE_BASIC_ROM_CONSOLE
default n default n
help help
If set, the first time the app boots it will disable the BASIC ROM Console If set, the first time the app boots it will disable the BASIC ROM Console
permanently (by burning an efuse). permanently (by burning an eFuse).
Otherwise, the BASIC ROM Console starts on reset if no valid bootloader is Otherwise, the BASIC ROM Console starts on reset if no valid bootloader is
read from the flash. read from the flash.
@@ -972,8 +977,10 @@ choice SW_COEXIST_PREFERENCE
help help
Choose Bluetooth/WiFi/Balance for different preference. Choose Bluetooth/WiFi/Balance for different preference.
If choose WiFi, it will make WiFi performance better. Such, keep WiFi Audio more fluent. If choose WiFi, it will make WiFi performance better. Such, keep WiFi Audio more fluent.
If choose Bluetooth, it will make Bluetooth performance better. Such, keep Bluetooth(A2DP) Audio more fluent. If choose Bluetooth, it will make Bluetooth performance better. Such, keep Bluetooth(A2DP) Audio more
If choose Balance, the performance of WiFi and bluetooth will be balance. It's default. Normally, just choose balance, the A2DP audio can play fluently, too. fluent.
If choose Balance, the performance of WiFi and bluetooth will be balance. It's default. Normally, just
choose balance, the A2DP audio can play fluently, too.
Except config preference in menuconfig, you can also call esp_coex_preference_set() dynamically. Except config preference in menuconfig, you can also call esp_coex_preference_set() dynamically.
config SW_COEXIST_PREFERENCE_WIFI config SW_COEXIST_PREFERENCE_WIFI
@@ -1149,19 +1156,22 @@ config ESP32_WIFI_SOFTAP_BEACON_MAX_LEN
range 752 1256 range 752 1256
default 752 default 752
help help
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the default ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the
length of a beacon frame can simultaneously hold only five root node identifier structures, meaning that a root node default length of a beacon frame can simultaneously hold only five root node identifier structures,
conflict of up to five nodes can be detected at one time. In the occurence of more root nodes conflict involving more meaning that a root node conflict of up to five nodes can be detected at one time. In the occurence of
than five root nodes, the conflict resolution process will detect five of the root nodes, resolve the conflict, and more root nodes conflict involving more than five root nodes, the conflict resolution process will detect
re-detect more root nodes. This process will repeat until all root node conflicts are resolved. However this process five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will repeat
can generally take a very long time. until all root node conflicts are resolved. However this process can generally take a very long time.
To counter this situation, the beacon frame length can be increased such that more root nodes can be detected simultaneously. To counter this situation, the beacon frame length can be increased such that more root nodes can be
Each additional root node will require 36 bytes and should be added ontop of the default beacon frame length of detected simultaneously. Each additional root node will require 36 bytes and should be added ontop of the
752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon frame length as default beacon frame length of
752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
frame length as
932 (752+36*5). 932 (752+36*5).
Setting a longer beacon length also assists with debugging as the conflicting root nodes can be identified more quickly. Setting a longer beacon length also assists with debugging as the conflicting root nodes can be identified
more quickly.
config ESP32_WIFI_DEBUG_LOG_ENABLE config ESP32_WIFI_DEBUG_LOG_ENABLE
bool "Enable WiFi debug log" bool "Enable WiFi debug log"
@@ -1188,9 +1198,9 @@ choice ESP32_WIFI_DEBUG_LOG_MODULE
prompt "WiFi debug log module" prompt "WiFi debug log module"
default ESP32_WIFI_DEBUG_LOG_MODULE_WIFI default ESP32_WIFI_DEBUG_LOG_MODULE_WIFI
help help
The WiFi log module contains three parts: WIFI,COEX,MESH. The WiFi log module contains three parts: WIFI,COEX,MESH. The WIFI module indicates the logs related to
The WIFI module indicates the logs related to WiFi, the COEX module indicates the logs related to WiFi and BT(or BLE) coexist, WiFi, the COEX module indicates the logs related to WiFi and BT(or BLE) coexist, the MESH module indicates
the MESH module indicates the logs related to Mesh. When ESP32_WIFI_LOG_MODULE_ALL is enabled, all modules are selected. the logs related to Mesh. When ESP32_WIFI_LOG_MODULE_ALL is enabled, all modules are selected.
config ESP32_WIFI_DEBUG_LOG_MODULE_ALL config ESP32_WIFI_DEBUG_LOG_MODULE_ALL
bool "WiFi Debug Log Module All" bool "WiFi Debug Log Module All"
@@ -1209,7 +1219,8 @@ config ESP32_WIFI_DEBUG_LOG_SUBMODULE
help help
Enable this option to set the WiFi debug log submodule. Enable this option to set the WiFi debug log submodule.
Currently the log submodule contains the following parts: INIT,IOCTL,CONN,SCAN. Currently the log submodule contains the following parts: INIT,IOCTL,CONN,SCAN.
The INIT submodule indicates the initialization process.The IOCTL submodule indicates the API calling process. The INIT submodule indicates the initialization process.The IOCTL submodule indicates the API calling
process.
The CONN submodule indicates the connecting process.The SCAN submodule indicates the scaning process. The CONN submodule indicates the connecting process.The SCAN submodule indicates the scaning process.
config ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL config ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL

View File

@@ -4,8 +4,8 @@ config EVENT_LOOP_PROFILING
bool "Enable event loop profiling" bool "Enable event loop profiling"
default n default n
help help
Enables collections of statistics in the event loop library such as the number of events posted to/recieved by an event loop, number of Enables collections of statistics in the event loop library such as the number of events posted
callbacks involved, number of events dropped to to a full event loop queue, run time of event handlers, and number of times/run to/recieved by an event loop, number of callbacks involved, number of events dropped to to a full event
time of each event handler. loop queue, run time of event handlers, and number of times/run time of each event handler.
endmenu endmenu

View File

@@ -4,7 +4,8 @@ config HTTPD_MAX_REQ_HDR_LEN
int "Max HTTP Request Header Length" int "Max HTTP Request Header Length"
default 512 default 512
help help
This sets the maximum supported size of headers section in HTTP request packet to be processed by the server This sets the maximum supported size of headers section in HTTP request packet to be processed by the
server
config HTTPD_MAX_URI_LEN config HTTPD_MAX_URI_LEN
int "Max HTTP URI Length" int "Max HTTP URI Length"

View File

@@ -95,7 +95,8 @@ config FREERTOS_WATCHPOINT_END_OF_STACK
effectively only have one watchpoint; the 2nd one is overwritten as soon as a task switch happens. effectively only have one watchpoint; the 2nd one is overwritten as soon as a task switch happens.
This check only triggers if the stack overflow writes within 4 bytes of the end of the stack, rather than This check only triggers if the stack overflow writes within 4 bytes of the end of the stack, rather than
overshooting further, so it is worth combining this approach with one of the other stack overflow check methods. overshooting further, so it is worth combining this approach with one of the other stack overflow check
methods.
When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no JTAG OCD is attached, esp-idf When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no JTAG OCD is attached, esp-idf
will panic on an unhandled debug exception. will panic on an unhandled debug exception.
@@ -154,9 +155,9 @@ config FREERTOS_IDLE_TASK_STACKSIZE
range 768 32768 range 768 32768
default 1536 default 1536
help help
The idle task has its own stack, sized in bytes. The default size is enough for most uses. Size can be reduced The idle task has its own stack, sized in bytes. The default size is enough for most uses. Size can be
to 768 bytes if no (or simple) FreeRTOS idle hooks are used and pthread local storage or FreeRTOS local storage reduced to 768 bytes if no (or simple) FreeRTOS idle hooks are used and pthread local storage or FreeRTOS
cleanup callbacks are not used. local storage cleanup callbacks are not used.
The stack size may need to be increased above the default if the app installs idle or thread local storage The stack size may need to be increased above the default if the app installs idle or thread local storage
cleanup hooks that use a lot of stack memory. cleanup hooks that use a lot of stack memory.
@@ -212,12 +213,12 @@ config SUPPORT_STATIC_ALLOCATION
the application, and the preference of the application writer. Both methods have pros the application, and the preference of the application writer. Both methods have pros
and cons, and both methods can be used within the same RTOS application. and cons, and both methods can be used within the same RTOS application.
Creating RTOS objects using statically allocated RAM has the benefit of providing the Creating RTOS objects using statically allocated RAM has the benefit of providing the application writer
application writer with more control: RTOS objects can be placed at specific memory locations. with more control: RTOS objects can be placed at specific memory locations. The maximum RAM footprint can
The maximum RAM footprint can be determined at link time, rather than run time. be determined at link time, rather than run time. The application writer does not need to concern
The application writer does not need to concern themselves with graceful handling of memory allocation failures. themselves with graceful handling of memory allocation failures. It allows the RTOS to be used in
It allows the RTOS to be used in applications that simply don't allow any dynamic memory allocation applications that simply don't allow any dynamic memory allocation (although FreeRTOS includes allocation
(although FreeRTOS includes allocation schemes that can overcome most objections). schemes that can overcome most objections).
config ENABLE_STATIC_TASK_CLEAN_UP_HOOK config ENABLE_STATIC_TASK_CLEAN_UP_HOOK
bool "Enable static task clean up hook" bool "Enable static task clean up hook"

View File

@@ -23,8 +23,8 @@ config HEAP_TRACING
Enables the heap tracing API defined in esp_heap_trace.h. Enables the heap tracing API defined in esp_heap_trace.h.
This function causes a moderate increase in IRAM code side and a minor increase in heap function This function causes a moderate increase in IRAM code side and a minor increase in heap function
(malloc/free/realloc) CPU overhead, even when the tracing feature is not used. So it's best to keep it disabled (malloc/free/realloc) CPU overhead, even when the tracing feature is not used. So it's best to keep it
unless tracing is being used. disabled unless tracing is being used.
config HEAP_TRACING_STACK_DEPTH config HEAP_TRACING_STACK_DEPTH
int "Heap tracing stack depth" int "Heap tracing stack depth"

View File

@@ -164,9 +164,9 @@ config LWIP_DHCP_RESTORE_LAST_IP
bool "DHCP: Restore last IP obtained from DHCP server" bool "DHCP: Restore last IP obtained from DHCP server"
default n default n
help help
When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP server. When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP
Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still available, server. Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still
there is no need for sending discovery message to DHCP server and save some time. available, there is no need for sending discovery message to DHCP server and save some time.
menu "DHCP server" menu "DHCP server"

View File

@@ -97,6 +97,7 @@ config MQTT_CUSTOM_OUTBOX
bool "Enable custom outbox implementation" bool "Enable custom outbox implementation"
default n default n
help help
Set to true if a specific implementation of message outbox is needed (e.g. persistant outbox in NVM or similar). Set to true if a specific implementation of message outbox is needed (e.g. persistant outbox in NVM or
similar).
endmenu endmenu

View File

@@ -19,7 +19,8 @@ config OPENSSL_DEBUG_LEVEL
Only function whose debugging level is higher than "OPENSSL_DEBUG_LEVEL" works. Only function whose debugging level is higher than "OPENSSL_DEBUG_LEVEL" works.
For example: For example:
If OPENSSL_DEBUG_LEVEL = 2, you use function "SSL_DEBUG(1, "malloc failed")". Because 1 < 2, it will not print. If OPENSSL_DEBUG_LEVEL = 2, you use function "SSL_DEBUG(1, "malloc failed")". Because 1 < 2, it will not
print.
config OPENSSL_LOWLEVEL_DEBUG config OPENSSL_LOWLEVEL_DEBUG
bool "Enable OpenSSL low-level module debugging" bool "Enable OpenSSL low-level module debugging"
@@ -27,7 +28,8 @@ config OPENSSL_LOWLEVEL_DEBUG
depends on OPENSSL_DEBUG depends on OPENSSL_DEBUG
select MBEDTLS_DEBUG select MBEDTLS_DEBUG
help help
If the option is enabled, low-level module debugging function of OpenSSL is enabled, e.g. mbedtls internal debugging function. If the option is enabled, low-level module debugging function of OpenSSL is enabled, e.g. mbedtls internal
debugging function.
choice OPENSSL_ASSERT choice OPENSSL_ASSERT
prompt "Select OpenSSL assert function" prompt "Select OpenSSL assert function"

View File

@@ -45,8 +45,9 @@ config PARTITION_TABLE_OFFSET
This number should be a multiple of 0x1000. 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 Note that partition offsets in the partition table CSV file may need to be changed if this value is set to
each partition offset adapt to the configured partition table offset, leave all partition offsets blank in the CSV file. a higher value. To have each partition offset adapt to the configured partition table offset, leave all
partition offsets blank in the CSV file.
config PARTITION_TABLE_MD5 config PARTITION_TABLE_MD5
bool "Generate an MD5 checksum for the partition table" bool "Generate an MD5 checksum for the partition table"
@@ -58,5 +59,3 @@ config PARTITION_TABLE_MD5
table. table.
endmenu endmenu

View File

@@ -39,5 +39,4 @@ config I2S_DATA_PIN
help help
GPIO number to use for I2S Data Driver. GPIO number to use for I2S Data Driver.
endmenu endmenu

View File

@@ -39,5 +39,4 @@ config I2S_DATA_PIN
help help
GPIO number to use for I2S Data Driver. GPIO number to use for I2S Data Driver.
endmenu endmenu

View File

@@ -3,12 +3,12 @@ menu "Example 'GATT CLIENT THROUGHPUT' Config"
config GATTS_NOTIFY_THROUGHPUT config GATTS_NOTIFY_THROUGHPUT
bool "test the gatts notify throughput" bool "test the gatts notify throughput"
help help
If this config item is set, then the 'GATTC_WRITE_THROUGHPUT' config should be close, it can't test both write or notify at the same time at this demo If this config item is set, then the 'GATTC_WRITE_THROUGHPUT' config should be close, it can't test both
write or notify at the same time at this demo
config GATTC_WRITE_THROUGHPUT config GATTC_WRITE_THROUGHPUT
bool "test the gattc write throughput" bool "test the gattc write throughput"
help help
If this config item is set, then the 'GATTS_NOTIFY_THROUGHPUT' config should be close, it can't test both write or notify at the same time at this demo If this config item is set, then the 'GATTS_NOTIFY_THROUGHPUT' config should be close, it can't test both
write or notify at the same time at this demo
endmenu endmenu

View File

@@ -4,20 +4,24 @@ config SET_RAW_ADV_DATA
bool "Use raw data for advertising packets and scan response data" bool "Use raw data for advertising packets and scan response data"
help help
If this config item is set, raw binary data will be used to generate advertising & scan response data. If this config item is set, raw binary data will be used to generate advertising & scan response data.
This option uses the esp_ble_gap_config_adv_data_raw() and esp_ble_gap_config_scan_rsp_data_raw() functions. This option uses the esp_ble_gap_config_adv_data_raw() and esp_ble_gap_config_scan_rsp_data_raw()
functions.
If this config item is unset, advertising & scan response data is provided via a higher-level esp_ble_adv_data_t structure. If this config item is unset, advertising & scan response data is provided via a higher-level
The lower layer will generate the BLE packets. This option has higher overhead at runtime. esp_ble_adv_data_t structure. The lower layer will generate the BLE packets. This option has higher
overhead at runtime.
config GATTS_NOTIFY_THROUGHPUT config GATTS_NOTIFY_THROUGHPUT
bool "test the gatts notify throughput" bool "test the gatts notify throughput"
help help
If this config item is set, then the 'GATTC_WRITE_THROUGHPUT' config should be close, it can't test both write or notify at the same time at this demo If this config item is set, then the 'GATTC_WRITE_THROUGHPUT' config should be close, it can't test both
write or notify at the same time at this demo
config GATTC_WRITE_THROUGHPUT config GATTC_WRITE_THROUGHPUT
bool "test the gattc write throughput" bool "test the gattc write throughput"
help help
If this config item is set, then the 'GATTS_NOTIFY_THROUGHPUT' config should be close, it can't test both write or notify at the same time at this demo If this config item is set, then the 'GATTS_NOTIFY_THROUGHPUT' config should be close, it can't test both
write or notify at the same time at this demo
endmenu endmenu

View File

@@ -4,9 +4,11 @@ config SET_RAW_ADV_DATA
bool "Use raw data for advertising packets and scan response data" bool "Use raw data for advertising packets and scan response data"
help help
If this config item is set, raw binary data will be used to generate advertising & scan response data. If this config item is set, raw binary data will be used to generate advertising & scan response data.
This option uses the esp_ble_gap_config_adv_data_raw() and esp_ble_gap_config_scan_rsp_data_raw() functions. This option uses the esp_ble_gap_config_adv_data_raw() and esp_ble_gap_config_scan_rsp_data_raw()
functions.
If this config item is unset, advertising & scan response data is provided via a higher-level esp_ble_adv_data_t structure. If this config item is unset, advertising & scan response data is provided via a higher-level
The lower layer will generate the BLE packets. This option has higher overhead at runtime. esp_ble_adv_data_t structure. The lower layer will generate the BLE packets. This option has higher
overhead at runtime.
endmenu endmenu

View File

@@ -19,9 +19,10 @@ config EXAMPLE_PORT
Port number used by ASIO example Port number used by ASIO example
config EXAMPLE_SERVER_IP config EXAMPLE_SERVER_IP
string "asio example server ip for this client to connect to (leave defalut=FROM_STDIN to enter the server address via serial terminal)" string "asio example server ip"
default "FROM_STDIN" default "FROM_STDIN"
help help
Please set the host name or ip address of corespondant server running asio example server ip for this client to connect to (leave default=FROM_STDIN to enter the server address
via serial terminal).
endmenu endmenu

View File

@@ -22,7 +22,8 @@ config BROKER_CERTIFICATE_OVERRIDE
string "Broker certificate override" string "Broker certificate override"
default "" default ""
help help
Please leave empty if broker certificate included from a textfile; otherwise fill in a base64 part of PEM format certificate Please leave empty if broker certificate included from a textfile; otherwise fill in a base64 part of PEM
format certificate
config BROKER_CERTIFICATE_OVERRIDDEN config BROKER_CERTIFICATE_OVERRIDDEN
bool bool

View File

@@ -22,7 +22,8 @@ config BROKER_CERTIFICATE_OVERRIDE
string "Server certificate override" string "Server certificate override"
default "" default ""
help help
Please leave empty if server certificate included from a textfile; otherwise fill in a base64 part of PEM format certificate Please leave empty if server certificate included from a textfile; otherwise fill in a base64 part of PEM
format certificate
config BROKER_CERTIFICATE_OVERRIDDEN config BROKER_CERTIFICATE_OVERRIDDEN
bool bool

View File

@@ -53,7 +53,8 @@ config EXAMPLE_MULTICAST_IPV6_ADDR
help help
IPV6 multicast address. Example will both send to and listen to this address. IPV6 multicast address. Example will both send to and listen to this address.
The default FF02::FC address is a link-local multicast address. Consult IPV6 specifications or documentation for information about meaning of different IPV6 multicast ranges. The default FF02::FC address is a link-local multicast address. Consult IPV6 specifications or
documentation for information about meaning of different IPV6 multicast ranges.
config EXAMPLE_PORT config EXAMPLE_PORT
int "Multicast port (send & receive)" int "Multicast port (send & receive)"

View File

@@ -6,37 +6,37 @@ choice BASE_MAC_ADDRESS_STORAGE
help help
Select storage of the base MAC address which is used to generate MAC addresses of all network interfaces Select storage of the base MAC address which is used to generate MAC addresses of all network interfaces
when networking is initialized. when networking is initialized.
If "Default (Espressif factory) EFUSE BLK0" is selected, esp32 will use default base MAC address which is If "Default (Espressif factory) eFuse BLK0" is selected, esp32 will use default base MAC address which is
written into EFUSE block 0 words 1, 2 when the chip is manufactured. written into eFuse block 0 words 1, 2 when the chip is manufactured.
If "Custom EFUSE BLK3" is selected, ESP32 will use customer-defined base MAC address which is written into If "Custom eFuse BLK3" is selected, ESP32 will use customer-defined base MAC address which is written into
EFUSE Block 3 words 0, 1. Users must call esp_efuse_mac_get_custom to get base MAC address and eFuse Block 3 words 0, 1. Users must call esp_efuse_mac_get_custom to get base MAC address and
esp_base_mac_addr_set to set the base MAC address before network interfaces are initialised. esp_base_mac_addr_set to set the base MAC address before network interfaces are initialised.
If "Other external storage" is selected, esp32 will use customer-defined base MAC address from external If "Other external storage" is selected, esp32 will use customer-defined base MAC address from external
storage(flash, EEPROM, etc). Users must get the base MAC address first and call esp_base_mac_addr_set to storage(flash, EEPROM, etc). Users must get the base MAC address first and call esp_base_mac_addr_set to
set the base MAC address before network interfaces are initialised. set the base MAC address before network interfaces are initialised.
config BASE_MAC_STORED_EFUSE_BLK0 config BASE_MAC_STORED_EFUSE_BLK0
bool "Default (Espressif factory) EFUSE BLK0" bool "Default (Espressif factory) eFuse BLK0"
config BASE_MAC_STORED_EFUSE_BLK3 config BASE_MAC_STORED_EFUSE_BLK3
bool "Custom EFUSE BLK3" bool "Custom eFuse BLK3"
config BASE_MAC_STORED_OTHER_EXTERNAL_STORAGE config BASE_MAC_STORED_OTHER_EXTERNAL_STORAGE
bool "Other external storage" bool "Other external storage"
endchoice endchoice
choice BASE_MAC_STORED_EFUSE_BLK3_ERROR_BEHAVIOR choice BASE_MAC_STORED_EFUSE_BLK3_ERROR_BEHAVIOR
prompt "Read base MAC address from BLK3 of EFUSE error behavior" prompt "Read base MAC address from BLK3 of eFuse error behavior"
depends on BASE_MAC_STORED_EFUSE_BLK3 depends on BASE_MAC_STORED_EFUSE_BLK3
default BASE_MAC_STORED_EFUSE_BLK3_ERROR_USE_DEFAULT default BASE_MAC_STORED_EFUSE_BLK3_ERROR_USE_DEFAULT
help help
Select behavior when reading base MAC address from BLK3 of EFUSE error. Select behavior when reading base MAC address from BLK3 of eFuse error.
If "Abort" is selected, esp32 will abort. If "Abort" is selected, esp32 will abort.
If "Use base MAC address from BLK3 of EFUSE" is selected, esp32 will use the base MAC address which is If "Use base MAC address from BLK3 of eFuse" is selected, esp32 will use the base MAC address which is
written into EFUSE block 0 words 1, 2 when the chip is manufactured. written into eFuse block 0 words 1, 2 when the chip is manufactured.
config BASE_MAC_STORED_EFUSE_BLK3_ERROR_ABORT config BASE_MAC_STORED_EFUSE_BLK3_ERROR_ABORT
bool "Abort" bool "Abort"
config BASE_MAC_STORED_EFUSE_BLK3_ERROR_USE_DEFAULT config BASE_MAC_STORED_EFUSE_BLK3_ERROR_USE_DEFAULT
bool "Use base MAC address from BLK3 of EFUSE" bool "Use base MAC address from BLK3 of eFuse"
endchoice endchoice
endmenu endmenu

View File

@@ -34,116 +34,12 @@ OUTPUT_SUFFIX = '.new'
IGNORE_DIRS = ( IGNORE_DIRS = (
# Kconfigs from submodules need to be ignored: # Kconfigs from submodules need to be ignored:
os.path.join('components', 'mqtt', 'esp-mqtt'), os.path.join('components', 'mqtt', 'esp-mqtt'),
# Temporary (incompatibility) list:
os.path.join('components', 'app_update'),
os.path.join('components', 'aws_iot'),
os.path.join('components', 'bootloader'),
os.path.join('components', 'bt'),
os.path.join('components', 'driver'),
os.path.join('components', 'esp32'),
os.path.join('components', 'esp_adc_cal'),
os.path.join('components', 'esp_event'),
os.path.join('components', 'esp_http_client'),
os.path.join('components', 'esp_http_server'),
os.path.join('components', 'esptool_py'),
os.path.join('components', 'fatfs'),
os.path.join('components', 'freemodbus'),
os.path.join('components', 'freertos'),
os.path.join('components', 'heap'),
os.path.join('components', 'libsodium'),
os.path.join('components', 'log'),
os.path.join('components', 'lwip'),
os.path.join('components', 'mbedtls'),
os.path.join('components', 'mdns'),
os.path.join('components', 'mqtt'),
os.path.join('components', 'nvs_flash'),
os.path.join('components', 'openssl'),
os.path.join('components', 'partition_table'),
os.path.join('components', 'pthread'),
os.path.join('components', 'spi_flash'),
os.path.join('components', 'spiffs'),
os.path.join('components', 'tcpip_adapter'),
os.path.join('components', 'unity'),
os.path.join('components', 'vfs'),
os.path.join('components', 'wear_levelling'),
os.path.join('examples', 'bluetooth', 'a2dp_gatts_coex', 'main'),
os.path.join('examples', 'bluetooth', 'a2dp_sink', 'main'),
os.path.join('examples', 'bluetooth', 'ble_ibeacon', 'main'),
os.path.join('examples', 'bluetooth', 'ble_throughput', 'throughput_client', 'main'),
os.path.join('examples', 'bluetooth', 'ble_throughput', 'throughput_server', 'main'),
os.path.join('examples', 'bluetooth', 'gatt_server', 'main'),
os.path.join('examples', 'get-started', 'blink', 'main'),
os.path.join('examples', 'mesh', 'internal_communication', 'main'),
os.path.join('examples', 'mesh', 'manual_networking', 'main'),
os.path.join('examples', 'peripherals', 'adc2', 'main'),
os.path.join('examples', 'peripherals', 'i2c', 'i2c_self_test', 'main'),
os.path.join('examples', 'peripherals', 'i2c', 'i2c_tools', 'main'),
os.path.join('examples', 'peripherals', 'sdio', 'host', 'main'),
os.path.join('examples', 'peripherals', 'sdio', 'slave', 'main'),
os.path.join('examples', 'peripherals', 'spi_master', 'main'),
os.path.join('examples', 'peripherals', 'uart', 'nmea0183_parser', 'main'),
os.path.join('examples', 'protocols', 'asio', 'chat_client', 'main'),
os.path.join('examples', 'protocols', 'asio', 'chat_server', 'main'),
os.path.join('examples', 'protocols', 'asio', 'tcp_echo_server', 'main'),
os.path.join('examples', 'protocols', 'asio', 'udp_echo_server', 'main'),
os.path.join('examples', 'protocols', 'aws_iot', 'subscribe_publish', 'main'),
os.path.join('examples', 'protocols', 'aws_iot', 'thing_shadow', 'main'),
os.path.join('examples', 'protocols', 'coap_client', 'main'),
os.path.join('examples', 'protocols', 'coap_server', 'main'),
os.path.join('examples', 'protocols', 'esp_http_client', 'main'),
os.path.join('examples', 'protocols', 'http2_request', 'main'),
os.path.join('examples', 'protocols', 'http_request', 'main'),
os.path.join('examples', 'protocols', 'http_server', 'advanced_tests', 'main'),
os.path.join('examples', 'protocols', 'http_server', 'persistent_sockets', 'main'),
os.path.join('examples', 'protocols', 'http_server', 'simple', 'main'),
os.path.join('examples', 'protocols', 'https_mbedtls', 'main'),
os.path.join('examples', 'protocols', 'https_request', 'main'),
os.path.join('examples', 'protocols', 'https_server', 'main'),
os.path.join('examples', 'protocols', 'mdns', 'main'),
os.path.join('examples', 'protocols', 'modbus_slave', 'main'),
os.path.join('examples', 'protocols', 'mqtt', 'ssl', 'main'),
os.path.join('examples', 'protocols', 'mqtt', 'ssl_mutual_auth', 'main'),
os.path.join('examples', 'protocols', 'mqtt', 'tcp', 'main'),
os.path.join('examples', 'protocols', 'mqtt', 'ws', 'main'),
os.path.join('examples', 'protocols', 'mqtt', 'wss', 'main'),
os.path.join('examples', 'protocols', 'openssl_client', 'main'),
os.path.join('examples', 'protocols', 'openssl_server', 'main'),
os.path.join('examples', 'protocols', 'pppos_client', 'main'),
os.path.join('examples', 'protocols', 'sntp', 'main'),
os.path.join('examples', 'protocols', 'sockets', 'tcp_client', 'main'),
os.path.join('examples', 'protocols', 'sockets', 'tcp_server', 'main'),
os.path.join('examples', 'protocols', 'sockets', 'udp_client', 'main'),
os.path.join('examples', 'protocols', 'sockets', 'udp_multicast', 'main'),
os.path.join('examples', 'protocols', 'sockets', 'udp_server', 'main'),
os.path.join('examples', 'provisioning', 'ble_prov', 'main'),
os.path.join('examples', 'provisioning', 'console_prov', 'main'),
os.path.join('examples', 'provisioning', 'custom_config', 'main'),
os.path.join('examples', 'provisioning', 'softap_prov', 'main'),
os.path.join('examples', 'system', 'app_trace_to_host', 'main'),
os.path.join('examples', 'system', 'base_mac_address', 'main'),
os.path.join('examples', 'system', 'console', 'main'),
os.path.join('examples', 'system', 'deep_sleep', 'main'),
os.path.join('examples', 'system', 'gcov', 'main'),
os.path.join('examples', 'system', 'ota', 'native_ota_example', 'main'),
os.path.join('examples', 'system', 'ota', 'simple_ota_example', 'main'),
os.path.join('examples', 'system', 'sysview_tracing', 'main'),
os.path.join('examples', 'wifi', 'espnow', 'main'),
os.path.join('examples', 'wifi', 'getting_started', 'softAP', 'main'),
os.path.join('examples', 'wifi', 'getting_started', 'station', 'main'),
os.path.join('examples', 'wifi', 'power_save', 'main'),
os.path.join('examples', 'wifi', 'scan', 'main'),
os.path.join('examples', 'wifi', 'simple_sniffer', 'main'),
os.path.join('examples', 'wifi', 'wpa2_enterprise', 'main'),
os.path.join('examples', 'wifi', 'wps', 'main'),
os.path.join('tools', 'kconfig'),
os.path.join('tools', 'kconfig_new', 'test'),
os.path.join('tools', 'ldgen', 'test', 'data'),
os.path.join('tools', 'unit-test-app', 'components', 'test_utils'),
) )
SPACES_PER_INDENT = 4 SPACES_PER_INDENT = 4
CONFIG_NAME_MAX_LENGTH = 50 # TODO decrease the value (after the names have been refactored)
CONFIG_NAME_MAX_LENGTH = 60
# TODO increase prefix length (after the names have been refactored) # TODO increase prefix length (after the names have been refactored)
CONFIG_NAME_MIN_PREFIX_LENGTH = 0 CONFIG_NAME_MIN_PREFIX_LENGTH = 0
@@ -211,6 +107,9 @@ class IndentAndNameChecker(BaseChecker):
# stack common prefixes of configs # stack common prefixes of configs
self.prefix_stack = [] self.prefix_stack = []
# if the line ends with '\' then we force the indent of the next line
self.force_next_indent = 0
# menu items which increase the indentation of the next line # menu items which increase the indentation of the next line
self.re_increase_level = re.compile(r'''^\s* self.re_increase_level = re.compile(r'''^\s*
( (
@@ -287,6 +186,10 @@ class IndentAndNameChecker(BaseChecker):
# delete items ("config", "menuconfig", "help") until the appropriate parent # delete items ("config", "menuconfig", "help") until the appropriate parent
self.del_from_level_stack(i) self.del_from_level_stack(i)
break break
else:
# delete everything when configs are at top level without a parent menu, mainmenu...
self.del_from_level_stack(len(self.level_stack))
self.level_stack.append(new_item) self.level_stack.append(new_item)
if self.debug: if self.debug:
print(self.level_stack) print(self.level_stack)
@@ -321,8 +224,10 @@ class IndentAndNameChecker(BaseChecker):
raise InputError(self.path_in_idf, line_number, raise InputError(self.path_in_idf, line_number,
'{} is {} characters long and it should be {} at most' '{} is {} characters long and it should be {} at most'
''.format(name, name_length, CONFIG_NAME_MAX_LENGTH), ''.format(name, name_length, CONFIG_NAME_MAX_LENGTH),
line) # no suggested correction for this line + '\n') # no suggested correction for this
if self.prefix_stack[-1] is None: if len(self.prefix_stack) == 0:
self.prefix_stack.append(name)
elif self.prefix_stack[-1] is None:
self.prefix_stack[-1] = name self.prefix_stack[-1] = name
else: else:
# this has nothing common with paths but the algorithm can be used for this also # this has nothing common with paths but the algorithm can be used for this also
@@ -366,6 +271,7 @@ class IndentAndNameChecker(BaseChecker):
def process_line(self, line, line_number): def process_line(self, line, line_number):
stripped_line = line.strip() stripped_line = line.strip()
if len(stripped_line) == 0: if len(stripped_line) == 0:
self.force_next_indent = 0
return return
current_level = len(self.level_stack) current_level = len(self.level_stack)
m = re.search(r'\S', line) # indent found as the first non-space character m = re.search(r'\S', line) # indent found as the first non-space character
@@ -377,8 +283,26 @@ class IndentAndNameChecker(BaseChecker):
if current_level > 0 and self.level_stack[-1] == 'help': if current_level > 0 and self.level_stack[-1] == 'help':
if current_indent >= current_level * SPACES_PER_INDENT: if current_indent >= current_level * SPACES_PER_INDENT:
# this line belongs to 'help' # this line belongs to 'help'
self.force_next_indent = 0
return return
if self.force_next_indent > 0:
if current_indent != self.force_next_indent:
raise InputError(self.path_in_idf, line_number,
'Indentation consists of {} spaces instead of {}'.format(current_indent,
self.force_next_indent),
(' ' * self.force_next_indent) + line.lstrip())
else:
if not stripped_line.endswith('\\'):
self.force_next_indent = 0
return
else:
if stripped_line.endswith('\\') and stripped_line.startswith(('config', 'menuconfig', 'choice')):
raise InputError(self.path_in_idf, line_number,
'Line-wrap with backslash is not supported here',
line) # no suggestion for this
self.check_name_and_update_prefix(stripped_line, line_number) self.check_name_and_update_prefix(stripped_line, line_number)
m = self.re_increase_level.search(line) m = self.re_increase_level.search(line)
@@ -395,6 +319,12 @@ class IndentAndNameChecker(BaseChecker):
self.check_common_prefix(line, line_number) self.check_common_prefix(line, line_number)
expected_indent = current_level * SPACES_PER_INDENT expected_indent = current_level * SPACES_PER_INDENT
if stripped_line.endswith('\\'):
self.force_next_indent = expected_indent + SPACES_PER_INDENT
else:
self.force_next_indent = 0
if current_indent != expected_indent: if current_indent != expected_indent:
raise InputError(self.path_in_idf, line_number, raise InputError(self.path_in_idf, line_number,
'Indentation consists of {} spaces instead of {}'.format(current_indent, expected_indent), 'Indentation consists of {} spaces instead of {}'.format(current_indent, expected_indent),

View File

@@ -94,6 +94,8 @@ def format_rest_text(text, indent):
# Escape some characters which are inline formatting in ReST # Escape some characters which are inline formatting in ReST
text = text.replace("*", "\\*") text = text.replace("*", "\\*")
text = text.replace("_", "\\_") text = text.replace("_", "\\_")
# replace absolute links to documentation by relative ones
text = re.sub(r'https://docs.espressif.com/projects/esp-idf/\w+/\w+/(.+)\.html', r':doc:`../\1`', text)
text += '\n' text += '\n'
return text return text

View File

@@ -18,6 +18,7 @@ import unittest
from check_kconfigs import LineRuleChecker from check_kconfigs import LineRuleChecker
from check_kconfigs import InputError from check_kconfigs import InputError
from check_kconfigs import IndentAndNameChecker from check_kconfigs import IndentAndNameChecker
from check_kconfigs import CONFIG_NAME_MAX_LENGTH
class ApplyLine(object): class ApplyLine(object):
@@ -113,6 +114,7 @@ class TestIndent(TestIndentAndNameChecker):
self.expt_success(' menuconfig keyword in the help') self.expt_success(' menuconfig keyword in the help')
self.expt_success(' endmenu keyword in the help') self.expt_success(' endmenu keyword in the help')
self.expt_success(' endmenu keyword in the help') self.expt_success(' endmenu keyword in the help')
self.expt_success('') # newline in help
self.expt_success(' endmenu keyword in the help') self.expt_success(' endmenu keyword in the help')
self.expect_error(' menu "real menu with wrong indent"', self.expect_error(' menu "real menu with wrong indent"',
expect=' menu "real menu with wrong indent"', cleanup=' endmenu') expect=' menu "real menu with wrong indent"', cleanup=' endmenu')
@@ -142,6 +144,24 @@ class TestIndent(TestIndentAndNameChecker):
self.expt_success(' config') self.expt_success(' config')
self.expt_success('endmenu') self.expt_success('endmenu')
def test_config_without_menu(self):
self.expt_success('menuconfig')
self.expt_success(' help')
self.expt_success(' text')
self.expt_success('')
self.expt_success(' text')
self.expt_success('config')
self.expt_success(' help')
def test_backslashes(self):
self.expt_success('default \\')
self.expect_error('help', expect=None)
self.expt_success(' CONFIG')
self.expt_success('default \\')
self.expt_success(' LINE1\\')
self.expt_success(' LINE2')
self.expt_success('help')
class TestName(TestIndentAndNameChecker): class TestName(TestIndentAndNameChecker):
def setUp(self): def setUp(self):
@@ -149,16 +169,23 @@ class TestName(TestIndentAndNameChecker):
self.checker.min_prefix_length = 0 # prefixes are ignored in this test case self.checker.min_prefix_length = 0 # prefixes are ignored in this test case
def test_name_length(self): def test_name_length(self):
max_length = CONFIG_NAME_MAX_LENGTH
too_long = max_length + 1
self.expt_success('menu "test"') self.expt_success('menu "test"')
self.expt_success(' config ABC') self.expt_success(' config ABC')
self.expt_success(' config ' + ('X' * 50)) self.expt_success(' config ' + ('X' * max_length))
self.expect_error(' config ' + ('X' * 51), expect=None) self.expect_error(' config ' + ('X' * too_long), expect=None)
self.expt_success(' menuconfig ' + ('X' * 50)) self.expt_success(' menuconfig ' + ('X' * max_length))
self.expect_error(' menuconfig ' + ('X' * 51), expect=None) self.expect_error(' menuconfig ' + ('X' * too_long), expect=None)
self.expt_success(' choice ' + ('X' * 50)) self.expt_success(' choice ' + ('X' * max_length))
self.expect_error(' choice ' + ('X' * 51), expect=None) self.expect_error(' choice ' + ('X' * too_long), expect=None)
self.expt_success('endmenu') self.expt_success('endmenu')
def test_config_backslash(self):
self.expect_error('config\\', expect=None)
self.expect_error('menuconfig\\', expect=None)
self.expect_error('choice\\', expect=None)
class TestPrefix(TestIndentAndNameChecker): class TestPrefix(TestIndentAndNameChecker):
def test_prefix_len(self): def test_prefix_len(self):