aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBjorn <[email protected]>2024-04-20 22:12:28 -0700
committerBjorn <[email protected]>2024-04-20 22:12:28 -0700
commit7658966486c44fa919124ce9261b0a3f00e8fc61 (patch)
tree0741169b7a3ec81be4b7687c3ceb7820e3b37dfe /examples
parent0a2d58ec5b8d1d7663108ebb4add02083222874b (diff)
parentda86c086510490602ffdd688760fb59cc7a1e524 (diff)
Merge branch 'main' of https://github.com/embassy-rs/embassy
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32f334/.cargo/config.toml2
-rw-r--r--examples/stm32l4/.cargo/config.toml2
-rw-r--r--examples/stm32u0/Cargo.toml6
-rw-r--r--examples/stm32u0/src/bin/adc.rs30
-rw-r--r--examples/stm32u0/src/bin/crc.rs31
-rw-r--r--examples/stm32u0/src/bin/dac.rs35
-rw-r--r--examples/stm32u0/src/bin/flash.rs43
-rw-r--r--examples/stm32u0/src/bin/i2c.rs21
-rw-r--r--examples/stm32u0/src/bin/rng.rs43
-rw-r--r--examples/stm32u0/src/bin/rtc.rs49
-rw-r--r--examples/stm32u0/src/bin/spi.rs30
-rw-r--r--examples/stm32u0/src/bin/usart.rs25
-rw-r--r--examples/stm32u0/src/bin/usb_serial.rs109
-rw-r--r--examples/stm32u0/src/bin/wdt.rs41
-rw-r--r--examples/stm32wb/.cargo/config.toml2
15 files changed, 465 insertions, 4 deletions
diff --git a/examples/stm32f334/.cargo/config.toml b/examples/stm32f334/.cargo/config.toml
index caf947be6..f38c90a31 100644
--- a/examples/stm32f334/.cargo/config.toml
+++ b/examples/stm32f334/.cargo/config.toml
@@ -1,6 +1,6 @@
1[target.'cfg(all(target_arch = "arm", target_os = "none"))'] 1[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2# replace STM32F429ZITx with your chip as listed in `probe-rs-cli chip list` 2# replace STM32F429ZITx with your chip as listed in `probe-rs-cli chip list`
3runner = "probe-run --chip STM32F334R8" 3runner = "probe-rs run --chip STM32F334R8"
4 4
5[build] 5[build]
6target = "thumbv7em-none-eabihf" 6target = "thumbv7em-none-eabihf"
diff --git a/examples/stm32l4/.cargo/config.toml b/examples/stm32l4/.cargo/config.toml
index db3a7ceff..83fc6d6f8 100644
--- a/examples/stm32l4/.cargo/config.toml
+++ b/examples/stm32l4/.cargo/config.toml
@@ -2,7 +2,7 @@
2# replace STM32F429ZITx with your chip as listed in `probe-rs chip list` 2# replace STM32F429ZITx with your chip as listed in `probe-rs chip list`
3#runner = "probe-rs run --chip STM32L475VGT6" 3#runner = "probe-rs run --chip STM32L475VGT6"
4#runner = "probe-rs run --chip STM32L475VG" 4#runner = "probe-rs run --chip STM32L475VG"
5runner = "probe-run --chip STM32L4S5QI" 5runner = "probe-rs run --chip STM32L4S5QI"
6 6
7[build] 7[build]
8target = "thumbv7em-none-eabi" 8target = "thumbv7em-none-eabi"
diff --git a/examples/stm32u0/Cargo.toml b/examples/stm32u0/Cargo.toml
index 495be3e75..5868372dd 100644
--- a/examples/stm32u0/Cargo.toml
+++ b/examples/stm32u0/Cargo.toml
@@ -6,10 +6,11 @@ license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8# Change stm32u083rc to your chip name, if necessary. 8# Change stm32u083rc to your chip name, if necessary.
9embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32u083rc", "memory-x", "unstable-pac", "exti"] } 9embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32u083rc", "memory-x", "unstable-pac", "exti", "chrono"] }
10embassy-sync = { version = "0.5.0", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.5.0", path = "../../embassy-sync", features = ["defmt"] }
11embassy-executor = { version = "0.5.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.5.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 12embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
13embassy-usb = { version = "0.1.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] }
13 14
14defmt = "0.3" 15defmt = "0.3"
15defmt-rtt = "0.4" 16defmt-rtt = "0.4"
@@ -21,5 +22,8 @@ panic-probe = { version = "0.3", features = ["print-defmt"] }
21futures = { version = "0.3.17", default-features = false, features = ["async-await"] } 22futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
22heapless = { version = "0.8", default-features = false } 23heapless = { version = "0.8", default-features = false }
23 24
25micromath = "2.0.0"
26chrono = { version = "0.4.38", default-features = false }
27
24[profile.release] 28[profile.release]
25debug = 2 29debug = 2
diff --git a/examples/stm32u0/src/bin/adc.rs b/examples/stm32u0/src/bin/adc.rs
new file mode 100644
index 000000000..4410448f1
--- /dev/null
+++ b/examples/stm32u0/src/bin/adc.rs
@@ -0,0 +1,30 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_stm32::adc::{Adc, Resolution};
6use embassy_stm32::Config;
7use embassy_time::Duration;
8use {defmt_rtt as _, panic_probe as _};
9
10#[cortex_m_rt::entry]
11fn main() -> ! {
12 info!("Hello World!");
13
14 let mut config = Config::default();
15 {
16 use embassy_stm32::rcc::*;
17 config.rcc.mux.adcsel = mux::Adcsel::SYS;
18 }
19 let p = embassy_stm32::init(config);
20
21 let mut adc = Adc::new(p.ADC1);
22 adc.set_resolution(Resolution::BITS8);
23 let mut channel = p.PC0;
24
25 loop {
26 let v = adc.read(&mut channel);
27 info!("--> {}", v);
28 embassy_time::block_for(Duration::from_millis(200));
29 }
30}
diff --git a/examples/stm32u0/src/bin/crc.rs b/examples/stm32u0/src/bin/crc.rs
new file mode 100644
index 000000000..d1b545d5b
--- /dev/null
+++ b/examples/stm32u0/src/bin/crc.rs
@@ -0,0 +1,31 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_executor::Spawner;
6use embassy_stm32::crc::{Config, Crc, InputReverseConfig, PolySize};
7use {defmt_rtt as _, panic_probe as _};
8
9#[embassy_executor::main]
10async fn main(_spawner: Spawner) {
11 let p = embassy_stm32::init(Default::default());
12 info!("Hello World!");
13
14 // Setup for: https://crccalc.com/?crc=Life, it never dieWomen are my favorite guy&method=crc32&datatype=ascii&outtype=0
15 let mut crc = Crc::new(
16 p.CRC,
17 unwrap!(Config::new(
18 InputReverseConfig::Byte,
19 true,
20 PolySize::Width32,
21 0xFFFFFFFF,
22 0x04C11DB7
23 )),
24 );
25
26 let output = crc.feed_bytes(b"Life, it never die\nWomen are my favorite guy") ^ 0xFFFFFFFF;
27
28 defmt::assert_eq!(output, 0x33F0E26B);
29
30 cortex_m::asm::bkpt();
31}
diff --git a/examples/stm32u0/src/bin/dac.rs b/examples/stm32u0/src/bin/dac.rs
new file mode 100644
index 000000000..fdbf1d374
--- /dev/null
+++ b/examples/stm32u0/src/bin/dac.rs
@@ -0,0 +1,35 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_stm32::dac::{DacCh1, Value};
6use embassy_stm32::dma::NoDma;
7use {defmt_rtt as _, panic_probe as _};
8
9#[cortex_m_rt::entry]
10fn main() -> ! {
11 let p = embassy_stm32::init(Default::default());
12 info!("Hello World!");
13
14 let mut dac = DacCh1::new(p.DAC1, NoDma, p.PA4);
15
16 loop {
17 for v in 0..=255 {
18 dac.set(Value::Bit8(to_sine_wave(v)));
19 }
20 }
21}
22
23use micromath::F32Ext;
24
25fn to_sine_wave(v: u8) -> u8 {
26 if v >= 128 {
27 // top half
28 let r = 3.14 * ((v - 128) as f32 / 128.0);
29 (r.sin() * 128.0 + 127.0) as u8
30 } else {
31 // bottom half
32 let r = 3.14 + 3.14 * (v as f32 / 128.0);
33 (r.sin() * 128.0 + 127.0) as u8
34 }
35}
diff --git a/examples/stm32u0/src/bin/flash.rs b/examples/stm32u0/src/bin/flash.rs
new file mode 100644
index 000000000..01b80a76b
--- /dev/null
+++ b/examples/stm32u0/src/bin/flash.rs
@@ -0,0 +1,43 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_executor::Spawner;
6use embassy_stm32::flash::Flash;
7use {defmt_rtt as _, panic_probe as _};
8
9#[embassy_executor::main]
10async fn main(_spawner: Spawner) {
11 let p = embassy_stm32::init(Default::default());
12 info!("Hello World!");
13
14 let addr: u32 = 0x40000 - 2 * 1024;
15
16 let mut f = Flash::new_blocking(p.FLASH).into_blocking_regions().bank1_region;
17
18 info!("Reading...");
19 let mut buf = [0u8; 32];
20 unwrap!(f.blocking_read(addr, &mut buf));
21 info!("Read: {=[u8]:x}", buf);
22 info!("Erasing...");
23 unwrap!(f.blocking_erase(addr, addr + 2 * 1024));
24
25 info!("Reading...");
26 let mut buf = [0u8; 32];
27 unwrap!(f.blocking_read(addr, &mut buf));
28 info!("Read after erase: {=[u8]:x}", buf);
29
30 info!("Writing...");
31 unwrap!(f.blocking_write(
32 addr,
33 &[
34 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
35 30, 31, 32
36 ]
37 ));
38
39 info!("Reading...");
40 let mut buf = [0u8; 32];
41 unwrap!(f.blocking_read(addr, &mut buf));
42 info!("Read: {=[u8]:x}", buf);
43}
diff --git a/examples/stm32u0/src/bin/i2c.rs b/examples/stm32u0/src/bin/i2c.rs
new file mode 100644
index 000000000..2861bc091
--- /dev/null
+++ b/examples/stm32u0/src/bin/i2c.rs
@@ -0,0 +1,21 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_executor::Spawner;
6use embassy_stm32::i2c::I2c;
7use embassy_stm32::time::Hertz;
8use {defmt_rtt as _, panic_probe as _};
9
10const ADDRESS: u8 = 0x5F;
11const WHOAMI: u8 = 0x0F;
12
13#[embassy_executor::main]
14async fn main(_spawner: Spawner) {
15 let p = embassy_stm32::init(Default::default());
16 let mut i2c = I2c::new_blocking(p.I2C2, p.PB10, p.PB11, Hertz(100_000), Default::default());
17
18 let mut data = [0u8; 1];
19 unwrap!(i2c.blocking_write_read(ADDRESS, &[WHOAMI], &mut data));
20 info!("Whoami: {}", data[0]);
21}
diff --git a/examples/stm32u0/src/bin/rng.rs b/examples/stm32u0/src/bin/rng.rs
new file mode 100644
index 000000000..89445b042
--- /dev/null
+++ b/examples/stm32u0/src/bin/rng.rs
@@ -0,0 +1,43 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_executor::Spawner;
6use embassy_stm32::rcc::mux::Clk48sel;
7use embassy_stm32::rng::Rng;
8use embassy_stm32::{bind_interrupts, peripherals, rng, Config};
9use {defmt_rtt as _, panic_probe as _};
10
11bind_interrupts!(struct Irqs {
12 RNG_CRYP => rng::InterruptHandler<peripherals::RNG>;
13});
14
15#[embassy_executor::main]
16async fn main(_spawner: Spawner) {
17 let mut config = Config::default();
18 {
19 use embassy_stm32::rcc::*;
20 config.rcc.hsi = true;
21 config.rcc.pll = Some(Pll {
22 source: PllSource::HSI, // 16 MHz
23 prediv: PllPreDiv::DIV1,
24 mul: PllMul::MUL7, // 16 * 7 = 112 MHz
25 divp: None,
26 divq: None,
27 divr: Some(PllRDiv::DIV2), // 112 / 2 = 56 MHz
28 });
29 config.rcc.sys = Sysclk::PLL1_R;
30 config.rcc.hsi48 = Some(Hsi48Config { sync_from_usb: false }); // needed for RNG
31 config.rcc.mux.clk48sel = Clk48sel::HSI48; // needed for RNG (or use MSI or PLLQ if you want)
32 }
33
34 let p = embassy_stm32::init(config);
35
36 info!("Hello World!");
37
38 let mut rng = Rng::new(p.RNG, Irqs);
39
40 let mut buf = [0u8; 16];
41 unwrap!(rng.async_fill_bytes(&mut buf).await);
42 info!("random bytes: {:02x}", buf);
43}
diff --git a/examples/stm32u0/src/bin/rtc.rs b/examples/stm32u0/src/bin/rtc.rs
new file mode 100644
index 000000000..72fa0fde4
--- /dev/null
+++ b/examples/stm32u0/src/bin/rtc.rs
@@ -0,0 +1,49 @@
1#![no_std]
2#![no_main]
3
4use chrono::{NaiveDate, NaiveDateTime};
5use defmt::*;
6use embassy_executor::Spawner;
7use embassy_stm32::rtc::{Rtc, RtcConfig};
8use embassy_stm32::Config;
9use embassy_time::Timer;
10use {defmt_rtt as _, panic_probe as _};
11
12#[embassy_executor::main]
13async fn main(_spawner: Spawner) {
14 let mut config = Config::default();
15 {
16 use embassy_stm32::rcc::*;
17 config.rcc.sys = Sysclk::PLL1_R;
18 config.rcc.hsi = true;
19 config.rcc.pll = Some(Pll {
20 source: PllSource::HSI, // 16 MHz
21 prediv: PllPreDiv::DIV1,
22 mul: PllMul::MUL7, // 16 * 7 = 112 MHz
23 divp: None,
24 divq: None,
25 divr: Some(PllRDiv::DIV2), // 112 / 2 = 56 MHz
26 });
27 config.rcc.ls = LsConfig::default();
28 }
29
30 let p = embassy_stm32::init(config);
31
32 info!("Hello World!");
33
34 let now = NaiveDate::from_ymd_opt(2020, 5, 15)
35 .unwrap()
36 .and_hms_opt(10, 30, 15)
37 .unwrap();
38
39 let mut rtc = Rtc::new(p.RTC, RtcConfig::default());
40 info!("Got RTC! {:?}", now.and_utc().timestamp());
41
42 rtc.set_datetime(now.into()).expect("datetime not set");
43
44 // In reality the delay would be much longer
45 Timer::after_millis(20000).await;
46
47 let then: NaiveDateTime = rtc.now().unwrap().into();
48 info!("Got RTC! {:?}", then.and_utc().timestamp());
49}
diff --git a/examples/stm32u0/src/bin/spi.rs b/examples/stm32u0/src/bin/spi.rs
new file mode 100644
index 000000000..5693a3765
--- /dev/null
+++ b/examples/stm32u0/src/bin/spi.rs
@@ -0,0 +1,30 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_stm32::gpio::{Level, Output, Speed};
6use embassy_stm32::spi::{Config, Spi};
7use embassy_stm32::time::Hertz;
8use {defmt_rtt as _, panic_probe as _};
9
10#[cortex_m_rt::entry]
11fn main() -> ! {
12 info!("Hello World!");
13
14 let p = embassy_stm32::init(Default::default());
15
16 let mut spi_config = Config::default();
17 spi_config.frequency = Hertz(1_000_000);
18
19 let mut spi = Spi::new_blocking(p.SPI3, p.PC10, p.PC12, p.PC11, spi_config);
20
21 let mut cs = Output::new(p.PE0, Level::High, Speed::VeryHigh);
22
23 loop {
24 let mut buf = [0x0Au8; 4];
25 cs.set_low();
26 unwrap!(spi.blocking_transfer_in_place(&mut buf));
27 cs.set_high();
28 info!("xfer {=[u8]:x}", buf);
29 }
30}
diff --git a/examples/stm32u0/src/bin/usart.rs b/examples/stm32u0/src/bin/usart.rs
new file mode 100644
index 000000000..037a5c833
--- /dev/null
+++ b/examples/stm32u0/src/bin/usart.rs
@@ -0,0 +1,25 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_stm32::usart::{Config, Uart};
6use {defmt_rtt as _, panic_probe as _};
7
8#[cortex_m_rt::entry]
9fn main() -> ! {
10 info!("Hello World!");
11
12 let p = embassy_stm32::init(Default::default());
13
14 let config = Config::default();
15 let mut usart = Uart::new_blocking(p.USART2, p.PA3, p.PA2, config).unwrap();
16
17 unwrap!(usart.blocking_write(b"Hello Embassy World!\r\n"));
18 info!("wrote Hello, starting echo");
19
20 let mut buf = [0u8; 1];
21 loop {
22 unwrap!(usart.blocking_read(&mut buf));
23 unwrap!(usart.blocking_write(&buf));
24 }
25}
diff --git a/examples/stm32u0/src/bin/usb_serial.rs b/examples/stm32u0/src/bin/usb_serial.rs
new file mode 100644
index 000000000..9b38fd5dc
--- /dev/null
+++ b/examples/stm32u0/src/bin/usb_serial.rs
@@ -0,0 +1,109 @@
1#![no_std]
2#![no_main]
3
4use defmt::{panic, *};
5use defmt_rtt as _; // global logger
6use embassy_executor::Spawner;
7use embassy_stm32::usb::{Driver, Instance};
8use embassy_stm32::{bind_interrupts, peripherals, usb, Config};
9use embassy_usb::class::cdc_acm::{CdcAcmClass, State};
10use embassy_usb::driver::EndpointError;
11use embassy_usb::Builder;
12use futures::future::join;
13use panic_probe as _;
14
15bind_interrupts!(struct Irqs {
16 USB_DRD_FS => usb::InterruptHandler<peripherals::USB>;
17});
18
19#[embassy_executor::main]
20async fn main(_spawner: Spawner) {
21 let mut config = Config::default();
22 {
23 use embassy_stm32::rcc::*;
24 config.rcc.hsi = true;
25 config.rcc.pll = Some(Pll {
26 source: PllSource::HSI, // 16 MHz
27 prediv: PllPreDiv::DIV1,
28 mul: PllMul::MUL7,
29 divp: None,
30 divq: None,
31 divr: Some(PllRDiv::DIV2), // 56 MHz
32 });
33 config.rcc.sys = Sysclk::PLL1_R;
34 config.rcc.hsi48 = Some(Hsi48Config { sync_from_usb: true }); // needed for USB
35 config.rcc.mux.clk48sel = mux::Clk48sel::HSI48; // USB uses ICLK
36 }
37
38 let p = embassy_stm32::init(config);
39
40 info!("Hello World!");
41
42 // Create the driver, from the HAL.
43 let driver = Driver::new(p.USB, Irqs, p.PA12, p.PA11);
44
45 // Create embassy-usb Config
46 let config = embassy_usb::Config::new(0xc0de, 0xcafe);
47 //config.max_packet_size_0 = 64;
48
49 // Create embassy-usb DeviceBuilder using the driver and config.
50 // It needs some buffers for building the descriptors.
51 let mut config_descriptor = [0; 256];
52 let mut bos_descriptor = [0; 256];
53 let mut control_buf = [0; 7];
54
55 let mut state = State::new();
56
57 let mut builder = Builder::new(
58 driver,
59 config,
60 &mut config_descriptor,
61 &mut bos_descriptor,
62 &mut [], // no msos descriptors
63 &mut control_buf,
64 );
65
66 // Create classes on the builder.
67 let mut class = CdcAcmClass::new(&mut builder, &mut state, 64);
68
69 // Build the builder.
70 let mut usb = builder.build();
71
72 // Run the USB device.
73 let usb_fut = usb.run();
74
75 // Do stuff with the class!
76 let echo_fut = async {
77 loop {
78 class.wait_connection().await;
79 info!("Connected");
80 let _ = echo(&mut class).await;
81 info!("Disconnected");
82 }
83 };
84
85 // Run everything concurrently.
86 // If we had made everything `'static` above instead, we could do this using separate tasks instead.
87 join(usb_fut, echo_fut).await;
88}
89
90struct Disconnected {}
91
92impl From<EndpointError> for Disconnected {
93 fn from(val: EndpointError) -> Self {
94 match val {
95 EndpointError::BufferOverflow => panic!("Buffer overflow"),
96 EndpointError::Disabled => Disconnected {},
97 }
98 }
99}
100
101async fn echo<'d, T: Instance + 'd>(class: &mut CdcAcmClass<'d, Driver<'d, T>>) -> Result<(), Disconnected> {
102 let mut buf = [0; 64];
103 loop {
104 let n = class.read_packet(&mut buf).await?;
105 let data = &buf[..n];
106 info!("data: {:x}", data);
107 class.write_packet(data).await?;
108 }
109}
diff --git a/examples/stm32u0/src/bin/wdt.rs b/examples/stm32u0/src/bin/wdt.rs
new file mode 100644
index 000000000..f6276e2e9
--- /dev/null
+++ b/examples/stm32u0/src/bin/wdt.rs
@@ -0,0 +1,41 @@
1#![no_std]
2#![no_main]
3
4use defmt::*;
5use embassy_executor::Spawner;
6use embassy_stm32::gpio::{Level, Output, Speed};
7use embassy_stm32::wdg::IndependentWatchdog;
8use embassy_time::Timer;
9use {defmt_rtt as _, panic_probe as _};
10
11#[embassy_executor::main]
12async fn main(_spawner: Spawner) {
13 let p = embassy_stm32::init(Default::default());
14 info!("Hello World!");
15
16 let mut led = Output::new(p.PA5, Level::High, Speed::Low);
17
18 let mut wdt = IndependentWatchdog::new(p.IWDG, 1_000_000);
19 wdt.unleash();
20
21 let mut i = 0;
22
23 loop {
24 info!("high");
25 led.set_high();
26 Timer::after_millis(300).await;
27
28 info!("low");
29 led.set_low();
30 Timer::after_millis(300).await;
31
32 // Pet watchdog for 5 iterations and then stop.
33 // MCU should restart in 1 second after the last pet.
34 if i < 5 {
35 info!("Petting watchdog");
36 wdt.pet();
37 }
38
39 i += 1;
40 }
41}
diff --git a/examples/stm32wb/.cargo/config.toml b/examples/stm32wb/.cargo/config.toml
index 51c499ee7..8b6d6d754 100644
--- a/examples/stm32wb/.cargo/config.toml
+++ b/examples/stm32wb/.cargo/config.toml
@@ -1,6 +1,6 @@
1[target.'cfg(all(target_arch = "arm", target_os = "none"))'] 1[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2# replace STM32WB55CCUx with your chip as listed in `probe-rs chip list` 2# replace STM32WB55CCUx with your chip as listed in `probe-rs chip list`
3# runner = "probe-run --chip STM32WB55RGVx --speed 1000 --connect-under-reset" 3# runner = "probe-rs run --chip STM32WB55RGVx --speed 1000 --connect-under-reset"
4runner = "teleprobe local run --chip STM32WB55RG --elf" 4runner = "teleprobe local run --chip STM32WB55RG --elf"
5 5
6[build] 6[build]