Description
When enabling "Use secure element ATECC608A with ESP-TLS" compilation fails with message
/home/nikos/.platformio/packages/framework-espidf@3.40200.210118/components/esp-tls/esp_tls_mbedtls.c:600:39: error: 'struct <anonymous>' has no member named 'slave_address'; did you mean 'address'?
This is because the version of esp-cryptoauthlib provided with Core2-AWS-IoT-Toolkit is not the proper matching version for the ESP-TLS of the ESP-IDF used by -AWS-IoT-Toolkit. The name of this struct member was changed in this commit to support the latest esp-cryptoauthlib:
https://github.com/espressif/esp-idf/blob/1abdfee3b7ea9e432bba5eeda36c8a9f4dc1f6ba/components/esp-tls/esp_tls_mbedtls.c
But Core2-AWS-IoT-Toolkit uses an old version of ESP IDF and ESP-TLS, so it can't find this struct member.
This renders the use of mBedTLS and ESP-TLS useless, which is one of the main features of AWS Core2 m5Stack.
To fix this, there are two choices:
- Update to latest esp-cryptoauthlib, which fixes the problem but is unstable with Core2-AWS-IoT-Toolkit. Sometimes ESP-TLS fails to read the certificates, other times it lags for seconds reading eg. the serial number.
- Leave the esp-cryptoauthlib as provided with Core2-AWS-IoT-Toolkit but use next version of ESP-IDF (4.3) which has a newer ESP-TLS which works fine with the provided esp-cryptoauthlib. However updating to next minor version of ESP-IDF results in boot loop and the culprint is according to backtrace disp_spi line 176.
Since the secure element is the main feature of this AWS m5stack, a not-working ESP-TLS doesn't make sense.