aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/.cargo/config.toml2
-rw-r--r--examples/Cargo.toml4
-rw-r--r--examples/memory.x4
-rw-r--r--examples/src/bin/blink.rs4
4 files changed, 11 insertions, 3 deletions
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 @@
1[target.thumbv8m.main-none-eabihf] 1[target.thumbv8m.main-none-eabihf]
2runner = 'probe-rs run --chip MCXA276 --preverify --verify' 2runner = 'probe-rs run --chip MCXA276 --preverify --verify --protocol swd --speed 12000'
3 3
4rustflags = [ 4rustflags = [
5 "-C", "linker=flip-link", 5 "-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"
19embedded-io-async = "0.6.1" 19embedded-io-async = "0.6.1"
20heapless = "0.9.2" 20heapless = "0.9.2"
21panic-probe = { version = "1.0", features = ["print-defmt"] } 21panic-probe = { version = "1.0", features = ["print-defmt"] }
22
23[profile.release]
24lto = true # better optimizations
25debug = 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 @@
1MEMORY 1MEMORY
2{ 2{
3 FLASH : ORIGIN = 0x20000000, LENGTH = 64K 3 FLASH : ORIGIN = 0x00000000, LENGTH = 1M
4 RAM : ORIGIN = 0x20010000, LENGTH = 64K 4 RAM : ORIGIN = 0x20000000, LENGTH = 128K
5} 5}
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) {
27 init_ostimer0(hal::pac()); 27 init_ostimer0(hal::pac());
28 } 28 }
29 29
30 defmt::info!("Blink example");
31
30 // Initialize embassy-time global driver backed by OSTIMER0 32 // Initialize embassy-time global driver backed by OSTIMER0
31 hal::ostimer::time_driver::init(hal::config::Config::default().time_interrupt_priority, 1_000_000); 33 hal::ostimer::time_driver::init(hal::config::Config::default().time_interrupt_priority, 1_000_000);
32 34
@@ -42,6 +44,8 @@ async fn main(_spawner: Spawner) {
42 // With pauses between letters and words 44 // With pauses between letters and words
43 45
44 loop { 46 loop {
47 defmt::info!("SOS");
48
45 // S: three short blinks 49 // S: three short blinks
46 for _ in 0..3 { 50 for _ in 0..3 {
47 led.set_low(); 51 led.set_low();