mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
7dbf01afad
CoAP component relies on some mbedTLS crypto configuration options, e.g. DTLS and PSK. These configuration options if selected, have footprint impact on generic TLS examples like https_request or https_ota as well. Footprint of https_request example with/without change is per below: $ ./tools/idf_size.py new_https_request.map --diff old_https_request.map <CURRENT> MAP file: new_https_request.map <REFERENCE> MAP file: old_https_request.map Difference is counted as <CURRENT> - <REFERENCE>, i.e. a positive number means that <CURRENT> is larger. Total sizes of <CURRENT>: <REFERENCE> Difference DRAM .data size: 14796 bytes 14796 DRAM .bss size: 23560 bytes 23680 -120 Used static DRAM: 38356 bytes ( 142380 available, 21.2% used) 38476 -120 ( +120 available, +0 total) Used static IRAM: 89045 bytes ( 42027 available, 67.9% used) 89045 ( +0 available, +0 total) Flash code: 554231 bytes 563823 -9592 Flash rodata: 179000 bytes 181224 -2224 Total image size:~ 860632 bytes (.bin may be padded larger) 872568 -11936 This commit moves relevant config options to CoAP specific examples and also adds some run time warnings if they are kept disabled. Closes https://github.com/espressif/esp-idf/issues/5262
69 lines
2.0 KiB
Plaintext
69 lines
2.0 KiB
Plaintext
menu "CoAP Configuration"
|
|
|
|
choice COAP_MBEDTLS_ENCRYPTION_MODE
|
|
prompt "CoAP Encryption method"
|
|
default COAP_MBEDTLS_PSK
|
|
help
|
|
If the CoAP information is to be encrypted, the encryption environment
|
|
can be set up in one of two ways (default being Pre-Shared key mode)
|
|
|
|
- Encrypt using defined Pre-Shared Keys (PSK if uri includes coaps://)
|
|
- Encrypt using defined Public Key Infrastructure (PKI if uri includes coaps://)
|
|
|
|
config COAP_MBEDTLS_PSK
|
|
bool "Pre-Shared Keys"
|
|
|
|
config COAP_MBEDTLS_PKI
|
|
bool "PKI Certificates"
|
|
|
|
endchoice #COAP_MBEDTLS_ENCRYPTION_MODE
|
|
|
|
config COAP_MBEDTLS_DEBUG
|
|
bool "Enable CoAP debugging"
|
|
default n
|
|
help
|
|
Enable CoAP debugging functions at compile time for the example code.
|
|
|
|
If this option is enabled, call coap_set_log_level()
|
|
at runtime in order to enable CoAP debug output via the ESP
|
|
log mechanism.
|
|
|
|
choice COAP_MBEDTLS_DEBUG_LEVEL
|
|
bool "Set CoAP debugging level"
|
|
depends on COAP_MBEDTLS_DEBUG
|
|
default COAP_LOG_WARNING
|
|
help
|
|
Set CoAP debugging level
|
|
|
|
config COAP_LOG_EMERG
|
|
bool "Emergency"
|
|
config COAP_LOG_ALERT
|
|
bool "Alert"
|
|
config COAP_LOG_CRIT
|
|
bool "Critical"
|
|
config COAP_LOG_ERROR
|
|
bool "Error"
|
|
config COAP_LOG_WARNING
|
|
bool "Warning"
|
|
config COAP_LOG_NOTICE
|
|
bool "Notice"
|
|
config COAP_LOG_INFO
|
|
bool "Info"
|
|
config COAP_LOG_DEBUG
|
|
bool "Debug"
|
|
endchoice
|
|
|
|
config COAP_LOG_DEFAULT_LEVEL
|
|
int
|
|
default 0 if !COAP_MBEDTLS_DEBUG
|
|
default 0 if COAP_LOG_EMERG
|
|
default 1 if COAP_LOG_ALERT
|
|
default 2 if COAP_LOG_CRIT
|
|
default 3 if COAP_LOG_ERROR
|
|
default 4 if COAP_LOG_WARNING
|
|
default 5 if COAP_LOG_NOTICE
|
|
default 6 if COAP_LOG_INFO
|
|
default 7 if COAP_LOG_DEBUG
|
|
|
|
endmenu
|