Skip to content

Compilation failure with ESP-IDF v6.0.1: fatal error: mbedtls/sha256.h: No such file or directory #374

Description

@MiaoMuu

Answers checklist.

  • I have read the Rainmaker documentation and the issue is not addressed there.
  • I have updated my IDF branch (release/vX.Y) to the latest version and checked that the issue is present there. This is not applicable if you are using Rainmaker with Arduino.
  • I have searched the Rainmaker forum and issue tracker for a similar issue and not found a similar issue.

IDF / ESP32-Arduino version.

ESP-IDF v6.0.1 Target: ESP32-S3

Operating System used.

Windows

How did you build your project?

Other (please specify in More Information)

Development Kit.

ESP32-S3-WROOM-1-N8 (Custom Board)

What is the expected behavior?

The project should compile successfully with ESP-IDF v6.0.1, just as it does with ESP-IDF v5.5.

What is the actual behavior?

The build fails because an internal ESP RainMaker source file includes "mbedtls/sha256.h", which cannot be found when building with ESP-IDF v6.0.1.
Error: fatal error: mbedtls/sha256.h: No such file or directory

Steps to reproduce.

  1. Clone the latest ESP RainMaker repository.
  2. Open one of the official ESP RainMaker examples.
  3. Use ESP-IDF v6.0.1.
  4. Run:
    idf.py set-target esp32s3
    idf.py build
  5. The compilation fails with: fatal error: mbedtls/sha256.h: No such file or directory

Build Logs.

C:/Users/XXX/Documents/GitHub/cloud-monitor/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_node_auth.c:11:10: fatal error: mbedtls/sha256.h: No such file or directory
   11 | #include "mbedtls/sha256.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
[11/143] Building C object esp-idf/espressif__esp_rainmaker/CMakeFiles/__idf_espressif__esp_rainmaker.dir/src/console/esp_rmaker_commands.c.obj
ninja: build stopped: subcommand failed.

More Information.

The same project compiles successfully with ESP-IDF v5.5 without any source code modifications.
After upgrading to ESP-IDF v6.0.1, the compilation fails due to the missing header "mbedtls/sha256.h" included by the internal RainMaker source file: components/esp_rainmaker/src/core/esp_rmaker_node_auth.c
According to the ESP-IDF v6.0 migration guide, Mbed TLS has been upgraded to version 4.x and many legacy cryptographic APIs have been migrated toward PSA Crypto.
It appears that:

  • mbedtls/sha256.h may have been removed or relocated in ESP-IDF v6.0.
  • ESP RainMaker still depends on the legacy Mbed TLS SHA-256 APIs.
  • There may currently be a compatibility issue between the latest ESP RainMaker and ESP-IDF v6.0.1.
    Could you please confirm whether ESP RainMaker officially supports ESP-IDF v6.0.1? If not, is there a planned release that will add support for ESP-IDF v6.x?

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions