esp-rs / esp-mbedtls

mbedtls for ESP32 bare-metal
Apache License 2.0
17 stars 7 forks source link

MBEDTLS_PADLOCK_C is defined but not available on ESP platform #10

Closed stevefan1999-personal closed 1 year ago

stevefan1999-personal commented 1 year ago

Seems like a mistake was made here:

In file included from /home/steve/rust/esp32c3-hw/.embuild/espressif/esp-idf/master/components/mbedtls/mbedtls/include/mbedtls/build_info.h:151,
                   from /home/steve/rust/esp32c3-hw/.embuild/espressif/esp-idf/master/components/mbedtls/mbedtls/library/common.h:26,
                   from /home/steve/rust/esp32c3-hw/.embuild/espressif/esp-idf/master/components/mbedtls/mbedtls/library/base64.c:20:
  /home/steve/rust/esp32c3-hw/.embuild/espressif/esp-idf/master/components/mbedtls/mbedtls/include/mbedtls/check_config.h:414:2: error: #error "MBEDTLS_PADLOCK_C defined, but not all prerequisites"
    414 | #error "MBEDTLS_PADLOCK_C defined, but not all prerequisites"
        |  ^~~~~
  [12/856] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/bignum_mod_raw.c.obj
  FAILED: esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/bignum_mod_raw.c.obj 
bjoernQ commented 1 year ago

Thank you for opening this issue. It's not totally clear to me how you get to this error. When using this crate, it will use the pre-compiled code.

When compiling the C code it needs to be done via the shell scripts since a few files need adjustments.

Regarding the linked issue: we don't use code from ESP-IDF here - just the toolchains

bjoernQ commented 1 year ago

@stevefan1999-personal seems you are using Rust STD - this is mbedtls for Rust no-std. If this is still an issue you probably should check the embuild or another Rust-STD repository or ask in our Matrix channel