cant flash latest m5 stamp c3



  • 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



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



  • Hello @daniyyel

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

    Thanks
    Felix



  • 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 :-(



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



  • 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



  • @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?



  • 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



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



  • 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



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



  • 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



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



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



  • 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



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



  • @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!



  • 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