🤖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.
    • 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
                            • H
                              HaSch
                              last edited by HaSch

                              I FOUND THE SOLUTION!!!
                              After diving into deep of operating system I figured out a possible solution which worked for me:

                              1. I had a usbserial.kext laying in /Library/Extensions/ and I figured out that it was also a WCH driver
                              2. I deleted usbserial.kext and restarted the Mac again => no success
                              3. I deleted CH34xVCPControlDriver.kext and CH34xVCPDriver.kext in /Library/Extensions/ and restarted again
                              4. I installed another driver: FTDIUSBSerialDextInstaller_1_4_7 and had to confirm SIP integrity
                              5. In system preferences -> security I had to enable access for the FTDI driver and saw another process pending named something with Quinheng
                              6. As I remembered that Quinheng has something to do with WCH I ticked this process too and restarted
                              7. I installed CH34xVCPDriver.pkg V1.7 again and restarted => no success
                              8. I plugged in a CH340G device and suddenly a /dev/cu.wchusbserialXXX port appears in my Arduino IDE and is working with my CH9102 device
                              9. Plugging out CH340G device continues /dev/cu.wchusbserialXXX working

                              Hope that this solution will work for other people too!

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