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

    cant flash latest m5 stamp c3

    ESP - IDF
    4
    21
    50.0k
    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.
    • D
      daniyyel
      last edited by

      i CAN flash all other products as long as it's esp32, this one is esp32c3 and failes:

      /vol/src/esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyU1 --before default_reset --after hard_reset --chip esp32c3 erase_flash
      esptool.py v3.2-dev
      Serial port /dev/ttyU1
      Connecting...
      Failed to get PID of a device on /dev/ttyU1, using standard reset sequence.
      ......
      Chip is ESP32-C3 (revision 3)
      Features: Wi-Fi
      Crystal is 40MHz
      MAC: 7c:df:a1:a3:61:74
      Uploading stub...

      A fatal error occurred: Failed to write to target RAM (result was 01070000)

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        I have this issue as well and seams to be a known issues with ESP-IDF.
        Unfortunately there is no UIFlow yet :(

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

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

          Hi guys

          I think it heavily depends on the OS you are using. On my Ubuntu 20.04 desktop installation I have no issues compiling the ESP-IDF blink example and flashing it onto my M5Stamp C3. And as an added bonus Ubuntu even has the proper USB driver pre-installed.

          Thanks
          Felix

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

          D 1 Reply Last reply Reply Quote 0
          • D
            daniyyel @felmue
            last edited by

            @felmue
            thanks for the info, questions:
            1- what version of idf
            2- what baudrate

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

              Hello @daniyyel

              1 - version of IDF: v5.0-dev-268-gf5a2fc578d
              2 - baudrate: 460800

              Thanks
              Felix

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

              1 Reply Last reply Reply Quote 0
              • D
                daniyyel
                last edited by

                after much work, got esp-idf to work on a Mac running Big Sur, and
                get the same error. I'm waiting to receive a esp32c3 not from M5 to see
                if it has the same issues. BTW, espressif is very silent
                bleeding edge of technology :-(

                ajb2k3A 1 Reply Last reply Reply Quote 0
                • ajb2k3A
                  ajb2k3 @daniyyel
                  last edited by

                  @daniyyel said in cant flash latest m5 stamp c3:

                  after much work, got esp-idf to work on a Mac running Big Sur, and
                  get the same error. I'm waiting to receive a esp32c3 not from M5 to see
                  if it has the same issues. BTW, espressif is very silent
                  bleeding edge of technology :-(

                  Its an issue with drivers on OSX and the change in ttl chips.

                  UIFlow, so easy an adult can learn it!
                  If I don't know it, be patient!
                  I've ether not learned it or am too drunk to remember it!
                  Author of the WIP UIFlow Handbook!
                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                  1 Reply Last reply Reply Quote 0
                  • D
                    daniyyel
                    last edited by

                    indeed, using different ttl-to-usb I managed to flash it. Had to manually
                    enter load mode (grounding pin 9) and now all is ok.
                    thanks

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      HaSch @daniyyel
                      last edited by

                      @daniyyel said in cant flash latest m5 stamp c3:

                      indeed, using different ttl-to-usb I managed to flash it. Had to manually
                      enter load mode (grounding pin 9) and now all is ok.
                      thanks

                      What ttl2usb driver did you use?

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

                        Hi guys

                        I've just tried flashing my M5StampC3 through its built-in USB. Worked like a charm.

                        Note: I am using Ubuntu 20.04 so your mileage might vary.

                        Thanks
                        Felix

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

                        H 1 Reply Last reply Reply Quote 0
                        • H
                          HaSch @felmue
                          last edited by

                          @felmue said in cant flash latest m5 stamp c3:

                          I've just tried flashing my M5StampC3 through its built-in USB. Worked like a charm.

                          I have no chance to flash any file:

                          esptool.py v3.1
                          Serial port /dev/cu.usbmodem53220362951
                          Connecting....
                          Chip is unknown ESP32-C3 (revision 3)
                          Features: Wi-Fi
                          Crystal is 40MHz
                          MAC: 34:b4:72:12:9b:ac
                          Uploading stub...

                          A fatal error occurred: Failed to write to target RAM (result was 01070000)
                          A fatal error occurred: Failed to write to target RAM (result was 01070000)

                          Is there a usb driver missing? How to get and install?

                          BR,
                          Hans

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

                            Hello @HaSch

                            sorry, I don't know if you're missing a driver or not. On Ubuntu 20.04 there was no need to install a driver. Whatever is required seems to already be included in the stock version of Ubuntu 20.04.

                            I was wondering, in your case it fails while 'Uploading stub' which as I understand is not necessarily needed. In menuconfig there is an option Serial flasher config - Disable download stub which by default is unchecked. Maybe try to disable the downloading of the stub and see if that gets you any further.

                            BTW: what operation system and version are you using? Window? MacOS?

                            Thanks
                            Felix

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

                            H 1 Reply Last reply Reply Quote 0
                            • H
                              HaSch @felmue
                              last edited by HaSch

                              @felmue said in cant flash latest m5 stamp c3:

                              I was wondering, in your case it fails while 'Uploading stub' which as I understand is not necessarily needed. In menuconfig there is an option Serial flasher config - Disable download stub which by default is unchecked. Maybe try to disable the downloading of the stub and see if that gets you any further.

                              I'm sorry, I'm using Arduino IDE and there is no menuconfig. But I have "USB CDC On Boot". Should it be enable or disable? I'm on a Mac with MacOS 10.15.7 Catalina.

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

                                Hello @HaSch

                                well, disabling downloading the stub doesn't help anyway - so my idea is moot. I've just setup a machine with macOS Big Sur 11.5.2 and with or w/o downloading the stub the download process ends in an timeout error.

                                What worked for me on macOS Big Sur 11.5.2 however is using the ESP32C3 built-in USB via GPIO18 and GPIO19.

                                Thanks
                                Felix

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

                                H 1 Reply Last reply Reply Quote 0
                                • H
                                  HaSch @felmue
                                  last edited by

                                  @felmue said in cant flash latest m5 stamp c3:

                                  Hello @HaSch

                                  well, disabling downloading the stub doesn't help anyway - so my idea is moot. I've just setup a machine with macOS Big Sur 11.5.2 and with or w/o downloading the stub the download process ends in an timeout error.

                                  What worked for me on macOS Big Sur 11.5.2 however is using the ESP32C3 built-in USB via GPIO18 and GPIO19.

                                  Thanks
                                  Felix

                                  It really seems to be an issue with USB serial driver. I also tried to download and install the CH9102_VCP_SER_MacOS driver from here without success. Trying to install to my MacOS 10.15.7 Catalina ends up with an error:

                                  安装提示
                                  sysex didFailWithError The operation couldn’t be completed. (OSSystemExtensionErrorDomain error 9.)

                                  1 Reply Last reply Reply Quote 0
                                  • H
                                    HaSch
                                    last edited by

                                    @felmue said in cant flash latest m5 stamp c3:

                                    What worked for me on macOS Big Sur 11.5.2 however is using the ESP32C3 built-in USB via GPIO18 and GPIO19.

                                    I urgently need a working driver for m5stamp c3 for MacOS 10.15.7 Catalina. I tried to get it work via GPIO18 and GPIO19 but don't know how because there is no driver for that on my system. Using USB-C ist throwing the known error because of the wrong or incomplete driver. Even downloading and installing the suggested driver didn't solve the problem.

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

                                      Hello @HaSch

                                      sorry, I cannot help you with macOS 10.15.7 Catalina. I don't own any Apple hardware recent enough to run that version of macOS. Do you have access to another computer?

                                      Thanks
                                      Felix

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

                                      1 Reply Last reply Reply Quote 0
                                      • ajb2k3A
                                        ajb2k3 @HaSch
                                        last edited by

                                        @hasch said in cant flash latest m5 stamp c3:

                                        @felmue said in cant flash latest m5 stamp c3:

                                        What worked for me on macOS Big Sur 11.5.2 however is using the ESP32C3 built-in USB via GPIO18 and GPIO19.

                                        I urgently need a working driver for m5stamp c3 for MacOS 10.15.7 Catalina. I tried to get it work via GPIO18 and GPIO19 but don't know how because there is no driver for that on my system. Using USB-C ist throwing the known error because of the wrong or incomplete driver. Even downloading and installing the suggested driver didn't solve the problem.

                                        Catalina is bugged since Apple released the OSX update, you need a full OSX update to 10.16 or try another TTL USB to UART adapter.

                                        UIFlow, so easy an adult can learn it!
                                        If I don't know it, be patient!
                                        I've ether not learned it or am too drunk to remember it!
                                        Author of the WIP UIFlow Handbook!
                                        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                                        H 1 Reply Last reply Reply Quote 0
                                        • H
                                          HaSch @ajb2k3
                                          last edited by

                                          @ajb2k3 said in cant flash latest m5 stamp c3:

                                          or try another TTL USB to UART adapter

                                          It's the built in adapter of M5Stamp C3!

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

                                            Hello @ajb2k3

                                            As an experiment I've tried to use another TTL USB UART adapter as you suggested, but it did not work. I suspect the adapter built into the C3 is interfering with some data lines.

                                            Did you have success with another TTL USB UART adapter? If yes, how did you wire it?

                                            Thanks
                                            Felix

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

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