Skip to content
This repository was archived by the owner on Sep 23, 2021. It is now read-only.

Can not compile M5Stack-IDF #3

Open
chibi314 opened this issue Sep 8, 2020 · 0 comments
Open

Can not compile M5Stack-IDF #3

chibi314 opened this issue Sep 8, 2020 · 0 comments

Comments

@chibi314
Copy link

chibi314 commented Sep 8, 2020

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.

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

No branches or pull requests

1 participant