esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
455 stars 110 forks source link

error out in some form when no table could be found parsing an elf for defmt #523

Closed Vollbrecht closed 7 months ago

Vollbrecht commented 7 months ago

current behavior just silently does nothing if no table found when user runs espflash like espflash monitor --elf=test --log-format=defmt

offending part https://github.com/esp-rs/espflash/blob/main/espflash/src/cli/monitor/parser/esp_defmt.rs#L88

bugadani commented 7 months ago

defmt also doesn't make sense if there is no elf file specified (or inferred) anyway. So we just shouldn't proceed if the result of load_table is None, and we should probably replace the Option with a Result and meaningful errors.