The number of the DMA descriptors allocated for certain length (e.g.,
8176) were not sufficient (off by 1 error). This used to result in the
dynamic memory corruption as the region was modified beyond the
allocated range.
This change fixes the DMA descriptor calculation part and allocates
sufficient DMA descriptors based on the data length alignment considerations.
Test has also been added to cover the specific scenario in the CI.
Closes https://github.com/espressif/esp-idf/issues/11310
- For esp32-c2, the `CONFIG_NEWLIB_NANO_FORMAT` is enabled by
default which does not allow printing `int64_t` values
- Copied these values to a `uint32_t` variable for printing
them properly
- GCM operation in mbedtls used ECB, which calculated only 16 bytes of data each time.
- Therefore, when processing a large amount of data, it is necessary to frequently set hardware acceleration calculations,
- which could not make good use of the AES DMA function to improve efficiency.
- Hence, GCM implementation is replaced with CTR-based calculation which utilizes AES DMA to improve efficiency.
All the partition handling API functions and data-types were moved from the 'spi_flash' component to the new one named 'esp_partition'. See Storage 5.x migration guide for more details
Before `test_apps` migration, we had an independent release config,
but we can safely enable it in the default configuration for ESP32
target itself. This helps to catch any potential issues that may
occur in relevant tests because of compiler optimization flags.