sandeepmistry / arduino-CAN

An Arduino library for sending and receiving data using CAN bus.
MIT License
667 stars 227 forks source link

When compiling a file for esp32 s3 dev board, i get the following errors. Is there a new CAN.c file to help? #115

Open Phil-Mitton opened 1 year ago

Phil-Mitton commented 1 year ago

In file included from C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_reg.h:21, from c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:39: c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c: In function 'CAN_init': c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:174:26: error: 'DPORT_PERIP_CLK_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_CLK_EN1_REG'? DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN); ^~~~~~ C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:75:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'

define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)

                                                               ^~~~

C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:88:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'

define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))

                                          ^~~~~~~~~~~~~~~~~~~~

c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:174:2: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK' DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN); ^~~~~~~ c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:174:26: note: each undeclared identifier is reported only once for each function it appears in DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN); ^~~~~~ C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:75:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'

define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)

                                                               ^~~~

C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:88:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'

define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))

                                          ^~~~~~~~~~~~~~~~~~~~

c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:174:2: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK' DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN); ^~~~~~~ c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:174:50: error: 'DPORT_CAN_CLK_EN' undeclared (first use in this function); did you mean 'DPORT_REG_CLR_BIT'? DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN); ^~~~ C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:75:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'

define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)

                                                                                    ^~~

C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:88:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'

define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))

                                          ^~~~~~~~~~~~~~~~~~~~

c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:174:2: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK' DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN); ^~~~~~~ c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:176:28: error: 'DPORT_PERIP_RST_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_RST_EN0_REG'? DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST); ^~~~~~ C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:75:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'

define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)

                                                               ^~~~

C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:85:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'

define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))

                                          ^~~~~~~~~~~~~~~~~~~~

c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:176:2: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK' DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST); ^~~~~~~~~ c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:176:52: error: 'DPORT_CAN_RST' undeclared (first use in this function); did you mean 'DPORT_DATE_REG'? DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST); ^~~~~ C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:75:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'

define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)

                                                                                    ^~~

C:\Users\Phil Mitton\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_access.h:85:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'

define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))

                                          ^~~~~~~~~~~~~~~~~~~~

c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:176:2: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK' DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST); ^~~~~~~~~ c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:181:37: error: 'CAN_TX_IDX' undeclared (first use in this function); did you mean 'TWAI_TX_IDX'? gpio_matrix_out(CAN_cfg.tx_pin_id, CAN_TX_IDX, 0, 0); ^~~~~~ TWAI_TX_IDX c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:186:36: error: 'CAN_RX_IDX' undeclared (first use in this function); did you mean 'TWAI_RX_IDX'? gpio_matrix_in(CAN_cfg.rx_pin_id, CAN_RX_IDX, 0); ^~~~~~ TWAI_RX_IDX c:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster\src\CAN.c:256:17: error: 'ETS_CAN_INTR_SOURCE' undeclared (first use in this function) esp_intr_alloc(ETS_CAN_INTR_SOURCE, 0, CAN_isr, NULL, NULL); ^~~~~~~ Multiple libraries were found for "ESP32CAN.h" Used: C:\Users\Phil Mitton\Documents\Arduino\libraries\ESP32ArduinoCANmaster Not used: C:\Users\Phil Mitton\Documents\Arduino\libraries\esp32-can-protocol-demo-master exit status 1

Compilation error: exit status 1

mattia424 commented 1 year ago

I have the same problem. Is there a solution for this? Thank you

JeseRamanantsoa commented 1 year ago

Any solution guys?

ruziev-dev commented 1 year ago

The same shit. Does anybody found solution? 🥺

Loongle commented 1 year ago

Any solution guys?

Phil-Mitton commented 4 months ago

All good, Thank you. Phil


From: dmn8s5 @.> Sent: Monday, April 29, 2024 4:27:41 PM To: sandeepmistry/arduino-CAN @.> Cc: Phil Mitton @.>; Author @.> Subject: Re: [sandeepmistry/arduino-CAN] When compiling a file for esp32 s3 dev board, i get the following errors. Is there a new CAN.c file to help? (Issue #115)

What's going on here? Any update here?

— Reply to this email directly, view it on GitHubhttps://github.com/sandeepmistry/arduino-CAN/issues/115#issuecomment-2083603864, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALTZ6SA7HFU3PNSIOVSQ3NTY72UL3AVCNFSM6AAAAAAULSUGF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTGYYDGOBWGQ. You are receiving this because you authored the thread.Message ID: @.***>

dmn8s5 commented 4 months ago

Hey Phil, how did you resolve the error? Is there a new update I am not aware of?

bionicbone commented 1 month ago

@Phil-Mitton @dmn8s5 @per1234 @Loongle @ruziev-dev @JeseRamanantsoa @mattia424 Did anyone find an alternative CAN driver that will compile on the S3, my particular application is to use 2 * MCP2515, I have this working on an original ESP32 but want to leverage the low power deep sleep of the S3. Thanks all