Problem uploading firmware to M5Dial

I am trying to make a pendant for my Jackpot controller, using Bart Dring’s design. I am trying to upload the firmware to the M5Dial, but I keep getting com port failures. I have tried several suggestions that I have found on the web, not specifically for the M5Dial, but this hasn’t worked so far.
The terminal log is:

 *  Executing task: C:\Users\alanp\.platformio\penv\Scripts\platformio.exe run --target upload --environment m5dial 

Processing m5dial (platform: espressif32; board: m5stack-stamps3; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-stamps3.html
PLATFORM: Espressif 32 (6.9.0) > M5Stack StampS3
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20017.0 (2.0.17) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- JsonStreamingParser @ 0.0.0+char-1.0.2.sha.846bc19
|-- GrblParser @ 1.0.0+sha.9108f54
|-- M5Unified @ 0.2.0
|-- M5Dial @ 1.0.2
|-- M5GFX @ 0.2.0
|-- LittleFS @ 2.0.0
Building in release mode
Retrieving maximum program size .pio\build\m5dial\firmware.elf
Checking size .pio\build\m5dial\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   8.7% (used 28640 bytes from 327680 bytes)
Flash: [==        ]  18.4% (used 614709 bytes from 3342336 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM7
Uploading .pio\build\m5dial\firmware.bin
esptool.py v4.5.1
Serial port COM7

A fatal error occurred: Could not open COM7, the port doesn't exist
*** [upload] Error 2
============================================================ [FAILED] Took 10.03 seconds ============================================================

Environment    Status    Duration
-------------  --------  ------------
m5dial         FAILED    00:00:10.032
======================================================= 1 failed, 0 succeeded in 00:00:10.032 =======================================================

 *  The terminal process "C:\Users\alanp\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload', '--environment', 'm5dial'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

I have tried changing com port from com 7 to com 2, with the same result.

Does anyone have any suggestions (apart from launching it through the window)?

First thing is to verify the correct com port. It should only appear when the dial is plugged in and disappear when it’s unplugged - is that happening?

Yes, the com port appears when the dial is plugged in. As I stated, I have tried changing the port to port 2, with no difference. I have also tried changing the baud rate of the port from the default 9600 to 115200 with no difference.
As you can see by the terminal log from the upload attempt, it finds the port, then can’t find it

You’re connecting via USB directly to a Windows computer, right? Do you get a notification from Windows that it’s detected a new USB connected device?

I don’t know if the following is applicable, but maybe it could help. I found it on a docs page at m5-docs

“When connecting the Type-C data cable to the computer, you must hold down the G0 button and insert the USB port. After connecting, the software will pop up Found New Device.”

The following illustration was shown:

That sorted it Doug.
Thanks! You’re a star :+1:

1 Like