I have been using the cryptoautholib library with previous versions according to the examples at GitHub - kmwebnet/ECC608-Configure: ATECC608A configuration for ESP32 platform in VisualCodeStudio and platformio.
Now with the new ESP_IDF (4.0) I have installed CryptoAuthLib by Gabriel Notman on platformio with the LibraryaManager.
I can’t make the kmwebnet’s examples works
To test, simply, in the Hello_word example I incorporate and the begin
ATCAIfaceCfg cfg = {
.iface_type = ATCA_I2C_IFACE,
.devtype = ATECC608A,
.atcai2c.slave_address = 0XC0,
.atcai2c.bus = 1,
.atcai2c.baud = 100000,
.wake_delay = 1500,
.rx_retries = 20
};
ATCA_STATUS status = atcab_init (& cfg);
if (status! = ATCA_SUCCESS) {
ESP_LOGE (TAG_ECC608, "atcab_init () failed with ret = 0x% 08d \ r \ n", status);
But I don’t know how to make find the library
#include “cryptoauthlib.h” does not work
#include “C: \ Users \ JOSE \ .platformio \ lib \ CryptoAuthLib_ID6095 \ src \ cryptoauthlib.h” find the library but does not work
the ouput is:
Compiling .pio\build\esp32dev\esp-idf\src\hello_world_main.c.o
In file included from C:\Users\JOSE\.platformio\lib\CryptoAuthLib_ID6095\src\cryptoauthlib.h:34,
from src\hello_world_main.c:14:
C:\Users\JOSE\.platformio\lib\CryptoAuthLib_ID6095\src\hal/atca_hal.h:32:10: fatal error: atca_status.h: No such file or directory
Putting in plaftform.ini
[env:esp32dev]
platform = espressif32
framework = espidf
board = esp32dev
monitor_speed = 115200
lib_deps =
# Using library Id
6095
# Using library Name
CryptoAuthLib
# Depend on specific version
CryptoAuthLib@1.0.1
# Semantic Versioning Rules
CryptoAuthLib@^1.0.1
CryptoAuthLib@~1.0.1
CryptoAuthLib @> = 1.0.1
It doesn’t work either.
I have been with Visual Code Studio and Plaftform for a short time and this is driving me crazy.
The old way to incorporate it was simply by placing it in the project directory and defining it in platformio.ini
[env: esp32dev]
platform = espressif32@1.11.2
board = esp32dev
framework = espidf
src_filter =
+ <*>
- <. git />
- <svn />
- <example />
- <examples />
- <test />
- <tests />
- <cryptoauthlib / app />
- <cryptoauthlib / test />
- <cryptoauthlib / python />
- <cryptoauthlib / third_party />
- <cryptoauthlib / lib / hal />
- <cryptoauthlib / lib / basic / atca_helpers.c>
+ <cryptoauthlib / lib / hal / atca_hal.c>
+ <cryptoauthlib / lib / hal / atca_hal.h>
+ <cryptoauthlib / lib / hal / hal_esp32_timer.c>
+ <cryptoauthlib / lib / hal / hal_freertos.c>
build_flags =
-I "lib / cryptoauthlib / lib"
-I "lib / cryptoauthlib"
-I "$ PROJECT_CORE_DIR / packages / framework-espidf / components / freertos / include / freertos"
-DESP32
-DATCA_HAL_I2C
-DATCA_PRINTF
-DATCA_USE_RTOS_TIMER
upload_port = COM7
monitor_speed = 115200