Can't compile file within Platformio

Hello,

I’ve created a small application to receive CANOpen frames with and ESP32 using the ACAN_ESP32@3.0.1 library.

My application runs fine within the Arduino development environment, (I can compile, download and test it woks fine) but I can’t compile it with Platformio
I have this compile error
.pio/libdeps/esp32doit-devkit-v1/ACAN_ESP32/src/ACAN_ESP32.cpp:9:10: fatal error: esp_private/periph_ctrl.h: No such file or directory
#include <esp_private/periph_ctrl.h> // For ESP32 board manager

On Arduino, I compile with the latest ESP32 Espressif package 3.1.3.

Thank you for your help

If the library depends on Arduino-ESP32 core 3.x, then you need to change the platform = .. value in your platformio.ini, otherwise the defaults will get you Arduino-ESP32 core 2.x.

See

1 Like