esp-rs / esp-flasher-stub

Rust implementation of flasher stub located in esptool
Apache License 2.0
18 stars 10 forks source link

ESP32-S3 fails to flash when using the UART Port #37

Closed SergioGasquez closed 8 months ago

SergioGasquez commented 8 months ago

Flashing the ESP32-S3-DevKitC-1 fails when using the UART Port with:

    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `espflash flash --monitor target/xtensa-esp32s3-none-elf/debug/s3`
[2023-11-28T08:12:51Z INFO ] Serial port: '/dev/ttyUSB0'
[2023-11-28T08:12:51Z INFO ] Connecting...
[2023-11-28T08:12:51Z INFO ] Using flash stub
[2023-11-28T08:12:52Z WARN ] Setting baud rate higher than 115,200 can cause issues
Error: espflash::timeout

  × Error while connecting to device
  ╰─▶ Timeout while running ChangeBaud command

Using espflash with latest changes on main (0420d79).

jessebraham commented 8 months ago

I've also experienced intermittent timeout issues with some chips. Sorry I have not made notes of this, I will try to collect some data.

dzamlo commented 8 months ago

I can confirm that with the latest version of espflash from git the flash, monitor and board-info all fails with my ESP32-C6.

Using the port marked USB instead of the one marked UART doesn't fix the issue.

Using --no-stub fix the issue.

Using the latest released version instead of the one from git also solve the issue.

jessebraham commented 8 months ago

I can confirm issues flashing the C6 via UART as well. Thanks for the info, we'll look into this. @JurajSadel are you able to take a look at some point please?

jessebraham commented 8 months ago

I've updated the flasher stub to use the latest main branch from esp-hal, and this has at least fixed my connection issues for the ESP32-C6. I will do some more testing to verify that things are working across the board.

I will open a PR with my changes when I have confirmed things are all working.