esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
455 stars 110 forks source link

Add `-c/--chip` argument #514

Closed SergioGasquez closed 7 months ago

SergioGasquez commented 7 months ago

When trying to build a C6 with and passing the --chip esp32h2 arg:

espflash/espflash on  feat/chip-arg [!?] is 📦 v3.0.0-dev via 🦀 v1.76.0-nightly took 7s 
❯ cargo r -r -- flash --monitor --chip esp32h2 esp32h2-app
   Compiling espflash v3.0.0-dev (/home/sergio/Documents/Espressif/forks/espflash/espflash)
    Finished release [optimized] target(s) in 6.84s
     Running `/home/sergio/Documents/Espressif/forks/espflash/target/release/espflash flash --monitor --chip esp32h2 esp32h2`
[2023-11-20T14:16:55Z INFO ] Serial port: '/dev/ttyUSB0'
[2023-11-20T14:16:55Z INFO ] Connecting...
Error: espflash::chip_missmatch

  × Chip provided (esp32h2) with `-c/--chip` does not match the detected chip (esp32c6)
  help: Ensure that the correct chip is selected, or remove the `-c/--chip` option to autodetect the chip