Skip to content

Commit

Permalink
Remove halt_afterwards
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed May 2, 2024
1 parent 6788471 commit c38e608
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions changelog/removed-halt_afterwards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed `halt_afterwards` from Embed.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ protocol = "Swd"
[default.flashing]
# Whether or not the target should be flashed.
enabled = true
# Whether or not the target should be halted after reset.
# DEPRECATED, moved to reset section
halt_afterwards = false
# Whether or not bytes erased but not rewritten with data from the ELF
# should be restored with their contents before erasing.
restore_unwritten_bytes = false
Expand Down
5 changes: 0 additions & 5 deletions probe-rs-tools/src/bin/probe-rs/cmd/cargo_embed/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ pub struct Probe {
#[serde(deny_unknown_fields)]
pub struct Flashing {
pub enabled: bool,
#[deprecated(
since = "0.9.0",
note = "The 'halt_afterwards' key has moved to the 'reset' section"
)]
pub halt_afterwards: bool,
pub restore_unwritten_bytes: bool,
pub flash_layout_output_path: Option<String>,
pub do_chip_erase: bool,
Expand Down
9 changes: 1 addition & 8 deletions probe-rs-tools/src/bin/probe-rs/cmd/cargo_embed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,7 @@ fn main_try(mut args: Vec<OsString>, offset: UtcOffset) -> Result<()> {
if config.reset.enabled {
let mut core = session.core(core_id)?;
let halt_timeout = Duration::from_millis(500);
#[allow(deprecated)] // Remove in 0.10
if config.flashing.halt_afterwards {
logging::eprintln(format!(
" {} The 'flashing.halt_afterwards' option in the config has moved to the 'reset' section",
"Warning".yellow().bold()
));
core.reset_and_halt(halt_timeout)?;
} else if config.reset.halt_afterwards {
if config.reset.halt_afterwards {
core.reset_and_halt(halt_timeout)?;
} else {
core.reset()?;
Expand Down

0 comments on commit c38e608

Please sign in to comment.