Merge branch 'feature/move_partial_download_code_under_config' into 'master'

feat(esp_http_client): move partial download related code under config

Closes IDF-13464

See merge request espressif/esp-idf!40270
This commit is contained in:
Aditya Patwardhan
2025-08-11 11:09:49 +05:30
11 changed files with 71 additions and 7 deletions
@@ -41,7 +41,13 @@ Please refer to :ref:`ESP-TLS: TLS Server Verification <esp_tls_server_verificat
Partial Image Download over HTTPS
---------------------------------
To use the partial image download feature, enable ``partial_http_download`` configuration in ``esp_https_ota_config_t``. When this configuration is enabled, firmware image will be downloaded in multiple HTTP requests of specified sizes. Maximum content length of each request can be specified by setting ``max_http_request_size`` to the required value.
To use the partial image download feature, you need to:
* **Enable the component-level configuration**: enable :ref:`CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOAD` in menuconfig (``Component config````ESP HTTPS OTA````Enable partial HTTP download for OTA``)
* **Enable the feature in your application**: Set the ``partial_http_download`` field in :cpp:struct:`esp_https_ota_config_t` configuration structure
When this configuration is enabled, firmware image will be downloaded in multiple HTTP requests of specified sizes. Maximum content length of each request can be specified by setting ``max_http_request_size`` to the required value.
This option is useful while fetching image from a service like AWS S3, where mbedTLS Rx buffer size (:ref:`CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN`) can be set to a lower value which is not possible without enabling this configuration.
@@ -104,3 +104,10 @@ Binary data format has been dropped. `CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN` is no
CRC data integrity check has been dropped. `ESP_COREDUMP_CHECKSUM_CRC32` is no longer supported. SHA256 is now the default checksum algorithm.
The function :cpp:func:`esp_core_dump_partition_and_size_get()` now returns `ESP_ERR_NOT_FOUND` for blank (erased) partitions instead of `ESP_ERR_INVALID_SIZE`.
OTA Updates
-----------
The partial download functionality in ESP HTTPS OTA has been moved under a configuration option in order to reduce the memory footprint if partial download is not used.
To use partial download features in your OTA applications, you need to enable the component-level configuration :ref:`CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOAD` in menuconfig (``Component config````ESP HTTPS OTA````Enable partial HTTP download for OTA``).