Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo-espflash's --erase-part option requires --partition-table even when the partition table is set via metadata #390

Closed
codyps opened this issue Apr 20, 2023 · 1 comment · Fixed by #413
Assignees
Labels
bug Something isn't working
Milestone

Comments

@codyps
Copy link

codyps commented Apr 20, 2023

When passing --erase-part to cargo-espflash for a package that has a partition table in package metadata (ie: in Cargo.toml's [package.metadata.espflash] section), cargo-espflash still complains with:

error: the following required arguments were not provided:
  --partition-table <FILE>

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).

@jessebraham jessebraham added the bug Something isn't working label Apr 20, 2023
@jessebraham jessebraham added this to the v2 milestone Apr 20, 2023
@SergioGasquez
Copy link
Member

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.

  • This would mean the error occurs when trying to erase the partitions and not when checking the cli args like right now.
  • Not a really clean approach for the above reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants