mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
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:
@@ -4,10 +4,9 @@ config APP_COMPILE_TIME_DATE
|
||||
bool "Use time/date stamp for app"
|
||||
default y
|
||||
help
|
||||
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.
|
||||
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.
|
||||
|
||||
config APP_EXCLUDE_PROJECT_VER_VAR
|
||||
bool "Exclude PROJECT_VER from firmware image"
|
||||
|
@@ -95,7 +95,8 @@ config AWS_IOT_OVERRIDE_THING_SHADOW_RX_BUFFER
|
||||
size. This is the maximum size of a Thing Shadow
|
||||
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
|
||||
int "Maximum RX Buffer (bytes)"
|
||||
@@ -122,7 +123,8 @@ config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_ACKS
|
||||
default 10
|
||||
range 1 100
|
||||
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
|
||||
int "Maximum simultaneous Thing Name operations"
|
||||
@@ -130,14 +132,16 @@ config AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES
|
||||
default 10
|
||||
range 1 100
|
||||
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
|
||||
int "Maximum expected JSON tokens"
|
||||
depends on AWS_IOT_SDK
|
||||
default 120
|
||||
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
|
||||
int "Maximum topic length (not including Thing Name)"
|
||||
@@ -145,7 +149,9 @@ config AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME
|
||||
default 60
|
||||
range 10 1000
|
||||
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
|
||||
int "Maximum Thing Name length"
|
||||
@@ -156,4 +162,3 @@ config AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME
|
||||
Maximum length of a Thing Name.
|
||||
|
||||
endmenu # Thing Shadow
|
||||
|
||||
|
@@ -29,17 +29,17 @@ config LOG_BOOTLOADER_LEVEL
|
||||
default 5 if LOG_BOOTLOADER_LEVEL_VERBOSE
|
||||
|
||||
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
|
||||
default 7
|
||||
depends on FLASHMODE_QIO || FLASHMODE_QOUT
|
||||
help
|
||||
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
|
||||
pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in Efuse. That pin number is compiled into the bootloader
|
||||
instead.
|
||||
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 instead.
|
||||
|
||||
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"
|
||||
default BOOTLOADER_VDDSDIO_BOOST_1_9V
|
||||
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
|
||||
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.
|
||||
VDDSDIO regulator is disabled via eFuse.
|
||||
|
||||
config BOOTLOADER_VDDSDIO_BOOST_1_8V
|
||||
bool "1.8V"
|
||||
@@ -86,7 +86,8 @@ config BOOTLOADER_OTA_DATA_ERASE
|
||||
bool "Clear OTA data on factory reset (select factory partition)"
|
||||
depends on BOOTLOADER_FACTORY_RESET
|
||||
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
|
||||
string "Comma-separated names of partitions to clear on factory reset"
|
||||
@@ -95,7 +96,8 @@ config BOOTLOADER_DATA_FACTORY_RESET
|
||||
help
|
||||
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.
|
||||
Partitions of type "app" cannot be specified here.
|
||||
|
||||
@@ -134,8 +136,10 @@ config BOOTLOADER_WDT_ENABLE
|
||||
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.
|
||||
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 ESP32_RTC_CLOCK_SOURCE (INTERNAL_RC or EXTERNAL_CRYSTAL).
|
||||
|
||||
config BOOTLOADER_WDT_DISABLE_IN_USER_CODE
|
||||
@@ -164,11 +168,10 @@ config APP_ROLLBACK_ENABLE
|
||||
default n
|
||||
help
|
||||
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.
|
||||
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.
|
||||
|
||||
endmenu # Bootloader
|
||||
@@ -201,17 +204,22 @@ config SECURE_SIGNED_APPS_NO_SECURE_BOOT
|
||||
help
|
||||
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
|
||||
bool "Bootloader verifies app signatures"
|
||||
default n
|
||||
depends on SECURE_SIGNED_APPS_NO_SECURE_BOOT
|
||||
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 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
|
||||
bool "Verify app signature on update"
|
||||
@@ -220,11 +228,12 @@ config SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
|
||||
help
|
||||
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.
|
||||
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.
|
||||
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
|
||||
bool "Enable hardware secure boot in bootloader (READ DOCS FIRST)"
|
||||
@@ -232,7 +241,9 @@ config SECURE_BOOT_ENABLED
|
||||
help
|
||||
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.
|
||||
|
||||
@@ -246,7 +257,9 @@ choice SECURE_BOOTLOADER_MODE
|
||||
config SECURE_BOOTLOADER_ONE_TIME_FLASH
|
||||
bool "One-time flash"
|
||||
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.
|
||||
|
||||
@@ -255,9 +268,11 @@ config SECURE_BOOTLOADER_REFLASHABLE
|
||||
help
|
||||
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
|
||||
|
||||
@@ -268,9 +283,11 @@ config SECURE_BOOT_BUILD_SIGNED_BINARIES
|
||||
help
|
||||
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
|
||||
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:
|
||||
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
|
||||
string "Secure boot public signature verification key"
|
||||
depends on SECURE_SIGNED_APPS && !SECURE_BOOT_BUILD_SIGNED_BINARIES
|
||||
default signature_verification_key.bin
|
||||
help
|
||||
Path to a public key file used to verify signed images. This key is compiled into the bootloader and/or app,
|
||||
to verify app images.
|
||||
Path to a public key file used to verify signed images. This key is compiled into the bootloader and/or
|
||||
app, to verify app images.
|
||||
|
||||
Key file is in raw binary format, and can be extracted from a
|
||||
PEM formatted private key using the espsecure.py
|
||||
@@ -308,12 +325,14 @@ choice SECURE_BOOTLOADER_KEY_ENCODING
|
||||
default SECURE_BOOTLOADER_NO_ENCODING
|
||||
help
|
||||
|
||||
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.
|
||||
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.
|
||||
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
|
||||
bool "No encoding (256 bit key)"
|
||||
@@ -328,7 +347,8 @@ config SECURE_BOOT_INSECURE
|
||||
depends on SECURE_BOOT_ENABLED
|
||||
default N
|
||||
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.
|
||||
|
||||
@@ -350,11 +370,13 @@ config FLASH_ENCRYPTION_INSECURE
|
||||
depends on FLASH_ENCRYPTION_ENABLED
|
||||
default N
|
||||
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.
|
||||
|
||||
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"
|
||||
visible if FLASH_ENCRYPTION_INSECURE || SECURE_BOOT_INSECURE
|
||||
@@ -374,9 +396,9 @@ config SECURE_BOOT_ALLOW_ROM_BASIC
|
||||
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.
|
||||
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.
|
||||
|
||||
config SECURE_BOOT_ALLOW_JTAG
|
||||
@@ -384,9 +406,11 @@ config SECURE_BOOT_ALLOW_JTAG
|
||||
depends on SECURE_BOOT_INSECURE || FLASH_ENCRYPTION_INSECURE
|
||||
default N
|
||||
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.
|
||||
|
||||
@@ -394,16 +418,23 @@ config SECURE_BOOT_ALLOW_SHORT_APP_PARTITION
|
||||
bool "Allow app partition length not 64KB aligned"
|
||||
depends on SECURE_BOOT_INSECURE
|
||||
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
|
||||
bool "Leave UART bootloader encryption enabled"
|
||||
depends on FLASH_ENCRYPTION_INSECURE
|
||||
default N
|
||||
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.
|
||||
|
||||
@@ -412,30 +443,32 @@ config FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_DECRYPT
|
||||
depends on FLASH_ENCRYPTION_INSECURE
|
||||
default N
|
||||
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
|
||||
bool "Leave UART bootloader flash cache enabled"
|
||||
depends on FLASH_ENCRYPTION_INSECURE
|
||||
default N
|
||||
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.
|
||||
|
||||
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
|
||||
default N
|
||||
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.
|
||||
|
||||
This option is for testing purposes only - it completely disables secure boot protection.
|
||||
|
||||
|
||||
endmenu # Potentially Insecure
|
||||
endmenu # Security features
|
||||
|
@@ -60,12 +60,14 @@ config BTDM_CONTROLLER_BLE_MAX_CONN_EFF
|
||||
|
||||
config BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF
|
||||
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
|
||||
|
||||
config BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF
|
||||
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
|
||||
|
||||
choice BTDM_CONTROLLER_PINNED_TO_CORE_CHOICE
|
||||
@@ -146,13 +148,15 @@ choice BTDM_MODEM_SLEEP_MODE
|
||||
config BTDM_MODEM_SLEEP_MODE_ORIG
|
||||
bool "ORIG Mode(sleep with low power clock)"
|
||||
help
|
||||
ORIG mode is a bluetooth sleep mode that can be used for dual mode controller. In this mode, bluetooth controller
|
||||
sleeps between BR/EDR frames and BLE events. A low power clock is used to maintain bluetooth reference clock.
|
||||
ORIG mode is a bluetooth sleep mode that can be used for dual mode controller. In this mode,
|
||||
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
|
||||
bool "EVED Mode(For internal test only)"
|
||||
help
|
||||
EVED mode is for BLE only and is only for internal test. Do not use it for production. this mode is not compatible
|
||||
with DFS nor light sleep
|
||||
EVED mode is for BLE only and is only for internal test. Do not use it for production. this
|
||||
mode is not compatible with DFS nor light sleep
|
||||
endchoice
|
||||
|
||||
choice BTDM_LOW_POWER_CLOCK
|
||||
@@ -164,9 +168,11 @@ choice BTDM_LOW_POWER_CLOCK
|
||||
config BTDM_LPCLK_SEL_MAIN_XTAL
|
||||
bool "Main crystal"
|
||||
help
|
||||
Main crystal can be used as low power clock for bluetooth modem sleep. If this option is selected, bluetooth
|
||||
modem sleep can work under Dynamic Frequency Scaling(DFS) enabled, but cannot work when light sleep is enabled.
|
||||
Main crystal has a relatively better performance than other bluetooth low power clock sources.
|
||||
Main crystal can be used as low power clock for bluetooth modem sleep. If this option is
|
||||
selected, bluetooth modem sleep can work under Dynamic Frequency Scaling(DFS) enabled, but
|
||||
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
|
||||
bool "External 32kHz crystal"
|
||||
depends on ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL
|
||||
@@ -186,29 +192,31 @@ choice SCAN_DUPLICATE_TYPE
|
||||
default SCAN_DUPLICATE_BY_DEVICE_ADDR
|
||||
depends on BLE_SCAN_DUPLICATE
|
||||
help
|
||||
Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use advertiser address
|
||||
filtering. The adv packet of the same address is only allowed to be reported once. Another way is "Scan Duplicate
|
||||
By Device Address And Advertising Data". This way is to use advertising data and device address filtering. All
|
||||
different adv packets with the same address are allowed to be reported. The last way is "Scan Duplicate By Advertising
|
||||
Data". This way is to use advertising data filtering. All same advertising data only allow to be reported once even though
|
||||
they are from different devices.
|
||||
Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use
|
||||
advertiser address filtering. The adv packet of the same address is only allowed to be reported once.
|
||||
Another way is "Scan Duplicate By Device Address And Advertising Data". This way is to use advertising
|
||||
data and device address filtering. All different adv packets with the same address are allowed to be
|
||||
reported. The last way is "Scan Duplicate By Advertising Data". This way is to use advertising data
|
||||
filtering. All same advertising data only allow to be reported once even though they are from
|
||||
different devices.
|
||||
|
||||
config SCAN_DUPLICATE_BY_DEVICE_ADDR
|
||||
bool "Scan Duplicate By Device Address"
|
||||
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
|
||||
bool "Scan Duplicate By Advertising Data"
|
||||
help
|
||||
This way is to use advertising data filtering. All same advertising data only allow to be reported once even though
|
||||
they are from different devices.
|
||||
This way is to use advertising data filtering. All same advertising data only allow to be reported
|
||||
once even though they are from different devices.
|
||||
|
||||
config SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR
|
||||
bool "Scan Duplicate By Device Address And Advertising Data"
|
||||
help
|
||||
This way is to use advertising data and device address filtering. All different adv packets with the same address are
|
||||
allowed to be reported.
|
||||
This way is to use advertising data and device address filtering. All different adv packets with
|
||||
the same address are allowed to be reported.
|
||||
endchoice
|
||||
|
||||
config SCAN_DUPLICATE_TYPE
|
||||
@@ -1197,9 +1205,9 @@ config BLE_HOST_QUEUE_CONGESTION_CHECK
|
||||
depends on BLUEDROID_ENABLED
|
||||
default n
|
||||
help
|
||||
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.
|
||||
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.
|
||||
|
||||
config SMP_ENABLE
|
||||
bool
|
||||
|
@@ -14,7 +14,8 @@ config ADC2_DISABLE_DAC
|
||||
bool "Disable DAC when ADC2 is used on GPIO 25 and 26"
|
||||
default y
|
||||
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.
|
||||
|
||||
|
@@ -104,10 +104,11 @@ choice SPIRAM_SPEED
|
||||
2. Flash SPI running at 80Mhz and RAM SPI running at 40Mhz
|
||||
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
|
||||
be occupied by the system. Which SPI host to use can be selected by the config item SPIRAM_OCCUPY_SPI_HOST.
|
||||
Application code should never touch HSPI/VSPI hardware in this case. The option to select
|
||||
80MHz will only be visible if the flash SPI speed is also 80MHz. (ESPTOOLPY_FLASHFREQ_80M is true)
|
||||
Note: If the third mode(80Mhz+80Mhz) is enabled for SPI RAM of type 32MBit, one of the HSPI/VSPI host
|
||||
will be occupied by the system. Which SPI host to use can be selected by the config item
|
||||
SPIRAM_OCCUPY_SPI_HOST. Application code should never touch HSPI/VSPI hardware in this case. The
|
||||
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
|
||||
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
|
||||
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
|
||||
with the workaround and located in flash instead.
|
||||
This will also not use any bits of newlib that are located in ROM, opting for a version that is
|
||||
compiled with the workaround and located in flash instead.
|
||||
|
||||
config SPIRAM_BANKSWITCH_ENABLE
|
||||
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
|
||||
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
|
||||
#below that mark to work. We cannot at this moment guarantee this to exist when himem is enabled.
|
||||
#Note that this is limited to 62 banks, as esp_spiram_writeback_cache needs some kind of mapping of
|
||||
#some banks below that mark to work. We cannot at this moment guarantee this to exist when himem is
|
||||
#enabled.
|
||||
config SPIRAM_BANKSWITCH_RESERVE
|
||||
int "Amount of 32K pages to reserve for bank switching"
|
||||
depends on SPIRAM_BANKSWITCH_ENABLE
|
||||
@@ -166,17 +168,19 @@ config SPIRAM_MALLOC_ALWAYSINTERNAL
|
||||
default 16384
|
||||
range 0 131072
|
||||
help
|
||||
If malloc() is capable of also allocating SPI-connected ram, its allocation strategy will prefer to allocate chunks less
|
||||
than this size in internal memory, while allocations larger than this will be done from external RAM.
|
||||
If allocation from the preferred region fails, an attempt is made to allocate from the non-preferred
|
||||
region instead, so malloc() will not suddenly fail when either internal or external memory is full.
|
||||
If malloc() is capable of also allocating SPI-connected ram, its allocation strategy will prefer to
|
||||
allocate chunks less than this size in internal memory, while allocations larger than this will be
|
||||
done from external RAM. If allocation from the preferred region fails, an attempt is made to allocate
|
||||
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
|
||||
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
|
||||
default "n"
|
||||
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
|
||||
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
|
||||
depends on SPIRAM_USE_MALLOC
|
||||
help
|
||||
Because some bits of the ESP32 code environment cannot be recompiled with the cache workaround, normally
|
||||
tasks cannot be safely run with their stack residing in external memory; for this reason xTaskCreate and
|
||||
friends always allocate stack in internal memory and xTaskCreateStatic will check if the memory passed
|
||||
to it is in internal memory. If you have a task that needs a large amount of stack and does not call on
|
||||
ROM code in any way (no direct calls, but also no Bluetooth/WiFi), you can try to disable this and use
|
||||
xTaskCreateStatic to create the tasks stack in external memory.
|
||||
Because some bits of the ESP32 code environment cannot be recompiled with the cache workaround,
|
||||
normally tasks cannot be safely run with their stack residing in external memory; for this reason
|
||||
xTaskCreate and friends always allocate stack in internal memory and xTaskCreateStatic will check if
|
||||
the memory passed to it is in internal memory. If you have a task that needs a large amount of stack
|
||||
and does not call on ROM code in any way (no direct calls, but also no Bluetooth/WiFi), you can try to
|
||||
disable this and use xTaskCreateStatic to create the tasks stack in external memory.
|
||||
|
||||
config SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
|
||||
bool "Allow .bss segment placed in external memory"
|
||||
default n
|
||||
depends on SPIRAM_SUPPORT
|
||||
help
|
||||
If enabled the option,and add EXT_RAM_ATTR defined your variable,then your variable will be placed
|
||||
in PSRAM instead of internal memory, and placed most of variables of lwip,net802.11,pp,bluedroid library
|
||||
If enabled the option,and add EXT_RAM_ATTR defined your variable,then your variable will be placed in
|
||||
PSRAM instead of internal memory, and placed most of variables of lwip,net802.11,pp,bluedroid library
|
||||
to external memory defaultly.
|
||||
|
||||
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
|
||||
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
|
||||
#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"
|
||||
default y
|
||||
help
|
||||
@@ -802,7 +806,8 @@ config ESP32_RTC_CLK_CAL_CYCLES
|
||||
int "Number of cycles for RTC_SLOW_CLK calibration"
|
||||
default 3000 if ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL
|
||||
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
|
||||
help
|
||||
When the startup code initializes RTC_SLOW_CLK, it can perform
|
||||
@@ -890,7 +895,7 @@ config DISABLE_BASIC_ROM_CONSOLE
|
||||
default n
|
||||
help
|
||||
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
|
||||
read from the flash.
|
||||
@@ -972,8 +977,10 @@ choice SW_COEXIST_PREFERENCE
|
||||
help
|
||||
Choose Bluetooth/WiFi/Balance for different preference.
|
||||
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 Balance, the performance of WiFi and bluetooth will be balance. It's default. Normally, just choose balance, the A2DP audio can play fluently, too.
|
||||
If choose Bluetooth, it will make Bluetooth performance better. Such, keep Bluetooth(A2DP) Audio more
|
||||
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.
|
||||
|
||||
config SW_COEXIST_PREFERENCE_WIFI
|
||||
@@ -1149,19 +1156,22 @@ config ESP32_WIFI_SOFTAP_BEACON_MAX_LEN
|
||||
range 752 1256
|
||||
default 752
|
||||
help
|
||||
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the default
|
||||
length of a beacon frame can simultaneously hold only five root node identifier structures, meaning that a root node
|
||||
conflict of up to five nodes can be detected at one time. In the occurence of more root nodes conflict involving more
|
||||
than five root nodes, the conflict resolution process will detect five of the root nodes, resolve the conflict, and
|
||||
re-detect more root nodes. This process will repeat until all root node conflicts are resolved. However this process
|
||||
can generally take a very long time.
|
||||
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the
|
||||
default length of a beacon frame can simultaneously hold only five root node identifier structures,
|
||||
meaning that a root node conflict of up to five nodes can be detected at one time. In the occurence of
|
||||
more root nodes conflict involving more than five root nodes, the conflict resolution process will detect
|
||||
five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will repeat
|
||||
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.
|
||||
Each additional root node will require 36 bytes and should be added ontop of the 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
|
||||
To counter this situation, the beacon frame length can be increased such that more root nodes can be
|
||||
detected simultaneously. Each additional root node will require 36 bytes and should be added ontop of the
|
||||
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).
|
||||
|
||||
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
|
||||
bool "Enable WiFi debug log"
|
||||
@@ -1188,9 +1198,9 @@ choice ESP32_WIFI_DEBUG_LOG_MODULE
|
||||
prompt "WiFi debug log module"
|
||||
default ESP32_WIFI_DEBUG_LOG_MODULE_WIFI
|
||||
help
|
||||
The WiFi log module contains three parts: WIFI,COEX,MESH.
|
||||
The WIFI module indicates the logs related to WiFi, the COEX module indicates the logs related to WiFi and BT(or BLE) coexist,
|
||||
the MESH module indicates the logs related to Mesh. When ESP32_WIFI_LOG_MODULE_ALL is enabled, all modules are selected.
|
||||
The WiFi log module contains three parts: WIFI,COEX,MESH. The WIFI module indicates the logs related to
|
||||
WiFi, the COEX module indicates the logs related to WiFi and BT(or BLE) coexist, the MESH module indicates
|
||||
the logs related to Mesh. When ESP32_WIFI_LOG_MODULE_ALL is enabled, all modules are selected.
|
||||
|
||||
config ESP32_WIFI_DEBUG_LOG_MODULE_ALL
|
||||
bool "WiFi Debug Log Module All"
|
||||
@@ -1209,7 +1219,8 @@ config ESP32_WIFI_DEBUG_LOG_SUBMODULE
|
||||
help
|
||||
Enable this option to set the WiFi debug log submodule.
|
||||
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.
|
||||
|
||||
config ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL
|
||||
|
@@ -4,8 +4,8 @@ config EVENT_LOOP_PROFILING
|
||||
bool "Enable event loop profiling"
|
||||
default n
|
||||
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
|
||||
callbacks involved, number of events dropped to to a full event loop queue, run time of event handlers, and number of times/run
|
||||
time of each event handler.
|
||||
Enables collections of statistics in the event loop library such as the number of events posted
|
||||
to/recieved by an event loop, number of callbacks involved, number of events dropped to to a full event
|
||||
loop queue, run time of event handlers, and number of times/run time of each event handler.
|
||||
|
||||
endmenu
|
@@ -4,7 +4,8 @@ config HTTPD_MAX_REQ_HDR_LEN
|
||||
int "Max HTTP Request Header Length"
|
||||
default 512
|
||||
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
|
||||
int "Max HTTP URI Length"
|
||||
|
@@ -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.
|
||||
|
||||
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
|
||||
will panic on an unhandled debug exception.
|
||||
@@ -154,9 +155,9 @@ config FREERTOS_IDLE_TASK_STACKSIZE
|
||||
range 768 32768
|
||||
default 1536
|
||||
help
|
||||
The idle task has its own stack, sized in bytes. The default size is enough for most uses. Size can be reduced
|
||||
to 768 bytes if no (or simple) FreeRTOS idle hooks are used and pthread local storage or FreeRTOS local storage
|
||||
cleanup callbacks are not used.
|
||||
The idle task has its own stack, sized in bytes. The default size is enough for most uses. Size can be
|
||||
reduced to 768 bytes if no (or simple) FreeRTOS idle hooks are used and pthread local storage or FreeRTOS
|
||||
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
|
||||
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
|
||||
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
|
||||
application writer with more control: RTOS objects can be placed at specific memory locations.
|
||||
The maximum RAM footprint can be determined at link time, rather than run time.
|
||||
The application writer does not need to concern themselves with graceful handling of memory allocation failures.
|
||||
It allows the RTOS to be used in applications that simply don't allow any dynamic memory allocation
|
||||
(although FreeRTOS includes allocation schemes that can overcome most objections).
|
||||
Creating RTOS objects using statically allocated RAM has the benefit of providing the application writer
|
||||
with more control: RTOS objects can be placed at specific memory locations. The maximum RAM footprint can
|
||||
be determined at link time, rather than run time. The application writer does not need to concern
|
||||
themselves with graceful handling of memory allocation failures. It allows the RTOS to be used in
|
||||
applications that simply don't allow any dynamic memory allocation (although FreeRTOS includes allocation
|
||||
schemes that can overcome most objections).
|
||||
|
||||
config ENABLE_STATIC_TASK_CLEAN_UP_HOOK
|
||||
bool "Enable static task clean up hook"
|
||||
|
@@ -23,8 +23,8 @@ config HEAP_TRACING
|
||||
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
|
||||
(malloc/free/realloc) CPU overhead, even when the tracing feature is not used. So it's best to keep it disabled
|
||||
unless tracing is being used.
|
||||
(malloc/free/realloc) CPU overhead, even when the tracing feature is not used. So it's best to keep it
|
||||
disabled unless tracing is being used.
|
||||
|
||||
config HEAP_TRACING_STACK_DEPTH
|
||||
int "Heap tracing stack depth"
|
||||
|
@@ -164,9 +164,9 @@ config LWIP_DHCP_RESTORE_LAST_IP
|
||||
bool "DHCP: Restore last IP obtained from DHCP server"
|
||||
default n
|
||||
help
|
||||
When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP server.
|
||||
Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still available,
|
||||
there is no need for sending discovery message to DHCP server and save some time.
|
||||
When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP
|
||||
server. Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still
|
||||
available, there is no need for sending discovery message to DHCP server and save some time.
|
||||
|
||||
menu "DHCP server"
|
||||
|
||||
|
@@ -97,6 +97,7 @@ config MQTT_CUSTOM_OUTBOX
|
||||
bool "Enable custom outbox implementation"
|
||||
default n
|
||||
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
|
||||
|
@@ -19,7 +19,8 @@ config OPENSSL_DEBUG_LEVEL
|
||||
Only function whose debugging level is higher than "OPENSSL_DEBUG_LEVEL" works.
|
||||
|
||||
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
|
||||
bool "Enable OpenSSL low-level module debugging"
|
||||
@@ -27,7 +28,8 @@ config OPENSSL_LOWLEVEL_DEBUG
|
||||
depends on OPENSSL_DEBUG
|
||||
select MBEDTLS_DEBUG
|
||||
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
|
||||
prompt "Select OpenSSL assert function"
|
||||
|
@@ -45,8 +45,9 @@ config PARTITION_TABLE_OFFSET
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
config PARTITION_TABLE_MD5
|
||||
bool "Generate an MD5 checksum for the partition table"
|
||||
@@ -58,5 +59,3 @@ config PARTITION_TABLE_MD5
|
||||
table.
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
|
@@ -39,5 +39,4 @@ config I2S_DATA_PIN
|
||||
help
|
||||
GPIO number to use for I2S Data Driver.
|
||||
|
||||
|
||||
endmenu
|
||||
|
@@ -39,5 +39,4 @@ config I2S_DATA_PIN
|
||||
help
|
||||
GPIO number to use for I2S Data Driver.
|
||||
|
||||
|
||||
endmenu
|
||||
|
@@ -3,12 +3,12 @@ menu "Example 'GATT CLIENT THROUGHPUT' Config"
|
||||
config GATTS_NOTIFY_THROUGHPUT
|
||||
bool "test the gatts notify throughput"
|
||||
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
|
||||
bool "test the gattc write throughput"
|
||||
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
|
||||
|
||||
|
||||
|
@@ -4,20 +4,24 @@ config SET_RAW_ADV_DATA
|
||||
bool "Use raw data for advertising packets and scan response data"
|
||||
help
|
||||
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.
|
||||
The lower layer will generate the BLE packets. This option has higher overhead at runtime.
|
||||
If this config item is unset, advertising & scan response data is provided via a higher-level
|
||||
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
|
||||
bool "test the gatts notify throughput"
|
||||
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
|
||||
bool "test the gattc write throughput"
|
||||
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
|
||||
|
||||
|
||||
|
@@ -4,9 +4,11 @@ config SET_RAW_ADV_DATA
|
||||
bool "Use raw data for advertising packets and scan response data"
|
||||
help
|
||||
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.
|
||||
The lower layer will generate the BLE packets. This option has higher overhead at runtime.
|
||||
If this config item is unset, advertising & scan response data is provided via a higher-level
|
||||
esp_ble_adv_data_t structure. The lower layer will generate the BLE packets. This option has higher
|
||||
overhead at runtime.
|
||||
|
||||
endmenu
|
||||
|
@@ -19,9 +19,10 @@ config EXAMPLE_PORT
|
||||
Port number used by ASIO example
|
||||
|
||||
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"
|
||||
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
|
||||
|
@@ -22,7 +22,8 @@ config BROKER_CERTIFICATE_OVERRIDE
|
||||
string "Broker certificate override"
|
||||
default ""
|
||||
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
|
||||
bool
|
||||
|
@@ -22,7 +22,8 @@ config BROKER_CERTIFICATE_OVERRIDE
|
||||
string "Server certificate override"
|
||||
default ""
|
||||
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
|
||||
bool
|
||||
|
@@ -53,7 +53,8 @@ config EXAMPLE_MULTICAST_IPV6_ADDR
|
||||
help
|
||||
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
|
||||
int "Multicast port (send & receive)"
|
||||
|
@@ -6,37 +6,37 @@ choice BASE_MAC_ADDRESS_STORAGE
|
||||
help
|
||||
Select storage of the base MAC address which is used to generate MAC addresses of all network interfaces
|
||||
when networking is initialized.
|
||||
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.
|
||||
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
|
||||
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.
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
config BASE_MAC_STORED_EFUSE_BLK0
|
||||
bool "Default (Espressif factory) EFUSE BLK0"
|
||||
bool "Default (Espressif factory) eFuse BLK0"
|
||||
config BASE_MAC_STORED_EFUSE_BLK3
|
||||
bool "Custom EFUSE BLK3"
|
||||
bool "Custom eFuse BLK3"
|
||||
config BASE_MAC_STORED_OTHER_EXTERNAL_STORAGE
|
||||
bool "Other external storage"
|
||||
endchoice
|
||||
|
||||
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
|
||||
default BASE_MAC_STORED_EFUSE_BLK3_ERROR_USE_DEFAULT
|
||||
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 "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.
|
||||
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.
|
||||
|
||||
config BASE_MAC_STORED_EFUSE_BLK3_ERROR_ABORT
|
||||
bool "Abort"
|
||||
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
|
||||
|
||||
endmenu
|
||||
|
@@ -34,116 +34,12 @@ OUTPUT_SUFFIX = '.new'
|
||||
IGNORE_DIRS = (
|
||||
# Kconfigs from submodules need to be ignored:
|
||||
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
|
||||
|
||||
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)
|
||||
CONFIG_NAME_MIN_PREFIX_LENGTH = 0
|
||||
@@ -211,6 +107,9 @@ class IndentAndNameChecker(BaseChecker):
|
||||
# stack common prefixes of configs
|
||||
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
|
||||
self.re_increase_level = re.compile(r'''^\s*
|
||||
(
|
||||
@@ -287,6 +186,10 @@ class IndentAndNameChecker(BaseChecker):
|
||||
# delete items ("config", "menuconfig", "help") until the appropriate parent
|
||||
self.del_from_level_stack(i)
|
||||
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)
|
||||
if self.debug:
|
||||
print(self.level_stack)
|
||||
@@ -321,8 +224,10 @@ class IndentAndNameChecker(BaseChecker):
|
||||
raise InputError(self.path_in_idf, line_number,
|
||||
'{} is {} characters long and it should be {} at most'
|
||||
''.format(name, name_length, CONFIG_NAME_MAX_LENGTH),
|
||||
line) # no suggested correction for this
|
||||
if self.prefix_stack[-1] is None:
|
||||
line + '\n') # no suggested correction for this
|
||||
if len(self.prefix_stack) == 0:
|
||||
self.prefix_stack.append(name)
|
||||
elif self.prefix_stack[-1] is None:
|
||||
self.prefix_stack[-1] = name
|
||||
else:
|
||||
# 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):
|
||||
stripped_line = line.strip()
|
||||
if len(stripped_line) == 0:
|
||||
self.force_next_indent = 0
|
||||
return
|
||||
current_level = len(self.level_stack)
|
||||
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_indent >= current_level * SPACES_PER_INDENT:
|
||||
# this line belongs to 'help'
|
||||
self.force_next_indent = 0
|
||||
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)
|
||||
|
||||
m = self.re_increase_level.search(line)
|
||||
@@ -395,6 +319,12 @@ class IndentAndNameChecker(BaseChecker):
|
||||
self.check_common_prefix(line, line_number)
|
||||
|
||||
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:
|
||||
raise InputError(self.path_in_idf, line_number,
|
||||
'Indentation consists of {} spaces instead of {}'.format(current_indent, expected_indent),
|
||||
|
@@ -94,6 +94,8 @@ def format_rest_text(text, indent):
|
||||
# Escape some characters which are inline formatting in ReST
|
||||
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'
|
||||
return text
|
||||
|
||||
|
@@ -18,6 +18,7 @@ import unittest
|
||||
from check_kconfigs import LineRuleChecker
|
||||
from check_kconfigs import InputError
|
||||
from check_kconfigs import IndentAndNameChecker
|
||||
from check_kconfigs import CONFIG_NAME_MAX_LENGTH
|
||||
|
||||
|
||||
class ApplyLine(object):
|
||||
@@ -113,6 +114,7 @@ class TestIndent(TestIndentAndNameChecker):
|
||||
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('') # newline in help
|
||||
self.expt_success(' endmenu keyword in the help')
|
||||
self.expect_error(' menu "real menu with wrong indent"',
|
||||
expect=' menu "real menu with wrong indent"', cleanup=' endmenu')
|
||||
@@ -142,6 +144,24 @@ class TestIndent(TestIndentAndNameChecker):
|
||||
self.expt_success(' config')
|
||||
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):
|
||||
def setUp(self):
|
||||
@@ -149,16 +169,23 @@ class TestName(TestIndentAndNameChecker):
|
||||
self.checker.min_prefix_length = 0 # prefixes are ignored in this test case
|
||||
|
||||
def test_name_length(self):
|
||||
max_length = CONFIG_NAME_MAX_LENGTH
|
||||
too_long = max_length + 1
|
||||
self.expt_success('menu "test"')
|
||||
self.expt_success(' config ABC')
|
||||
self.expt_success(' config ' + ('X' * 50))
|
||||
self.expect_error(' config ' + ('X' * 51), expect=None)
|
||||
self.expt_success(' menuconfig ' + ('X' * 50))
|
||||
self.expect_error(' menuconfig ' + ('X' * 51), expect=None)
|
||||
self.expt_success(' choice ' + ('X' * 50))
|
||||
self.expect_error(' choice ' + ('X' * 51), expect=None)
|
||||
self.expt_success(' config ' + ('X' * max_length))
|
||||
self.expect_error(' config ' + ('X' * too_long), expect=None)
|
||||
self.expt_success(' menuconfig ' + ('X' * max_length))
|
||||
self.expect_error(' menuconfig ' + ('X' * too_long), expect=None)
|
||||
self.expt_success(' choice ' + ('X' * max_length))
|
||||
self.expect_error(' choice ' + ('X' * too_long), expect=None)
|
||||
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):
|
||||
def test_prefix_len(self):
|
||||
|
Reference in New Issue
Block a user