🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Installing "M5Stack-IDF" will result in errors

    ESP - IDF
    4
    6
    13.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sheepDog
      last edited by sheepDog

      Hello,

      I installed M5Stack-IDF and I got errors:

      My steps:

      1. Download and install esp-idf from https://github.com/espressif/esp-idf

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

      3. Install M5Stack
        Input: %git clone --recursive https://github.com/m5stack/M5Stack-IDF.git

      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':
        /Users/<name>/esp/M5Stack-IDF/components/arduino/cores/esp32/libb64/cencode.c:49:20:
        warning: this statement may fall through [-Wimplicit-fallthrough=]
        result = (fragment & 0x003) << 4;
        ~^~~~~~~~~~~~~~~~~~~
        /Users/<name>/esp/M5Stack-IDF/components/arduino/cores/esp32/libb64/cencode.c:52:9:
        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;
        _________________ ^~~~~~~~~~~~~
        __________________rtc_io_desc
        /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?

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        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?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        M 1 Reply Last reply Reply Quote 0
        • S
          sheepDog
          last edited by sheepDog

          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.

          1 Reply Last reply Reply Quote 0
          • B
            brus
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • S
              sheepDog
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • M
                mikemoy @felmue
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post