Page 1 of 1

Arduino ESP32 CAN is not compiled under ESP32-C3

Posted: Tue Apr 19, 2022 8:54 am
by Yuriy_m
Good day! I have two esp32 and esp32-c3 modules. The library http://www.iotsharing.com/2017/09/how-t ... rface.html works for esp32. compilation error for esp32-c3.

C:\Users\Yuriy\Documents\Arduino\libraries\esp32-can-protocol-demo-master\src\CAN.c:36:10: fatal error: soc/dport_reg.h: No such file or directory
#include "soc/dport_reg.h"
^~~~~~~~~~~~~~~~~

I assume that there are slightly different platforms. How to fix it ? Maybe someone did CAN under esp32-C3?

Re: Arduino ESP32 CAN is not compiled under ESP32-C3

Posted: Fri Apr 29, 2022 8:50 am
by **txf**
As far as I know that library only works on the original ESP32, on account that it configures and accesses CAN directly at the register level.

To use CAN on later esp32 devices I just use the built-in IDF functions for TWAI. It works just fine. I'd check out their TWAI examples.

Re: Arduino ESP32 CAN is not compiled under ESP32-C3

Posted: Sat Jul 02, 2022 7:36 am
by --TBM--
Hello. I have exacly same problem. I would like to compile with arduino IDE. I have that error only when try to compile for esp32-c3 (for s2, s3 or other boards compiling just fine). Please help

Re: Arduino ESP32 CAN is not compiled under ESP32-C3

Posted: Mon Jul 03, 2023 3:22 am
by wangjb2023
微信图片_20230703112129.png
微信图片_20230703112129.png (116.56 KiB) Viewed 4486 times

Re: Arduino ESP32 CAN is not compiled under ESP32-C3

Posted: Fri Jul 12, 2024 2:35 pm
by simon91
Hi,

Getting this error with ESP32-C3. #include "soc/dport_reg.h" is not found when building for the chip. Has the library been updated to suit the C3 recently? I'm on 4.4.1.

Cheers,