Closed codyps closed 1 year ago
I've peeked into this issue, and there is some entangling to solve. Both --erase-parts
and --erase-data-parts
require --partition-table
since in espflash
we dont access the Cargo.toml
, hence we can't read the partition from there. In cargo-espflash
we reuse the FlashArgs
defined in espflash
.
One possible solution would be to remove the requirement of --partition-table
and improve the error message when it's not supplied suggesting that you may have missed adding it.
When passing
--erase-part
tocargo-espflash
for a package that has a partition table in package metadata (ie: inCargo.toml
's[package.metadata.espflash]
section),cargo-espflash
still complains with:Instead of returning an error,
cargo-espflash
should use the partition table provided by the metadata when a partition erase is requested (if that metadata is present for the package used).