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

Add a diagnostic to tell the user about the partition table format #397

Merged
merged 1 commit into from
May 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions espflash/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ pub enum Error {
#[error(
"Supplied ELF image of {0}B is too big, and doesn't fit configured app partition of {1}B"
)]
#[diagnostic(
code(espflash::image_too_big),
help("Reduce the size of the binary or increase the size of the partition."),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would have preferred this to say "increase the size of the app partition", as it's pretty ambiguous now. Will fix it in another PR before release I guess.

url("https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html#built-in-partition-tables")
)]
ElfTooBig(u32, u32),

#[error("Failed to connect to on-device flash")]
Expand Down