Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run on a esp32-s2? #81

Open
thundo opened this issue Aug 31, 2024 · 0 comments
Open

Run on a esp32-s2? #81

thundo opened this issue Aug 31, 2024 · 0 comments

Comments

@thundo
Copy link

thundo commented Aug 31, 2024

Hello and thanks for your effort on creating on this integration.

Is there any way to compile/run this project on a lolin_s2_mini board?

I know that the module can handle CAN with its TWAI module. Is there any abstraction that allows CAN to work with it too?

Compiling right now complains about missing constants

Compiling .pioenvs/esp-mev/src/main.cpp.o
Compiling .pioenvs/esp-mev/lib443/esp32_can/esp32_can_builtin_lowlevel.cpp.o
In file included from .piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:32:
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/esp_hw_support/include/esp_intr.h:8:2: warning: #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead [-Wcpp]
 #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
  ^~~~~~~
Compiling .pioenvs/esp-mev/FrameworkArduino/Esp.cpp.o
Compiling .pioenvs/esp-mev/FrameworkArduino/FirmwareMSC.cpp.o
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_reg.h:21,
                 from .piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:33:
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp: In function 'int CAN_init()':
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:217:53: error: 'DPORT_CAN_CLK_EN' was not declared in this scope
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
                                                     ^~~~~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:89: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)))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:217:5: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
     ^~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:217:53: note: suggested alternative: 'DPORT_USB_CLK_EN'
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
                                                     ^~~~~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:89: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)))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:217:5: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
     ^~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:218:55: error: 'DPORT_CAN_RST' was not declared in this scope
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
                                                       ^~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:86: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))))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:218:5: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:218:55: note: suggested alternative: 'DPORT_WDG_RST'
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
                                                       ^~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:86: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))))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:218:5: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:225:39: error: 'CAN_TX_IDX' was not declared in this scope
     gpio_matrix_out(CAN_cfg.tx_pin_id,CAN_TX_IDX,0,0);
                                       ^~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:225:39: note: suggested alternative: 'CAN_TXCODE'
     gpio_matrix_out(CAN_cfg.tx_pin_id,CAN_TX_IDX,0,0);
                                       ^~~~~~~~~~
                                       CAN_TXCODE
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:230:35: error: 'CAN_RX_IDX' was not declared in this scope
  gpio_matrix_in(CAN_cfg.rx_pin_id,CAN_RX_IDX,0);
                                   ^~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:230:35: note: suggested alternative: 'CAN_RXCODE'
  gpio_matrix_in(CAN_cfg.rx_pin_id,CAN_RX_IDX,0);
                                   ^~~~~~~~~~
                                   CAN_RXCODE
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:303:20: error: 'ETS_CAN_INTR_SOURCE' was not declared in this scope
     esp_intr_alloc(ETS_CAN_INTR_SOURCE, ESP_INTR_FLAG_IRAM, CAN_isr, NULL, NULL);
                    ^~~~~~~~~~~~~~~~~~~
Compiling .pioenvs/esp-mev/FrameworkArduino/FunctionalInterrupt.cpp.o
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_reg.h:21,
                 from .piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:33:
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp: In function 'int CAN_stop()':
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:325:55: error: 'DPORT_CAN_CLK_EN' was not declared in this scope
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
                                                       ^~~~~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:86: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))))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:325:5: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:325:55: note: suggested alternative: 'DPORT_USB_CLK_EN'
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
                                                       ^~~~~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:86: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))))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:325:5: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
     DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:326:53: error: 'DPORT_CAN_RST' was not declared in this scope
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
                                                     ^~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:89: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)))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:326:5: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
     ^~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:326:53: note: suggested alternative: 'DPORT_WDG_RST'
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
                                                     ^~~~~~~~~~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:76:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
 #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
                                                                                        ^~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dport_access.h:89: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)))
                                              ^~~~~~~~~~~~~~~~~~~~
.piolibdeps/esp-mev/esp32_can/src/esp32_can_builtin_lowlevel.cpp:326:5: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
     ^~~~~~~~~~~~~~~~~~~~~~~
*** [.pioenvs/esp-mev/lib443/esp32_can/esp32_can_builtin_lowlevel.cpp.o] Error 1

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant