acan-esp32 icon indicating copy to clipboard operation
acan-esp32 copied to clipboard

Dependency on core_version.h in version 1.x

Open lphooge opened this issue 1 year ago • 8 comments

I had a bit of trouble compiling this library for an m5stack device, it complained about a missing core_version.h

After some investigation I found this is something thats included with specific boards that are installed via the arduino ide. However M5 does not include it for their boards, and thats why it fails.

However the definitions in that file are never used inside the library (only in places where it is commented out anyways), so maybe you can consider just removing it? That would allow hassle-free usage with the m5stack boards.

The offending line is in src/ACAN_ESP32.cpp, line 6 of version 1.1.1 and 1.1.2. Its not there in 1.1.0 and 2.0.0.

As a workaround I placed the following file under DUMMY_CORE_VERSION/core_version.h inside the arduino library folder: #define ARDUINO_ESP32_GIT_VER 0xae9dae4a #define ARDUINO_ESP32_GIT_DESC 2.0.11 #define ARDUINO_ESP32_RELEASE_2_0_11 #define ARDUINO_ESP32_RELEASE "2_0_11"

This way it compiles and everything works fine, but it might break things when later using an ESP board that DOES include that file for the board manager and maybe has different contents in it so thats not optimal.

lphooge avatar Feb 24 '24 17:02 lphooge