M5Stack-IDF
M5Stack-IDF copied to clipboard
Can not compile M5Stack-IDF
Hi. I started to use esp-idf instead of arduino IDE, and M5Stack.
First, I installed esp-idf following this (on Ubuntu 18.04). And installed M5Stack-IDF following the README.
Then I got this error
error: 'rtc_gpio_desc' undeclared (first use in this function); did you mean 'rtc_io_desc'?
uint32_t rtc_reg = rtc_gpio_desc[pin].reg;
I googled this error message and find this. I modified RTCI0 configuration, but I got new error as follows
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:410:57: error: 'DPORT_SPI_CLK_EN' undeclared (first use in this function); did you mean 'DPORT_SPI3_CLK_EN'?
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN);
^~~~~~~~~~~~~~~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183: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)))
^~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:410:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN);
^~~~~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:410:57: 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_SPI_CLK_EN);
^~~~~~~~~~~~~~~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183: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)))
^~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:410:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN);
^~~~~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:411:59: error: 'DPORT_SPI_RST' undeclared (first use in this function); did you mean 'DPORT_SPI2_RST'?
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST);
^~~~~~~~~~~~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:180: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))))
^~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:411:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:413:57: error: 'DPORT_SPI_CLK_EN_2' undeclared (first use in this function); did you mean 'DPORT_SPI3_CLK_EN'?
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_2);
^~~~~~~~~~~~~~~~~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183: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)))
^~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:413:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_2);
^~~~~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:414:59: error: 'DPORT_SPI_RST_2' undeclared (first use in this function); did you mean 'DPORT_SPI2_RST'?
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_2);
^~~~~~~~~~~~~~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:180: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))))
^~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:414:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_2);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:416:57: error: 'DPORT_SPI_CLK_EN_1' undeclared (first use in this function); did you mean 'DPORT_SPI3_CLK_EN'?
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_1);
^~~~~~~~~~~~~~~~~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183: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)))
^~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:416:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_SPI_CLK_EN_1);
^~~~~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:417:59: error: 'DPORT_SPI_RST_1' undeclared (first use in this function); did you mean 'DPORT_SPI2_RST'?
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_1);
^~~~~~~~~~~~~~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~
/home/leus/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:180: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))))
^~~~~~~~~~~~~~~~~~~~
/home/leus/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-spi.c:417:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_SPI_RST_1);
^~~~~~~~~~~~~~~~~~~~~~~~~
How can I fix this error? Is this related to the version of esp-idf?
Thank you.