File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
espflash/src/image_format Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -809,13 +809,17 @@ where
809809pub fn check_idf_bootloader ( elf_data : & Vec < u8 > ) -> Result < ( ) > {
810810 let object = File :: parse ( elf_data. as_slice ( ) ) . into_diagnostic ( ) ?;
811811
812- // for unknown reasons a Rust-std project with `strip = true` will discard the
812+ // A project with `strip = true` will discard the
813813 // symbol we are looking for but the section is kept
814814 let has_app_desc = object. symbols ( ) . any ( |sym| sym. name ( ) == Ok ( "esp_app_desc" ) )
815- || object. section_by_name ( ".flash.appdesc" ) . is_some ( ) ;
816- let is_esp_hal = object. section_by_name ( ".espressif.metadata " ) . is_some ( ) ;
815+ || object. section_by_name ( ".flash.appdesc" ) . is_some ( )
816+ || object. section_by_name ( ".rodata_desc " ) . is_some ( ) ;
817817
818818 if !has_app_desc {
819+ // when using `strip = true` we will (maybe wrongly) assume ESP-IDF
820+ // but at least it should still guide the user into the right direction
821+ let is_esp_hal = object. section_by_name ( ".espressif.metadata" ) . is_some ( ) ;
822+
819823 if is_esp_hal {
820824 return Err ( Error :: AppDescriptorNotPresent (
821825 "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
You can’t perform that action at this time.
0 commit comments