Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Embed.toml flashing options #2419

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove halt_afterwards
  • Loading branch information
bugadani committed May 2, 2024
commit c38e6081e4824dbe95c972932b3a08799edff306
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