PlatformIO Community

Having trouble using esp-idf CAN driver in PlatformIO


#1

I am having trouble with the “driver/can.h” include, from esp-idf, when i run the “build” command, in PlatformIO. Actually, PlatformIO doesn’t have the CAN driver, built by ThomasBarth, and utilized by esp-idf itself, in their libraries, at “C:\Users\USER.platformio\packages\framework-espidf\components\driver”. Somehow, some files are missing, like “can.c”, “can.h” and other ones, related to those ones.

Is anyone having the same ploblem?


#2

You’re correct, platform-espressif32 is supposed to have ESP-IDF 3.1.3 in which this file does exist, but it’s not downloaded in the framework-espidf directory. This was already noticed here: https://github.com/platformio/platform-espressif32/issues/159


#3

Thank you for the reply.

I have been trying to update and include this driver manually for two days, but PlatformIO seems to always replace the files over and over again by the older ones. I was trying this:

  1. download the latest esp-idf;
  2. replace the downloaded files in “C:\Users\USER.platformio\packages\framework-espidf”;
  3. do the “build” command.
  4. Unfortunatelly, never worked.

It seems, every time PlatformIO runs the “Rebuild IntelliSense Index” command, it overwrites all the “IncludePaths” and files i have updated manually.


#4

Do you see it here ?


#5

Nope. I see it here --> “https://github.com/espressif/esp-idf/tree/master/components/driver/include/driver”.

  1. It is the “can.h” file in “driver/include/driver”,
  2. and the “can.c” file in “driver” only.
  3. And another files that are importante to the CAN driver itself.

#6

Funny it’s really not in these tags or in the release from 15 days ago but in the current development branch since July 2018… Maybe because there were recent bugfixes to it? https://github.com/espressif/esp-idf/commits/master/components/driver/can.c

Better ask ESP-IDF here why it’s not included in the release


#7

For sure, it’s funny. But that’s not a PlatformIO include issue, instead of ESP-IDF issue? Sorry, but i’m a little lost here :sweat_smile:


#8

It’s an ESP-IDF issue. PIO clones the release tags from ESP-IDF. The CAN driver files were not included in the 3.1.3 release that the latest platform-espressif32 uses -> ask ESP-IDF why


#9

Okay. Thank you a lot for the fast support! =)


#10

Why doesn’t PlatformIO clones the latest (master) version of ESP-IDF?


#11

Because of a policy to not support unstable betas. Development branch would even be bleeding edge.