Skip to content

Commit 63c3ad4

Browse files
Improve missing app-desc errors (#921)
* feat: Improve missing app-desc errors * feat: Use old error
1 parent c891384 commit 63c3ad4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

espflash/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ pub enum Error {
341341
)]
342342
PartitionTableDoesNotFit(FlashSize),
343343

344-
/// App descriptor not present in binary
344+
/// App descriptor not present in the binary
345345
#[error("{0}")]
346346
#[diagnostic(code(espflash::app_desc::app_descriptor_not_present))]
347347
AppDescriptorNotPresent(String),

espflash/src/image_format/idf.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,15 +815,14 @@ pub fn check_idf_bootloader(elf_data: &Vec<u8>) -> Result<()> {
815815
if !has_app_desc {
816816
if is_esp_hal {
817817
return Err(Error::AppDescriptorNotPresent(
818-
"The app descriptor is not present in the `esp-hal` based project.\n\
819-
You need to add the https://crates.io/crates/esp-bootloader-esp-idf \
820-
to your project."
818+
"ESP-IDF App Descriptor (https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/app_image_format.html#application-description) missing in your`esp-hal` application.\n
819+
You may need to add the `esp_bootloader_esp_idf::esp_app_desc!()` macro to your application, see https://docs.espressif.com/projects/rust/esp-bootloader-esp-idf/latest for more information."
821820
.to_string(),
822821
))
823822
.into_diagnostic();
824823
} else {
825824
return Err(Error::AppDescriptorNotPresent(
826-
"The app descriptor is not present in the `esp-idf` based project.".to_string(),
825+
"ESP-IDF App Descriptor (https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/app_image_format.html#application-description) missing in your`esp-idf` application.".to_string(),
827826
))
828827
.into_diagnostic();
829828
}

0 commit comments

Comments
 (0)