mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-02 14:49:04 +00:00

Problem: 1. In low-memory scenarios, the dynamic buffer feature can fail due to memory fragmentation. 2. It requires a contiguous 16KB heap chunk, but continuous allocation and deallocation of the RX buffer can lead to fragmentation. 3. If another component allocates memory between these operations, it can break up the available 16KB block, causing allocation failure. Solution: 1. Introduce configurable strategy for using dynamic buffers in TLS connections. 2. For example, convert RX buffers to static after the TLS handshake. 3. Allow users to select the strategy via a new field in the esp_http_client_cfg_t structure. 4. The strategy can be controlled independently for each TLS session.
64 lines
2.3 KiB
Plaintext
64 lines
2.3 KiB
Plaintext
menu "Example Configuration"
|
|
|
|
config EXAMPLE_FIRMWARE_UPGRADE_URL
|
|
string "firmware upgrade url endpoint"
|
|
default "https://192.168.0.3:8070/hello_world.bin"
|
|
help
|
|
URL of server which hosts the firmware
|
|
image.
|
|
|
|
config EXAMPLE_USE_CERT_BUNDLE
|
|
bool "Enable certificate bundle"
|
|
default y
|
|
depends on MBEDTLS_CERTIFICATE_BUNDLE
|
|
help
|
|
Enable trusted root certificate bundle. This approach allows to have
|
|
OTA updates functional with any public server without requirement
|
|
to explicitly add its server certificate.
|
|
|
|
config EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN
|
|
bool
|
|
default y if EXAMPLE_FIRMWARE_UPGRADE_URL = "FROM_STDIN"
|
|
|
|
config EXAMPLE_SKIP_COMMON_NAME_CHECK
|
|
bool "Skip server certificate CN fieldcheck"
|
|
default n
|
|
help
|
|
This allows you to skip the validation of OTA server certificate CN field.
|
|
|
|
config EXAMPLE_FIRMWARE_UPGRADE_BIND_IF
|
|
bool "Support firmware upgrade bind specified interface"
|
|
default n
|
|
help
|
|
This allows you to bind specified interface in OTA example.
|
|
|
|
choice EXAMPLE_FIRMWARE_UPGRADE_BIND_IF_TYPE
|
|
prompt "Choose OTA data bind interface"
|
|
default EXAMPLE_FIRMWARE_UPGRADE_BIND_IF_STA
|
|
depends on EXAMPLE_FIRMWARE_UPGRADE_BIND_IF
|
|
help
|
|
Select which interface type of OTA data go through.
|
|
|
|
config EXAMPLE_FIRMWARE_UPGRADE_BIND_IF_STA
|
|
bool "Bind wifi station interface"
|
|
depends on EXAMPLE_CONNECT_WIFI
|
|
help
|
|
Select wifi station interface to pass the OTA data.
|
|
|
|
config EXAMPLE_FIRMWARE_UPGRADE_BIND_IF_ETH
|
|
bool "Bind ethernet interface"
|
|
depends on EXAMPLE_CONNECT_ETHERNET
|
|
help
|
|
Select ethernet interface to pass the OTA data.
|
|
endchoice
|
|
|
|
config EXAMPLE_TLS_DYN_BUF_RX_STATIC
|
|
bool "Use static rx buffer for dynamic buffer after TLS handshake"
|
|
depends on MBEDTLS_DYNAMIC_BUFFER
|
|
default n
|
|
help
|
|
This converts the dynamic RX buffer to static allocation after the TLS handshake
|
|
is complete. This reduces memory fragmentation by avoiding repeated dynamic
|
|
allocations during data transfer.
|
|
endmenu
|