-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dependency on core_version.h in version 1.x #12
Comments
What is the board manager version and what is the ACAN_ESP32 version ?
There are changes in ESP32 board manager version 3.
ESP32 version 2.0.11 —> use ACAN_ESP32 version 1.1.2
ESP32 version 3.0.0alpha3 —> use ACAN_ESP32 version 2.0.0
… Le 24 févr. 2024 à 18:56, Lutz-Peter Hooge ***@***.***> a écrit :
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 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.
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.
—
Reply to this email directly, view it on GitHub <#12>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVFM7ME3LWXUQRMZLH3YVISVBAVCNFSM6AAAAABDYFQCA6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TENBSGM2TCOI>.
You are receiving this because you are subscribed to this thread.
|
ACAN_ESP32 is version 1.1.2 (so the latest 1.x version) I am not entirely sure what exactly is meant with "board manager". And there are helper tools/libraries for the esp32 platform that are installed via this boards manager. For example in AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11\cores\esp32 However for the m5stack board there is a different directory: |
The board manager handles « board cores », see https://support.arduino.cc/hc/en-us/articles/360016119519-Add-boards-to-Arduino-IDE
I think you have installed the 2.0.11 release :

What is your m5stack board ? There are several M5Stack boards.
What is the sketch your are compiling ?
Pierre
… Le 25 févr. 2024 à 01:54, Lutz-Peter Hooge ***@***.***> a écrit :
ACAN_ESP32 is version 1.1.2 (so the latest 1.x version)
Arduino IDE is version 2.
I am not entirely sure what exactly is meant with "board manager".
There is the tool called "boards manager" inside the arduino IDE.
And there are helper tools/libraties for the esp32 platform that are installed via this boards manager.
For example in AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11\cores\esp32
there is the file core_version.h and the directory seems to refer to a version 2.0.11 of these tools.
However for the m5stack board there is a different directory:
C:\Users\Lutz\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.1.0\cores\esp32
This does not include this header file.
—
Reply to this email directly, view it on GitHub <#12 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVD7EOSTTUNXGXZHHHLYVKDTBAVCNFSM6AAAAABDYFQCA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSG43TGNJUGI>.
You are receiving this because you commented.
|
I use an M5stack tough, however I also have a M5 Core 2 and a M5 Stamp C3U here and tried that: And on all of them it works when I just comment out the line "#include <core_version.h>" in ACAN_ESP32.cpp but not when its in there. Here is a full working sketch for the m5, basically a stripped down version of the loopback example with the m5unified library added for bord specific initialisation and the pins changed to match the Port A Grove Connector on the M5 Tough and Core 2 boards: ` static const uint32_t DESIRED_BIT_RATE = 250UL * 1000UL ; // 250 kb/s void setup () { /* //--- Start serial //---------------------------------------------------------------------------------------- static uint32_t gBlinkLedDate = 0 ; //---------------------------------------------------------------------------------------- void loop () { |
Ah, you use the M5SStack board manager. My library is designed to be use with ESP32 boeard manager, that is why the compilation fails.
I have installed the M5SStack board manager. Compilation of the ACAN_ESP32 fails on line 7 of ACAN_ESP32.cpp :
#include <esp_private/periph_ctrl.h>
After replacing this line with :
#include <driver/periph_ctrl.h>
compilation succeeds.
However, as I have no such board, I can’t check if it runs. Can you try ?
Pierre
… Le 25 févr. 2024 à 18:03, Lutz-Peter Hooge ***@***.***> a écrit :
Here is the view of the arduino board manager
board.manager.m5.png (view on web) <https://github.com/pierremolinaro/acan-esp32/assets/1904057/238e23c1-aed0-45d4-9834-61ae93ae7017>
—
Reply to this email directly, view it on GitHub <#12 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEWKZVHTQGBXUXUOFGLTMULYVNVEVAVCNFSM6AAAAABDYFQCA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGAYDANJVHA>.
You are receiving this because you commented.
|
I just tried, installed 2.0.0 and changed that line. With 1.1.2 (+core_version fix) it works. |
Ok now it works. I tried to find the problem and compiled a few times and suddently it worked. Edit: I now tried the patched 2.0.0 library with my main project, where it connects via CAN to a electric motor controller. Works fine without any changes to my code. |
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.
The text was updated successfully, but these errors were encountered: