Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge #303
Browse files Browse the repository at this point in the history
303: Don't bail, but only warn if using `--no-flash` with defmt. r=Urhengulas a=Urhengulas

This PR makes `probe-run` not bail when a user uses `defmt` together with the `--no-flash` cli-option, but only emits a warning.

This allows for more felxibility during development, but should only be used when you know what you are doing.

Fixes #298.

Co-authored-by: Johann Hemmann <johann.hemmann@code.berlin>
  • Loading branch information
bors[bot] and Urhengulas authored Feb 22, 2022
2 parents 7f7883d + 695e352 commit 2dde311
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ fn extract_and_print_logs(
.map_or(false, |channel| channel.name() == Some("defmt"));

if use_defmt && opts.no_flash {
bail!(
"attempted to use `--no-flash` and `defmt` logging -- this combination is not allowed. Remove the `--no-flash` flag"
log::warn!(
"You are using `--no-flash` and `defmt` logging -- this combination can lead to malformed defmt data!"
);
} else if use_defmt && elf.defmt_table.is_none() {
bail!("\"defmt\" RTT channel is in use, but the firmware binary contains no defmt data");
Expand Down

0 comments on commit 2dde311

Please # to comment.