Skip to content

fix(esp32p4 with idf-v6.0): compiling errors with ESP-IDF v6.0 on ESP32-P4: outdated esp-dsp dependency and mbedtls/aes.h #297

Closed
shengt25 wants to merge 2 commits intoespressif:masterfrom
shengt25:master
Closed

fix(esp32p4 with idf-v6.0): compiling errors with ESP-IDF v6.0 on ESP32-P4: outdated esp-dsp dependency and mbedtls/aes.h #297
shengt25 wants to merge 2 commits intoespressif:masterfrom
shengt25:master

Conversation

@shengt25
Copy link
Copy Markdown
Contributor

@shengt25 shengt25 commented Apr 12, 2026

Description

  • mbedtls/aes.h removed from public API: IDF v6.0 upgrades mbedtls to v4.x (TF-PSA-Crypto).

    Fix: use PSA Crypto API for IDF >= 6.0, retaining the original mbedtls_aes_* path for IDF < 6.0.

  • esp-dsp 1.7.0 incompatible with IDF v6.0: kalman filter modules in esp-dsp 1.7.0 is not compatible with IDF v6.0, causing std::cos/std::sin to be undeclared.

    Fix: bump dependency to esp-dsp 1.8.0 which contains the fix. (was fixed in esp-dsp v1.7.1, see commit espressif/esp-dsp@23ee959)

esp.vsld.8 and vldbc_8_ip illegal operands also prevents compiling with esp32p4 (rev 1.0) and IDF v6.0. However this is fixed in pull request #294 (not merged yet at the moment)

Related

Issue: #295
Pull request: #294

Testing

Tested with IDF v6.0 and IDF v5.5.1 on esp32p4 (rev 1.0), both compilied successfully.
Tested with mobilenet-v2, espdl model loading and inferernce are successful.


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

…DF v6.0

ESP-IDF v6.0 upgrades mbedtls to v4.x (TF-PSA-Crypto), which removes mbedtls/aes.h from the public API. Use compile-time version detection to select PSA Crypto API (psa/crypto.h) for IDF >= 6.0 and keep the legacy mbedtls_aes_* path for IDF < 6.0.
esp-dsp 1.8.0 includes a fix for kalman filter modules (ekf.cpp), which caused build errors on ESP-IDF v6.0. Require 1.8.0 as the minimum to ensure IDF v6.0 compatibility.
@shengt25 shengt25 changed the title Fix compiling errors with ESP-IDF v6.0 on ESP32-P4: outdated esp-dsp dependency and mbedtls/aes.h fix(esp32p4 with idf-v6.0) compiling errors with ESP-IDF v6.0 on ESP32-P4: outdated esp-dsp dependency and mbedtls/aes.h Apr 12, 2026
@shengt25 shengt25 changed the title fix(esp32p4 with idf-v6.0) compiling errors with ESP-IDF v6.0 on ESP32-P4: outdated esp-dsp dependency and mbedtls/aes.h fix(esp32p4 with idf-v6.0): compiling errors with ESP-IDF v6.0 on ESP32-P4: outdated esp-dsp dependency and mbedtls/aes.h Apr 12, 2026
@sun-xiangyu
Copy link
Copy Markdown
Collaborator

@shengt25 , thanks for your PR. It looks good. We will support idf 6.0 in the next release.

@BlueSkyB
Copy link
Copy Markdown
Collaborator

@shengt25
Thank you for your pull request! Your code has been successfully merged into the master branch.
Due to certain limitations with CI, we performed a rebase on your commits before merging. As a result, the status of this PR on GitHub cannot be automatically marked as Merged.
You can now view your contribution in the commit history of the master branch. Therefore, we will be closing this PR manually.
We hope this does not cause any inconvenience. Thank you again for your contribution!

@BlueSkyB BlueSkyB closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants