mirror of
https://github.com/esp-rs/espflash.git
synced 2026-03-23 15:50:21 +00:00
Make erasing partitions possible when using package metadata, improve error help
This commit is contained in:
committed by
Jesse Braham
parent
33e32c196b
commit
2c00fd1aab
@@ -89,21 +89,10 @@ pub struct FlashArgs {
|
||||
#[arg(long, value_name = "FILE")]
|
||||
pub bootloader: Option<PathBuf>,
|
||||
/// Erase partitions by label
|
||||
#[arg(
|
||||
long,
|
||||
requires = "partition_table",
|
||||
value_name = "LABELS",
|
||||
value_delimiter = ','
|
||||
)]
|
||||
#[arg(long, value_name = "LABELS", value_delimiter = ',')]
|
||||
pub erase_parts: Option<Vec<String>>,
|
||||
/// Erase specified data partitions
|
||||
#[arg(
|
||||
long,
|
||||
requires = "partition_table",
|
||||
value_name = "PARTS",
|
||||
value_enum,
|
||||
value_delimiter = ','
|
||||
)]
|
||||
#[arg(long, value_name = "PARTS", value_enum, value_delimiter = ',')]
|
||||
pub erase_data_parts: Option<Vec<DataType>>,
|
||||
/// Image format to flash
|
||||
#[arg(long, value_enum)]
|
||||
|
||||
@@ -387,8 +387,11 @@ impl From<String> for MissingPartition {
|
||||
}
|
||||
|
||||
#[derive(Debug, Error, Diagnostic)]
|
||||
#[error("No partition table could be found at the specified path")]
|
||||
#[diagnostic(code(espflash::partition_table::missing_partition_table))]
|
||||
#[error("No partition table could be found")]
|
||||
#[diagnostic(
|
||||
code(espflash::partition_table::missing_partition_table),
|
||||
help("Try providing a CSV or binary paritition table with the `--partition-table` argument.")
|
||||
)]
|
||||
pub struct MissingPartitionTable;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
||||
Reference in New Issue
Block a user