I am trying to flash my ESP32 board with the demo-js example. I am failing with every example I try so this is not specific to the demo-js.
I am running on Windows 7. I updated my USB driver so that the board is recognized in the mos.exe tool and the COM port appears. I am able to boot up the board and it is running its factory code which changes a LED from green->blue->red->green->repeat. There is also an output to the output window that prints the color - so that all works on the mos.exe tool.
I was able to build the demo-js and even the demo-c codes successfully. But when I try to flash, I get the following error, no matter what I try:
$ mos flash esp32 --port COM6 --esp-baud-rate 921600 Fetching https://github.com/mongoose-os-apps/demo-js/releases/download/2.18.0/demo-js-esp32.zip... done, 1863551 bytes. Loaded demo-js/esp32 version 1.0 (20200820-185447/latest-ge4ecb17-master) Opening COM6 @ 115200... Connecting to ESP32 ROM, attempt 1 of 10... Connected, chip: ESP32-PICO-D4 R0 Running flasher @ 921600... E1222 23:36:29.691382 7964 common.go:73] failed to run flasher @ 921600, falling back to ROM baud rate... Opening COM6 @ 115200... Connecting to ESP32 ROM, attempt 1 of 10... Connected, chip: ESP32-PICO-D2 R0 Running flasher @ 0... Error: /src/cli/flash/esp/flasher/flasher_client.go:264: flasher did not respond /src/cli/flash/esp/flasher/flasher_client.go:126: failed to talk to flasher /src/cli/flash/esp/flasher/flasher_client.go:85: /src/cli/flash/esp/flasher/common.go:78: failed to run flasher /src/cli/flash/esp/flasher/flash.go:76: /src/cli/flash.go:231: /src/cli/main.go:198: flash failed exit status 1 Command completed.