From bf3ae8e4d69ef2e2ecfdf0b48734d9c91637eb16 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Mon, 17 Nov 2025 16:27:39 -0800 Subject: Let HAL build in isolation (#21) * Revert "chore(deps): bump embedded-io-async from 0.6.1 to 0.7.0 (#17)" This reverts commit 011c3b2de9361496faa0eea75ae19a77f2698f88. * Let HAL build in isolation while at that, also remove bogus dependency on embassy-executor. Signed-off-by: Felipe Balbi * Certify syn 2.0.110 Signed-off-by: Felipe Balbi --------- Signed-off-by: Felipe Balbi --- examples/Cargo.lock | 1 - 1 file changed, 1 deletion(-) (limited to 'examples') diff --git a/examples/Cargo.lock b/examples/Cargo.lock index b774aff97..b2ac9a051 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -240,7 +240,6 @@ dependencies = [ "critical-section", "defmt", "embassy-embedded-hal", - "embassy-executor", "embassy-hal-internal", "embassy-sync", "embassy-time", -- cgit From 62e297c130ac26afe4d7d5752bb79709bd370e39 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Mon, 17 Nov 2025 16:34:11 -0800 Subject: Allow writing binary to flash (#20) Turns out probe-rs works out of the box. Signed-off-by: Felipe Balbi --- examples/.cargo/config.toml | 2 +- examples/Cargo.toml | 4 ++++ examples/memory.x | 4 ++-- examples/src/bin/blink.rs | 4 ++++ 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/.cargo/config.toml b/examples/.cargo/config.toml index ecb11be64..aedc55b06 100644 --- a/examples/.cargo/config.toml +++ b/examples/.cargo/config.toml @@ -1,5 +1,5 @@ [target.thumbv8m.main-none-eabihf] -runner = 'probe-rs run --chip MCXA276 --preverify --verify' +runner = 'probe-rs run --chip MCXA276 --preverify --verify --protocol swd --speed 12000' rustflags = [ "-C", "linker=flip-link", diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 6b100de42..d03d3d95c 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -19,3 +19,7 @@ embassy-time-driver = "0.2.1" embedded-io-async = "0.6.1" heapless = "0.9.2" panic-probe = { version = "1.0", features = ["print-defmt"] } + +[profile.release] +lto = true # better optimizations +debug = 2 # enough information for defmt/rtt locations diff --git a/examples/memory.x b/examples/memory.x index f4263a412..315ced58a 100644 --- a/examples/memory.x +++ b/examples/memory.x @@ -1,5 +1,5 @@ MEMORY { - FLASH : ORIGIN = 0x20000000, LENGTH = 64K - RAM : ORIGIN = 0x20010000, LENGTH = 64K + FLASH : ORIGIN = 0x00000000, LENGTH = 1M + RAM : ORIGIN = 0x20000000, LENGTH = 128K } diff --git a/examples/src/bin/blink.rs b/examples/src/bin/blink.rs index d8a57c546..c36fc9421 100644 --- a/examples/src/bin/blink.rs +++ b/examples/src/bin/blink.rs @@ -27,6 +27,8 @@ async fn main(_spawner: Spawner) { init_ostimer0(hal::pac()); } + defmt::info!("Blink example"); + // Initialize embassy-time global driver backed by OSTIMER0 hal::ostimer::time_driver::init(hal::config::Config::default().time_interrupt_priority, 1_000_000); @@ -42,6 +44,8 @@ async fn main(_spawner: Spawner) { // With pauses between letters and words loop { + defmt::info!("SOS"); + // S: three short blinks for _ in 0..3 { led.set_low(); -- cgit