Installing "M5Stack-IDF" will result in errors

  • Hello,

    I installed M5Stack-IDF and I got errors:

    My steps:

    1. Download and install esp-idf from

    2. Check version: %
      Input: --version
      Result: ESP-IDF v4.3-dev*

    3. Install M5Stack
      Input: %git clone --recursive

    4. Input: %make menuconfig
      Switch on "Autostart Arduino setup and loop on boot"

    5. Compile
      Input: %make flash monitor

    6. Get errors:
      a.) /Users/<name>/esp/M5Stack-IDF/components/arduino/cores/esp32/libb64/cencode.c:
      In function 'base64_encode_block':
      warning: this statement may fall through [-Wimplicit-fallthrough=]
      result = (fragment & 0x003) << 4;
      note: here
      case step_B:

        Workaround: Insert "__attribute__ ((fallthrough));"

      b.) /Users/<name>/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-gpio.c:86:24: 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;
      _________________ ^~~~~~~~~~~~~
      /Users/<name>/esp/M5Stack-IDF/components/arduino/cores/esp32/esp32-hal-gpio.c:86:24: note:
      each undeclared identifier is reported only once for each function it appears in
      make[1]: *** [cores/esp32/esp32-hal-gpio.o] Error 1

        Workaround: No workaround known yet

    Can anyone help me?

  • Hi @sheepDog

    I get the same errors. I am afraid that M5Stack-IDF is too old (updated 2 years ago) to work with the latest esp-idf. For one thing Espressif has since moved on to use CMake & python scrips to build instead of just make. (I am not that familiar with either, but I think they don't play well mixed together.)

    Just curious. What is it that makes you want to use the idf instead of an Arduino environment?


  • Hello @felmue,

    thank you for your interesting informations.

    The two main reasons why I use IDF are:

    • I am developing a large project and so I need an IDE that can handle such a project clearly. For example, it becomes quite confusing when you have more than 20 files.

    • I wanted to be very close to the examples of expressif, because in past I got some unpleasant mistakes in some libraries.

  • hey @sheepDog, take a look at the following repo: M5Stack-IDF-4.0, maybe it can be of use to setup a IDF 4.0 environment as you'd like

  • Hi @brus,

    thank you for providing your repro. In the meantime I've put together my own version and I'm waiting for the official version of m5stack.

  • @felmue

    FWIW & IMHO, Arduino is far to limiting. IDF opens up far more options that Arduino just does not address.
    Menuconfig is the primary reason for me to use IDF, and like the other poster said, having many source files Arduino is just to crippling to large projects beyond twinkling a led.

    I too hope M5Stack comes out with an updated official version of m5stack for IDF.