From e40346a54495e2cf2de6cf45c8c6e87bb634165f Mon Sep 17 00:00:00 2001 From: dskleingeld <11743287+dskleingeld@users.noreply.github.com> Date: Sun, 2 May 2021 20:58:01 +0200 Subject: [PATCH] Fix core::panic! not printing in examples (#153) * fixes panic not showing in examples removes panic_immediate_abort feature where present, renames config -> config.toml, enables panic-probe defmt printing feature and updates panic-probe to 0.2 * fix unintended changes in build_core and arch * revert uninteded change --- embassy-nrf-examples/.cargo/{config => config.toml} | 2 -- embassy-nrf-examples/Cargo.toml | 4 ++-- embassy-rp-examples/.cargo/{config => config.toml} | 1 - embassy-rp-examples/Cargo.toml | 4 ++-- embassy-stm32-examples/.cargo/{config => config.toml} | 0 embassy-stm32-examples/Cargo.toml | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) rename embassy-nrf-examples/.cargo/{config => config.toml} (90%) rename embassy-rp-examples/.cargo/{config => config.toml} (90%) rename embassy-stm32-examples/.cargo/{config => config.toml} (100%) diff --git a/embassy-nrf-examples/.cargo/config b/embassy-nrf-examples/.cargo/config.toml similarity index 90% rename from embassy-nrf-examples/.cargo/config rename to embassy-nrf-examples/.cargo/config.toml index 17b9c8d8..1dbeb002 100644 --- a/embassy-nrf-examples/.cargo/config +++ b/embassy-nrf-examples/.cargo/config.toml @@ -1,6 +1,5 @@ [unstable] build-std = ["core"] -build-std-features = ["panic_immediate_abort"] [target.'cfg(all(target_arch = "arm", target_os = "none"))'] runner = "probe-run --chip nRF52840_xxAA" @@ -19,4 +18,3 @@ rustflags = [ [build] target = "thumbv7em-none-eabi" - diff --git a/embassy-nrf-examples/Cargo.toml b/embassy-nrf-examples/Cargo.toml index 2a5b52dd..29614f13 100644 --- a/embassy-nrf-examples/Cargo.toml +++ b/embassy-nrf-examples/Cargo.toml @@ -27,5 +27,5 @@ defmt-rtt = "0.2.0" cortex-m = { version = "0.7.1", features = ["inline-asm"] } cortex-m-rt = "0.6.13" embedded-hal = { version = "0.2.4" } -panic-probe = "0.1.0" -futures = { version = "0.3.8", default-features = false, features = ["async-await"] } \ No newline at end of file +panic-probe = { version = "0.2.0", features = ["print-defmt"] } +futures = { version = "0.3.8", default-features = false, features = ["async-await"] } diff --git a/embassy-rp-examples/.cargo/config b/embassy-rp-examples/.cargo/config.toml similarity index 90% rename from embassy-rp-examples/.cargo/config rename to embassy-rp-examples/.cargo/config.toml index 8db64154..1bbbe97d 100644 --- a/embassy-rp-examples/.cargo/config +++ b/embassy-rp-examples/.cargo/config.toml @@ -1,6 +1,5 @@ [unstable] build-std = ["core"] -build-std-features = ["panic_immediate_abort"] [target.'cfg(all(target_arch = "arm", target_os = "none"))'] runner = "probe-run-rp --chip RP2040" diff --git a/embassy-rp-examples/Cargo.toml b/embassy-rp-examples/Cargo.toml index dae22f80..2cee99bc 100644 --- a/embassy-rp-examples/Cargo.toml +++ b/embassy-rp-examples/Cargo.toml @@ -28,5 +28,5 @@ defmt-rtt = "0.2.0" cortex-m = { version = "0.7.1", features = ["inline-asm"] } cortex-m-rt = "0.6.13" embedded-hal = { version = "0.2.4" } -panic-probe = "0.1.0" -futures = { version = "0.3.8", default-features = false, features = ["async-await", "cfg-target-has-atomic", "unstable"] } \ No newline at end of file +panic-probe = { version = "0.2.0", features = ["print-defmt"] } +futures = { version = "0.3.8", default-features = false, features = ["async-await", "cfg-target-has-atomic", "unstable"] } diff --git a/embassy-stm32-examples/.cargo/config b/embassy-stm32-examples/.cargo/config.toml similarity index 100% rename from embassy-stm32-examples/.cargo/config rename to embassy-stm32-examples/.cargo/config.toml diff --git a/embassy-stm32-examples/Cargo.toml b/embassy-stm32-examples/Cargo.toml index f12ed910..bdb1ca84 100644 --- a/embassy-stm32-examples/Cargo.toml +++ b/embassy-stm32-examples/Cargo.toml @@ -46,7 +46,7 @@ defmt-rtt = "0.2.0" cortex-m = "0.7.1" cortex-m-rt = "0.6.13" embedded-hal = { version = "0.2.4" } -panic-probe = "0.1.0" +panic-probe = { version = "0.2.0", features = ["print-defmt"] } futures = { version = "0.3.8", default-features = false, features = ["async-await"] } rtt-target = { version = "0.3", features = ["cortex-m"] } bxcan = "0.5.0"