esp-rs / espflash

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

Add an optional `--chip` argument to the `flash` and `write-bin` subcommands #475

Closed jessebraham closed 8 months ago

jessebraham commented 10 months ago

Since we only verify the target device based based on architecture currently, it's possible to eg.) flash a C6 application to the H2, which of course does not work.

We should allow users to optionally specify which chip the target should be, and error out instead of flashing if the detected device does not match. This check does not need to be performed if no chip argument was provided, there's nothing we can do if the application is wrong at this point.