Skip to content

Commit 6d52193

Browse files
authored
Add a diagnostic to tell the user about the partition table format when the image doesn't fit (#397)
1 parent b50f90a commit 6d52193

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

espflash/src/error.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ pub enum Error {
4444
#[error(
4545
"Supplied ELF image of {0}B is too big, and doesn't fit configured app partition of {1}B"
4646
)]
47+
#[diagnostic(
48+
code(espflash::image_too_big),
49+
help("Reduce the size of the binary or increase the size of the partition."),
50+
url("https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html#built-in-partition-tables")
51+
)]
4752
ElfTooBig(u32, u32),
4853

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

0 commit comments

Comments
 (0)