After trying cargo run
with my Olimex ESP32-C3 board I can't flash it anymore. I tried on 2 different boards and bricked them both when I've been flashing fine all day. Logs below are from consecutive flash attempts.
And ideas what's wrong and how to fix it?
[shane@fedora-2 esp32c3-ota-experiment]$ espflash /dev/ttyACM0 target/riscv32imac-unknown-none-elf/debug/esp32c3_ota_experiment
New version of espflash is available: v2.0.0-rc.1
Serial port: /dev/ttyACM0
Connecting...
Chip type: ESP32-C3 (revision 3)
Crystal frequency: 40MHz
Flash size: 4MB
Features: WiFi
MAC address: a0:76:4e:45:a2:6c
App/part. size: 821520/4128768 bytes, 19.90%
[00:00:00] ######################################## 12/12 segment 0x0
[00:00:00] ######################################## 1/1 segment 0x8000
[00:00:08] ######################################## 387/387 segment 0x10000
Flashing has completed!
[shane@fedora-2 esp32c3-ota-experiment]$ cargo run
Compiling esp32c3-hal v0.2.0
Compiling esp-wifi v0.1.0 (https://github.com/esp-rs/esp-wifi.git#911fa25e)
Compiling esp32c3_ota_experiment v0.1.0 (/home/shane/Desktop/Rust/esp32_rust/esp32_c3_project/esp32c3-ota-experiment)
warning: associated function `free` is never used
--> src/ota.rs:33:12
|
33 | pub fn free(self) {}
| ^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: variant `Err` is never constructed
--> src/tiny_http.rs:76:5
|
72 | pub enum PollResult {
| ---------- variant in this enum
...
76 | Err,
| ^^^
|
= note: `PollResult` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
warning: `esp32c3_ota_experiment` (bin "esp32c3_ota_experiment") generated 2 warnings
Finished dev [unoptimized + debuginfo] target(s) in 2.03s
Running `espflash --speed 921600 --bootloader bootloader.bin --partition-table partitions.csv --monitor target/riscv32imac-unknown-none-elf/debug/esp32c3_ota_experiment`
New version of espflash is available: v2.0.0-rc.1
Serial port: /dev/ttyACM0
Connecting...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Error: espflash::connection_failed
× Error while connecting to device
╰─▶ Failed to connect to the device
help: Ensure that the device is connected and the reset and boot pins are not being held down
[shane@fedora-2 esp32c3-ota-experiment]$ espflash /dev/ttyACM0 target/riscv32imac-unknown-none-elf/debug/esp32c3_ota_experiment
New version of espflash is available: v2.0.0-rc.1
Serial port: /dev/ttyACM0
Connecting...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Error: espflash::connection_failed
× Error while connecting to device
╰─▶ Failed to connect to the device
help: Ensure that the device is connected and the reset and boot pins are not being held down
[shane@fedora-2 esp32c3-ota-experiment]$ espflash /dev/ttyACM0 target/riscv32imac-unknown-none-elf/debug/esp32c3_ota_experiment
New version of espflash is available: v2.0.0-rc.1
Error: espflash::connection_failed
× Error while connecting to device
╰─▶ Serial port not found
help: Ensure that the device is connected and your host recognizes the serial adapter
[shane@fedora-2 esp32c3-ota-experiment]$ espflash /dev/ttyACM0 target/riscv32imac-unknown-none-elf/debug/esp32c3_ota_experiment
New version of espflash is available: v2.0.0-rc.1
Serial port: /dev/ttyACM0
Connecting...
Matched SerialPortType::Unknown
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Unable to connect, retrying with default delay...
Unable to connect, retrying with extra delay...
Error: espflash::connection_failed
× Error while connecting to device
╰─▶ Failed to connect to the device
help: Ensure that the device is connected and the reset and boot pins are not being held down