Repository navigation
CMake: require bootloader_support on ESP-IDF 5.3 and later - #413
Merged
lovyan03 merged 1 commit intoNov 11, 2026
Merged
Conversation
Bus_SPI checks <esp_flash_encrypt.h> to decide whether external RAM may be a DMA source on chips with AHB GDMA v2 or AXI DMA (ESP32-P4, ESP32-C5, ESP32-C61). The header belongs to bootloader_support, which the component did not require, so on ESP-IDF 5 builds the check always assumed flash encryption and data in external RAM was sent by the CPU instead of DMA. Only ESP-IDF 5.3 and later is changed: up to 5.2 the header also needs spi_flash, so those versions keep the CPU path. Arduino builds see all include directories and were not affected; ESP-IDF 6 uses the efuse API instead. Also correct the comment in Bus_SPI: on ESP-IDF 6 the header is still public, but esp_flash_encryption_enabled() is deprecated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Require
bootloader_supporton ESP-IDF 5.3 and later (before ESP-IDF 6).Bus_SPIchecks<esp_flash_encrypt.h>to decide whether external RAM may be a DMA source on chips with AHB GDMA v2 or AXI DMA (ESP32-P4, ESP32-C5, ESP32-C61). The header belongs tobootloader_support, which the component did not require. On ESP-IDF 5 builds the header was therefore not visible, the check fell back to "flash encryption enabled", and data in external RAM was always sent by the CPU instead of DMA. No error or warning was shown. Arduino builds see all include directories and already used DMA; ESP-IDF 6 uses the efuse API and is unchanged.Up to ESP-IDF 5.2 the header also includes
spi_flash_mmap.h, whichbootloader_supportdoes not export, so those versions are left as they are (CPU path).The comment in
Bus_SPIabout ESP-IDF 6 is also corrected: the header is still public there, butesp_flash_encryption_enabled()is deprecated.Testing
bootloader_support/includeis now on the include path andesp_flash_encryption_enabledis referenced from the SPI bus code. ESP-IDF 5.1 / 5.2 and 6.1 builds are unchanged.