diff options
Diffstat (limited to 'examples')
51 files changed, 0 insertions, 255 deletions
diff --git a/examples/rp23/src/bin/adc.rs b/examples/rp23/src/bin/adc.rs index f7db9653a..b7324f755 100644 --- a/examples/rp23/src/bin/adc.rs +++ b/examples/rp23/src/bin/adc.rs | |||
| @@ -8,15 +8,10 @@ use defmt::*; | |||
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::adc::{Adc, Channel, Config, InterruptHandler}; | 9 | use embassy_rp::adc::{Adc, Channel, Config, InterruptHandler}; |
| 10 | use embassy_rp::bind_interrupts; | 10 | use embassy_rp::bind_interrupts; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::gpio::Pull; | 11 | use embassy_rp::gpio::Pull; |
| 13 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
| 21 | ADC_IRQ_FIFO => InterruptHandler; | 16 | ADC_IRQ_FIFO => InterruptHandler; |
| 22 | }); | 17 | }); |
diff --git a/examples/rp23/src/bin/adc_dma.rs b/examples/rp23/src/bin/adc_dma.rs index a6814c23a..f755cf5bf 100644 --- a/examples/rp23/src/bin/adc_dma.rs +++ b/examples/rp23/src/bin/adc_dma.rs | |||
| @@ -8,15 +8,10 @@ use defmt::*; | |||
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::adc::{Adc, Channel, Config, InterruptHandler}; | 9 | use embassy_rp::adc::{Adc, Channel, Config, InterruptHandler}; |
| 10 | use embassy_rp::bind_interrupts; | 10 | use embassy_rp::bind_interrupts; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::gpio::Pull; | 11 | use embassy_rp::gpio::Pull; |
| 13 | use embassy_time::{Duration, Ticker}; | 12 | use embassy_time::{Duration, Ticker}; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
| 21 | ADC_IRQ_FIFO => InterruptHandler; | 16 | ADC_IRQ_FIFO => InterruptHandler; |
| 22 | }); | 17 | }); |
diff --git a/examples/rp23/src/bin/assign_resources.rs b/examples/rp23/src/bin/assign_resources.rs index 0d4ad8dc3..ff6eff4a2 100644 --- a/examples/rp23/src/bin/assign_resources.rs +++ b/examples/rp23/src/bin/assign_resources.rs | |||
| @@ -14,16 +14,11 @@ | |||
| 14 | use assign_resources::assign_resources; | 14 | use assign_resources::assign_resources; |
| 15 | use defmt::*; | 15 | use defmt::*; |
| 16 | use embassy_executor::Spawner; | 16 | use embassy_executor::Spawner; |
| 17 | use embassy_rp::block::ImageDef; | ||
| 18 | use embassy_rp::gpio::{Level, Output}; | 17 | use embassy_rp::gpio::{Level, Output}; |
| 19 | use embassy_rp::peripherals::{self, PIN_20, PIN_21}; | 18 | use embassy_rp::peripherals::{self, PIN_20, PIN_21}; |
| 20 | use embassy_time::Timer; | 19 | use embassy_time::Timer; |
| 21 | use {defmt_rtt as _, panic_probe as _}; | 20 | use {defmt_rtt as _, panic_probe as _}; |
| 22 | 21 | ||
| 23 | #[link_section = ".start_block"] | ||
| 24 | #[used] | ||
| 25 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 26 | |||
| 27 | #[embassy_executor::main] | 22 | #[embassy_executor::main] |
| 28 | async fn main(spawner: Spawner) { | 23 | async fn main(spawner: Spawner) { |
| 29 | // initialize the peripherals | 24 | // initialize the peripherals |
diff --git a/examples/rp23/src/bin/blinky.rs b/examples/rp23/src/bin/blinky.rs index c1ddbb7d2..2d962baca 100644 --- a/examples/rp23/src/bin/blinky.rs +++ b/examples/rp23/src/bin/blinky.rs | |||
| @@ -7,16 +7,11 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::gpio; | 10 | use embassy_rp::gpio; |
| 12 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 13 | use gpio::{Level, Output}; | 12 | use gpio::{Level, Output}; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | // Program metadata for `picotool info`. | 15 | // Program metadata for `picotool info`. |
| 21 | // This isn't needed, but it's recomended to have these minimal entries. | 16 | // This isn't needed, but it's recomended to have these minimal entries. |
| 22 | #[link_section = ".bi_entries"] | 17 | #[link_section = ".bi_entries"] |
diff --git a/examples/rp23/src/bin/blinky_two_channels.rs b/examples/rp23/src/bin/blinky_two_channels.rs index ce482858e..b2eec2a21 100644 --- a/examples/rp23/src/bin/blinky_two_channels.rs +++ b/examples/rp23/src/bin/blinky_two_channels.rs | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | /// [Link explaining it](https://www.physicsclassroom.com/class/sound/Lesson-3/Interference-and-Beats) | 7 | /// [Link explaining it](https://www.physicsclassroom.com/class/sound/Lesson-3/Interference-and-Beats) |
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::gpio; | 10 | use embassy_rp::gpio; |
| 12 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; | 11 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; |
| 13 | use embassy_sync::channel::{Channel, Sender}; | 12 | use embassy_sync::channel::{Channel, Sender}; |
| @@ -15,10 +14,6 @@ use embassy_time::{Duration, Ticker}; | |||
| 15 | use gpio::{AnyPin, Level, Output}; | 14 | use gpio::{AnyPin, Level, Output}; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
| 18 | #[link_section = ".start_block"] | ||
| 19 | #[used] | ||
| 20 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 21 | |||
| 22 | enum LedState { | 17 | enum LedState { |
| 23 | Toggle, | 18 | Toggle, |
| 24 | } | 19 | } |
diff --git a/examples/rp23/src/bin/blinky_two_tasks.rs b/examples/rp23/src/bin/blinky_two_tasks.rs index 5dc62245d..a57b513d6 100644 --- a/examples/rp23/src/bin/blinky_two_tasks.rs +++ b/examples/rp23/src/bin/blinky_two_tasks.rs | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | /// [Link explaining it](https://www.physicsclassroom.com/class/sound/Lesson-3/Interference-and-Beats) | 7 | /// [Link explaining it](https://www.physicsclassroom.com/class/sound/Lesson-3/Interference-and-Beats) |
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::gpio; | 10 | use embassy_rp::gpio; |
| 12 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; | 11 | use embassy_sync::blocking_mutex::raw::ThreadModeRawMutex; |
| 13 | use embassy_sync::mutex::Mutex; | 12 | use embassy_sync::mutex::Mutex; |
| @@ -15,10 +14,6 @@ use embassy_time::{Duration, Ticker}; | |||
| 15 | use gpio::{AnyPin, Level, Output}; | 14 | use gpio::{AnyPin, Level, Output}; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
| 18 | #[link_section = ".start_block"] | ||
| 19 | #[used] | ||
| 20 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 21 | |||
| 22 | type LedType = Mutex<ThreadModeRawMutex, Option<Output<'static>>>; | 17 | type LedType = Mutex<ThreadModeRawMutex, Option<Output<'static>>>; |
| 23 | static LED: LedType = Mutex::new(None); | 18 | static LED: LedType = Mutex::new(None); |
| 24 | 19 | ||
diff --git a/examples/rp23/src/bin/button.rs b/examples/rp23/src/bin/button.rs index 85f1bcae3..4ad2ca3b7 100644 --- a/examples/rp23/src/bin/button.rs +++ b/examples/rp23/src/bin/button.rs | |||
| @@ -6,14 +6,9 @@ | |||
| 6 | #![no_main] | 6 | #![no_main] |
| 7 | 7 | ||
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 9 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 11 | ||
| 13 | #[link_section = ".start_block"] | ||
| 14 | #[used] | ||
| 15 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 16 | |||
| 17 | #[embassy_executor::main] | 12 | #[embassy_executor::main] |
| 18 | async fn main(_spawner: Spawner) { | 13 | async fn main(_spawner: Spawner) { |
| 19 | let p = embassy_rp::init(Default::default()); | 14 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/debounce.rs b/examples/rp23/src/bin/debounce.rs index 4c8b80d92..0077f19fc 100644 --- a/examples/rp23/src/bin/debounce.rs +++ b/examples/rp23/src/bin/debounce.rs | |||
| @@ -6,15 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | use defmt::info; | 7 | use defmt::info; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::gpio::{Input, Level, Pull}; | 9 | use embassy_rp::gpio::{Input, Level, Pull}; |
| 11 | use embassy_time::{with_deadline, Duration, Instant, Timer}; | 10 | use embassy_time::{with_deadline, Duration, Instant, Timer}; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 12 | ||
| 14 | #[link_section = ".start_block"] | ||
| 15 | #[used] | ||
| 16 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 17 | |||
| 18 | pub struct Debouncer<'a> { | 13 | pub struct Debouncer<'a> { |
| 19 | input: Input<'a>, | 14 | input: Input<'a>, |
| 20 | debounce: Duration, | 15 | debounce: Duration, |
diff --git a/examples/rp23/src/bin/flash.rs b/examples/rp23/src/bin/flash.rs index 42c226f5b..31ad4aafc 100644 --- a/examples/rp23/src/bin/flash.rs +++ b/examples/rp23/src/bin/flash.rs | |||
| @@ -5,16 +5,11 @@ | |||
| 5 | 5 | ||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_rp::block::ImageDef; | ||
| 9 | use embassy_rp::flash::{Async, ERASE_SIZE, FLASH_BASE}; | 8 | use embassy_rp::flash::{Async, ERASE_SIZE, FLASH_BASE}; |
| 10 | use embassy_rp::peripherals::FLASH; | 9 | use embassy_rp::peripherals::FLASH; |
| 11 | use embassy_time::Timer; | 10 | use embassy_time::Timer; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 12 | ||
| 14 | #[link_section = ".start_block"] | ||
| 15 | #[used] | ||
| 16 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 17 | |||
| 18 | const ADDR_OFFSET: u32 = 0x100000; | 13 | const ADDR_OFFSET: u32 = 0x100000; |
| 19 | const FLASH_SIZE: usize = 2 * 1024 * 1024; | 14 | const FLASH_SIZE: usize = 2 * 1024 * 1024; |
| 20 | 15 | ||
diff --git a/examples/rp23/src/bin/gpio_async.rs b/examples/rp23/src/bin/gpio_async.rs index bfb9a3f95..b79fb2a15 100644 --- a/examples/rp23/src/bin/gpio_async.rs +++ b/examples/rp23/src/bin/gpio_async.rs | |||
| @@ -7,16 +7,11 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::gpio; | 10 | use embassy_rp::gpio; |
| 12 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 13 | use gpio::{Input, Level, Output, Pull}; | 12 | use gpio::{Input, Level, Output, Pull}; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | /// It requires an external signal to be manually triggered on PIN 16. For | 15 | /// It requires an external signal to be manually triggered on PIN 16. For |
| 21 | /// example, this could be accomplished using an external power source with a | 16 | /// example, this could be accomplished using an external power source with a |
| 22 | /// button so that it is possible to toggle the signal from low to high. | 17 | /// button so that it is possible to toggle the signal from low to high. |
diff --git a/examples/rp23/src/bin/gpout.rs b/examples/rp23/src/bin/gpout.rs index 3cc2ea938..011359253 100644 --- a/examples/rp23/src/bin/gpout.rs +++ b/examples/rp23/src/bin/gpout.rs | |||
| @@ -7,15 +7,10 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::clocks; | 10 | use embassy_rp::clocks; |
| 12 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 13 | ||
| 15 | #[link_section = ".start_block"] | ||
| 16 | #[used] | ||
| 17 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 18 | |||
| 19 | #[embassy_executor::main] | 14 | #[embassy_executor::main] |
| 20 | async fn main(_spawner: Spawner) { | 15 | async fn main(_spawner: Spawner) { |
| 21 | let p = embassy_rp::init(Default::default()); | 16 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/i2c_async.rs b/examples/rp23/src/bin/i2c_async.rs index b30088bae..e31cc894c 100644 --- a/examples/rp23/src/bin/i2c_async.rs +++ b/examples/rp23/src/bin/i2c_async.rs | |||
| @@ -9,17 +9,12 @@ | |||
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::bind_interrupts; | 11 | use embassy_rp::bind_interrupts; |
| 12 | use embassy_rp::block::ImageDef; | ||
| 13 | use embassy_rp::i2c::{self, Config, InterruptHandler}; | 12 | use embassy_rp::i2c::{self, Config, InterruptHandler}; |
| 14 | use embassy_rp::peripherals::I2C1; | 13 | use embassy_rp::peripherals::I2C1; |
| 15 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
| 16 | use embedded_hal_async::i2c::I2c; | 15 | use embedded_hal_async::i2c::I2c; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 17 | ||
| 19 | #[link_section = ".start_block"] | ||
| 20 | #[used] | ||
| 21 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 22 | |||
| 23 | bind_interrupts!(struct Irqs { | 18 | bind_interrupts!(struct Irqs { |
| 24 | I2C1_IRQ => InterruptHandler<I2C1>; | 19 | I2C1_IRQ => InterruptHandler<I2C1>; |
| 25 | }); | 20 | }); |
diff --git a/examples/rp23/src/bin/i2c_async_embassy.rs b/examples/rp23/src/bin/i2c_async_embassy.rs index c783a80c5..a65b71b9f 100644 --- a/examples/rp23/src/bin/i2c_async_embassy.rs +++ b/examples/rp23/src/bin/i2c_async_embassy.rs | |||
| @@ -7,14 +7,9 @@ | |||
| 7 | #![no_main] | 7 | #![no_main] |
| 8 | 8 | ||
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::i2c::InterruptHandler; | 10 | use embassy_rp::i2c::InterruptHandler; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 12 | ||
| 14 | #[link_section = ".start_block"] | ||
| 15 | #[used] | ||
| 16 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 17 | |||
| 18 | // Our anonymous hypotetical temperature sensor could be: | 13 | // Our anonymous hypotetical temperature sensor could be: |
| 19 | // a 12-bit sensor, with 100ms startup time, range of -40*C - 125*C, and precision 0.25*C | 14 | // a 12-bit sensor, with 100ms startup time, range of -40*C - 125*C, and precision 0.25*C |
| 20 | // It requires no configuration or calibration, works with all i2c bus speeds, | 15 | // It requires no configuration or calibration, works with all i2c bus speeds, |
diff --git a/examples/rp23/src/bin/i2c_blocking.rs b/examples/rp23/src/bin/i2c_blocking.rs index a68677311..c9c8a2760 100644 --- a/examples/rp23/src/bin/i2c_blocking.rs +++ b/examples/rp23/src/bin/i2c_blocking.rs | |||
| @@ -8,16 +8,11 @@ | |||
| 8 | 8 | ||
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::i2c::{self, Config}; | 11 | use embassy_rp::i2c::{self, Config}; |
| 13 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 14 | use embedded_hal_1::i2c::I2c; | 13 | use embedded_hal_1::i2c::I2c; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 14 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 15 | ||
| 17 | #[link_section = ".start_block"] | ||
| 18 | #[used] | ||
| 19 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 20 | |||
| 21 | #[allow(dead_code)] | 16 | #[allow(dead_code)] |
| 22 | mod mcp23017 { | 17 | mod mcp23017 { |
| 23 | pub const ADDR: u8 = 0x20; // default addr | 18 | pub const ADDR: u8 = 0x20; // default addr |
diff --git a/examples/rp23/src/bin/i2c_slave.rs b/examples/rp23/src/bin/i2c_slave.rs index 8817538c0..9fffb4646 100644 --- a/examples/rp23/src/bin/i2c_slave.rs +++ b/examples/rp23/src/bin/i2c_slave.rs | |||
| @@ -4,17 +4,12 @@ | |||
| 4 | 4 | ||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_rp::block::ImageDef; | ||
| 8 | use embassy_rp::peripherals::{I2C0, I2C1}; | 7 | use embassy_rp::peripherals::{I2C0, I2C1}; |
| 9 | use embassy_rp::{bind_interrupts, i2c, i2c_slave}; | 8 | use embassy_rp::{bind_interrupts, i2c, i2c_slave}; |
| 10 | use embassy_time::Timer; | 9 | use embassy_time::Timer; |
| 11 | use embedded_hal_async::i2c::I2c; | 10 | use embedded_hal_async::i2c::I2c; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 12 | ||
| 14 | #[link_section = ".start_block"] | ||
| 15 | #[used] | ||
| 16 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 17 | |||
| 18 | bind_interrupts!(struct Irqs { | 13 | bind_interrupts!(struct Irqs { |
| 19 | I2C0_IRQ => i2c::InterruptHandler<I2C0>; | 14 | I2C0_IRQ => i2c::InterruptHandler<I2C0>; |
| 20 | I2C1_IRQ => i2c::InterruptHandler<I2C1>; | 15 | I2C1_IRQ => i2c::InterruptHandler<I2C1>; |
diff --git a/examples/rp23/src/bin/interrupt.rs b/examples/rp23/src/bin/interrupt.rs index d563e6ebe..e9ac76486 100644 --- a/examples/rp23/src/bin/interrupt.rs +++ b/examples/rp23/src/bin/interrupt.rs | |||
| @@ -13,7 +13,6 @@ use core::cell::{Cell, RefCell}; | |||
| 13 | use defmt::*; | 13 | use defmt::*; |
| 14 | use embassy_executor::Spawner; | 14 | use embassy_executor::Spawner; |
| 15 | use embassy_rp::adc::{self, Adc, Blocking}; | 15 | use embassy_rp::adc::{self, Adc, Blocking}; |
| 16 | use embassy_rp::block::ImageDef; | ||
| 17 | use embassy_rp::gpio::Pull; | 16 | use embassy_rp::gpio::Pull; |
| 18 | use embassy_rp::interrupt; | 17 | use embassy_rp::interrupt; |
| 19 | use embassy_rp::pwm::{Config, Pwm}; | 18 | use embassy_rp::pwm::{Config, Pwm}; |
| @@ -25,10 +24,6 @@ use portable_atomic::{AtomicU32, Ordering}; | |||
| 25 | use static_cell::StaticCell; | 24 | use static_cell::StaticCell; |
| 26 | use {defmt_rtt as _, panic_probe as _}; | 25 | use {defmt_rtt as _, panic_probe as _}; |
| 27 | 26 | ||
| 28 | #[link_section = ".start_block"] | ||
| 29 | #[used] | ||
| 30 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 31 | |||
| 32 | static COUNTER: AtomicU32 = AtomicU32::new(0); | 27 | static COUNTER: AtomicU32 = AtomicU32::new(0); |
| 33 | static PWM: Mutex<CriticalSectionRawMutex, RefCell<Option<Pwm>>> = Mutex::new(RefCell::new(None)); | 28 | static PWM: Mutex<CriticalSectionRawMutex, RefCell<Option<Pwm>>> = Mutex::new(RefCell::new(None)); |
| 34 | static ADC: Mutex<CriticalSectionRawMutex, RefCell<Option<(Adc<Blocking>, adc::Channel)>>> = | 29 | static ADC: Mutex<CriticalSectionRawMutex, RefCell<Option<(Adc<Blocking>, adc::Channel)>>> = |
diff --git a/examples/rp23/src/bin/multicore.rs b/examples/rp23/src/bin/multicore.rs index d4d470fa2..7cb546c91 100644 --- a/examples/rp23/src/bin/multicore.rs +++ b/examples/rp23/src/bin/multicore.rs | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Executor; | 9 | use embassy_executor::Executor; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::gpio::{Level, Output}; | 10 | use embassy_rp::gpio::{Level, Output}; |
| 12 | use embassy_rp::multicore::{spawn_core1, Stack}; | 11 | use embassy_rp::multicore::{spawn_core1, Stack}; |
| 13 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 12 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| @@ -16,10 +15,6 @@ use embassy_time::Timer; | |||
| 16 | use static_cell::StaticCell; | 15 | use static_cell::StaticCell; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 17 | ||
| 19 | #[link_section = ".start_block"] | ||
| 20 | #[used] | ||
| 21 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 22 | |||
| 23 | static mut CORE1_STACK: Stack<4096> = Stack::new(); | 18 | static mut CORE1_STACK: Stack<4096> = Stack::new(); |
| 24 | static EXECUTOR0: StaticCell<Executor> = StaticCell::new(); | 19 | static EXECUTOR0: StaticCell<Executor> = StaticCell::new(); |
| 25 | static EXECUTOR1: StaticCell<Executor> = StaticCell::new(); | 20 | static EXECUTOR1: StaticCell<Executor> = StaticCell::new(); |
diff --git a/examples/rp23/src/bin/multiprio.rs b/examples/rp23/src/bin/multiprio.rs index 787854aa9..2b397f97d 100644 --- a/examples/rp23/src/bin/multiprio.rs +++ b/examples/rp23/src/bin/multiprio.rs | |||
| @@ -59,17 +59,12 @@ | |||
| 59 | use cortex_m_rt::entry; | 59 | use cortex_m_rt::entry; |
| 60 | use defmt::{info, unwrap}; | 60 | use defmt::{info, unwrap}; |
| 61 | use embassy_executor::{Executor, InterruptExecutor}; | 61 | use embassy_executor::{Executor, InterruptExecutor}; |
| 62 | use embassy_rp::block::ImageDef; | ||
| 63 | use embassy_rp::interrupt; | 62 | use embassy_rp::interrupt; |
| 64 | use embassy_rp::interrupt::{InterruptExt, Priority}; | 63 | use embassy_rp::interrupt::{InterruptExt, Priority}; |
| 65 | use embassy_time::{Instant, Timer, TICK_HZ}; | 64 | use embassy_time::{Instant, Timer, TICK_HZ}; |
| 66 | use static_cell::StaticCell; | 65 | use static_cell::StaticCell; |
| 67 | use {defmt_rtt as _, panic_probe as _}; | 66 | use {defmt_rtt as _, panic_probe as _}; |
| 68 | 67 | ||
| 69 | #[link_section = ".start_block"] | ||
| 70 | #[used] | ||
| 71 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 72 | |||
| 73 | #[embassy_executor::task] | 68 | #[embassy_executor::task] |
| 74 | async fn run_high() { | 69 | async fn run_high() { |
| 75 | loop { | 70 | loop { |
diff --git a/examples/rp23/src/bin/otp.rs b/examples/rp23/src/bin/otp.rs index c67c9821a..5ffbb7610 100644 --- a/examples/rp23/src/bin/otp.rs +++ b/examples/rp23/src/bin/otp.rs | |||
| @@ -5,15 +5,10 @@ | |||
| 5 | 5 | ||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_rp::block::ImageDef; | ||
| 9 | use embassy_rp::otp; | 8 | use embassy_rp::otp; |
| 10 | use embassy_time::Timer; | 9 | use embassy_time::Timer; |
| 11 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 12 | 11 | ||
| 13 | #[link_section = ".start_block"] | ||
| 14 | #[used] | ||
| 15 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 16 | |||
| 17 | #[embassy_executor::main] | 12 | #[embassy_executor::main] |
| 18 | async fn main(_spawner: Spawner) { | 13 | async fn main(_spawner: Spawner) { |
| 19 | let _ = embassy_rp::init(Default::default()); | 14 | let _ = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/pio_async.rs b/examples/rp23/src/bin/pio_async.rs index 896447e28..ee248591b 100644 --- a/examples/rp23/src/bin/pio_async.rs +++ b/examples/rp23/src/bin/pio_async.rs | |||
| @@ -5,17 +5,12 @@ | |||
| 5 | use defmt::info; | 5 | use defmt::info; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_rp::bind_interrupts; | 7 | use embassy_rp::bind_interrupts; |
| 8 | use embassy_rp::block::ImageDef; | ||
| 9 | use embassy_rp::peripherals::PIO0; | 8 | use embassy_rp::peripherals::PIO0; |
| 10 | use embassy_rp::pio::{Common, Config, InterruptHandler, Irq, Pio, PioPin, ShiftDirection, StateMachine}; | 9 | use embassy_rp::pio::{Common, Config, InterruptHandler, Irq, Pio, PioPin, ShiftDirection, StateMachine}; |
| 11 | use fixed::traits::ToFixed; | 10 | use fixed::traits::ToFixed; |
| 12 | use fixed_macro::types::U56F8; | 11 | use fixed_macro::types::U56F8; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 13 | ||
| 15 | #[link_section = ".start_block"] | ||
| 16 | #[used] | ||
| 17 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 18 | |||
| 19 | bind_interrupts!(struct Irqs { | 14 | bind_interrupts!(struct Irqs { |
| 20 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 15 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 21 | }); | 16 | }); |
diff --git a/examples/rp23/src/bin/pio_dma.rs b/examples/rp23/src/bin/pio_dma.rs index b5f754798..02700269c 100644 --- a/examples/rp23/src/bin/pio_dma.rs +++ b/examples/rp23/src/bin/pio_dma.rs | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | use defmt::info; | 5 | use defmt::info; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_futures::join::join; | 7 | use embassy_futures::join::join; |
| 8 | use embassy_rp::block::ImageDef; | ||
| 9 | use embassy_rp::peripherals::PIO0; | 8 | use embassy_rp::peripherals::PIO0; |
| 10 | use embassy_rp::pio::{Config, InterruptHandler, Pio, ShiftConfig, ShiftDirection}; | 9 | use embassy_rp::pio::{Config, InterruptHandler, Pio, ShiftConfig, ShiftDirection}; |
| 11 | use embassy_rp::{bind_interrupts, Peripheral}; | 10 | use embassy_rp::{bind_interrupts, Peripheral}; |
| @@ -13,10 +12,6 @@ use fixed::traits::ToFixed; | |||
| 13 | use fixed_macro::types::U56F8; | 12 | use fixed_macro::types::U56F8; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
| 21 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 16 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 22 | }); | 17 | }); |
diff --git a/examples/rp23/src/bin/pio_hd44780.rs b/examples/rp23/src/bin/pio_hd44780.rs index c6f5f6db0..164e6f8d3 100644 --- a/examples/rp23/src/bin/pio_hd44780.rs +++ b/examples/rp23/src/bin/pio_hd44780.rs | |||
| @@ -8,7 +8,6 @@ use core::fmt::Write; | |||
| 8 | 8 | ||
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::bind_interrupts; | 10 | use embassy_rp::bind_interrupts; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::peripherals::PIO0; | 11 | use embassy_rp::peripherals::PIO0; |
| 13 | use embassy_rp::pio::{InterruptHandler, Pio}; | 12 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 14 | use embassy_rp::pio_programs::hd44780::{PioHD44780, PioHD44780CommandSequenceProgram, PioHD44780CommandWordProgram}; | 13 | use embassy_rp::pio_programs::hd44780::{PioHD44780, PioHD44780CommandSequenceProgram, PioHD44780CommandWordProgram}; |
| @@ -16,10 +15,6 @@ use embassy_rp::pwm::{self, Pwm}; | |||
| 16 | use embassy_time::{Instant, Timer}; | 15 | use embassy_time::{Instant, Timer}; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 17 | ||
| 19 | #[link_section = ".start_block"] | ||
| 20 | #[used] | ||
| 21 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 22 | |||
| 23 | bind_interrupts!(pub struct Irqs { | 18 | bind_interrupts!(pub struct Irqs { |
| 24 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 19 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 25 | }); | 20 | }); |
diff --git a/examples/rp23/src/bin/pio_i2s.rs b/examples/rp23/src/bin/pio_i2s.rs index 1fd34357b..ae937a4ed 100644 --- a/examples/rp23/src/bin/pio_i2s.rs +++ b/examples/rp23/src/bin/pio_i2s.rs | |||
| @@ -14,7 +14,6 @@ use core::mem; | |||
| 14 | 14 | ||
| 15 | use embassy_executor::Spawner; | 15 | use embassy_executor::Spawner; |
| 16 | use embassy_rp::bind_interrupts; | 16 | use embassy_rp::bind_interrupts; |
| 17 | use embassy_rp::block::ImageDef; | ||
| 18 | use embassy_rp::gpio::{Input, Pull}; | 17 | use embassy_rp::gpio::{Input, Pull}; |
| 19 | use embassy_rp::peripherals::PIO0; | 18 | use embassy_rp::peripherals::PIO0; |
| 20 | use embassy_rp::pio::{InterruptHandler, Pio}; | 19 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| @@ -22,10 +21,6 @@ use embassy_rp::pio_programs::i2s::{PioI2sOut, PioI2sOutProgram}; | |||
| 22 | use static_cell::StaticCell; | 21 | use static_cell::StaticCell; |
| 23 | use {defmt_rtt as _, panic_probe as _}; | 22 | use {defmt_rtt as _, panic_probe as _}; |
| 24 | 23 | ||
| 25 | #[link_section = ".start_block"] | ||
| 26 | #[used] | ||
| 27 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 28 | |||
| 29 | bind_interrupts!(struct Irqs { | 24 | bind_interrupts!(struct Irqs { |
| 30 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 25 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 31 | }); | 26 | }); |
diff --git a/examples/rp23/src/bin/pio_onewire.rs b/examples/rp23/src/bin/pio_onewire.rs index 7f227d04b..991510851 100644 --- a/examples/rp23/src/bin/pio_onewire.rs +++ b/examples/rp23/src/bin/pio_onewire.rs | |||
| @@ -5,17 +5,12 @@ | |||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy_executor::Spawner; | 6 | use embassy_executor::Spawner; |
| 7 | use embassy_rp::bind_interrupts; | 7 | use embassy_rp::bind_interrupts; |
| 8 | use embassy_rp::block::ImageDef; | ||
| 9 | use embassy_rp::peripherals::PIO0; | 8 | use embassy_rp::peripherals::PIO0; |
| 10 | use embassy_rp::pio::{self, InterruptHandler, Pio}; | 9 | use embassy_rp::pio::{self, InterruptHandler, Pio}; |
| 11 | use embassy_rp::pio_programs::onewire::{PioOneWire, PioOneWireProgram}; | 10 | use embassy_rp::pio_programs::onewire::{PioOneWire, PioOneWireProgram}; |
| 12 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 13 | ||
| 15 | #[link_section = ".start_block"] | ||
| 16 | #[used] | ||
| 17 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 18 | |||
| 19 | bind_interrupts!(struct Irqs { | 14 | bind_interrupts!(struct Irqs { |
| 20 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 15 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 21 | }); | 16 | }); |
diff --git a/examples/rp23/src/bin/pio_pwm.rs b/examples/rp23/src/bin/pio_pwm.rs index 11af62a7a..7eabb2289 100644 --- a/examples/rp23/src/bin/pio_pwm.rs +++ b/examples/rp23/src/bin/pio_pwm.rs | |||
| @@ -6,17 +6,12 @@ use core::time::Duration; | |||
| 6 | 6 | ||
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_rp::bind_interrupts; | 8 | use embassy_rp::bind_interrupts; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::peripherals::PIO0; | 9 | use embassy_rp::peripherals::PIO0; |
| 11 | use embassy_rp::pio::{InterruptHandler, Pio}; | 10 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 12 | use embassy_rp::pio_programs::pwm::{PioPwm, PioPwmProgram}; | 11 | use embassy_rp::pio_programs::pwm::{PioPwm, PioPwmProgram}; |
| 13 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | const REFRESH_INTERVAL: u64 = 20000; | 15 | const REFRESH_INTERVAL: u64 = 20000; |
| 21 | 16 | ||
| 22 | bind_interrupts!(struct Irqs { | 17 | bind_interrupts!(struct Irqs { |
diff --git a/examples/rp23/src/bin/pio_rotary_encoder.rs b/examples/rp23/src/bin/pio_rotary_encoder.rs index 2bb0e67f9..2750f61ae 100644 --- a/examples/rp23/src/bin/pio_rotary_encoder.rs +++ b/examples/rp23/src/bin/pio_rotary_encoder.rs | |||
| @@ -6,16 +6,11 @@ | |||
| 6 | use defmt::info; | 6 | use defmt::info; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_rp::bind_interrupts; | 8 | use embassy_rp::bind_interrupts; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::peripherals::PIO0; | 9 | use embassy_rp::peripherals::PIO0; |
| 11 | use embassy_rp::pio::{InterruptHandler, Pio}; | 10 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 12 | use embassy_rp::pio_programs::rotary_encoder::{Direction, PioEncoder, PioEncoderProgram}; | 11 | use embassy_rp::pio_programs::rotary_encoder::{Direction, PioEncoder, PioEncoderProgram}; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 13 | ||
| 15 | #[link_section = ".start_block"] | ||
| 16 | #[used] | ||
| 17 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 18 | |||
| 19 | bind_interrupts!(struct Irqs { | 14 | bind_interrupts!(struct Irqs { |
| 20 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 15 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 21 | }); | 16 | }); |
diff --git a/examples/rp23/src/bin/pio_rotary_encoder_rxf.rs b/examples/rp23/src/bin/pio_rotary_encoder_rxf.rs index 7a1046610..ca6b5222b 100644 --- a/examples/rp23/src/bin/pio_rotary_encoder_rxf.rs +++ b/examples/rp23/src/bin/pio_rotary_encoder_rxf.rs | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | use defmt::info; | 7 | use defmt::info; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::gpio::Pull; | 9 | use embassy_rp::gpio::Pull; |
| 11 | use embassy_rp::peripherals::PIO0; | 10 | use embassy_rp::peripherals::PIO0; |
| 12 | use embassy_rp::{bind_interrupts, pio}; | 11 | use embassy_rp::{bind_interrupts, pio}; |
| @@ -15,10 +14,6 @@ use fixed::traits::ToFixed; | |||
| 15 | use pio::{Common, Config, FifoJoin, Instance, InterruptHandler, Pio, PioPin, ShiftDirection, StateMachine}; | 14 | use pio::{Common, Config, FifoJoin, Instance, InterruptHandler, Pio, PioPin, ShiftDirection, StateMachine}; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
| 18 | #[link_section = ".start_block"] | ||
| 19 | #[used] | ||
| 20 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 21 | |||
| 22 | // Program metadata for `picotool info` | 17 | // Program metadata for `picotool info` |
| 23 | #[link_section = ".bi_entries"] | 18 | #[link_section = ".bi_entries"] |
| 24 | #[used] | 19 | #[used] |
diff --git a/examples/rp23/src/bin/pio_servo.rs b/examples/rp23/src/bin/pio_servo.rs index 4e94103f1..c52ee7492 100644 --- a/examples/rp23/src/bin/pio_servo.rs +++ b/examples/rp23/src/bin/pio_servo.rs | |||
| @@ -6,17 +6,12 @@ use core::time::Duration; | |||
| 6 | 6 | ||
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_rp::bind_interrupts; | 8 | use embassy_rp::bind_interrupts; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::peripherals::PIO0; | 9 | use embassy_rp::peripherals::PIO0; |
| 11 | use embassy_rp::pio::{Instance, InterruptHandler, Pio}; | 10 | use embassy_rp::pio::{Instance, InterruptHandler, Pio}; |
| 12 | use embassy_rp::pio_programs::pwm::{PioPwm, PioPwmProgram}; | 11 | use embassy_rp::pio_programs::pwm::{PioPwm, PioPwmProgram}; |
| 13 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | const DEFAULT_MIN_PULSE_WIDTH: u64 = 1000; // uncalibrated default, the shortest duty cycle sent to a servo | 15 | const DEFAULT_MIN_PULSE_WIDTH: u64 = 1000; // uncalibrated default, the shortest duty cycle sent to a servo |
| 21 | const DEFAULT_MAX_PULSE_WIDTH: u64 = 2000; // uncalibrated default, the longest duty cycle sent to a servo | 16 | const DEFAULT_MAX_PULSE_WIDTH: u64 = 2000; // uncalibrated default, the longest duty cycle sent to a servo |
| 22 | const DEFAULT_MAX_DEGREE_ROTATION: u64 = 160; // 160 degrees is typical | 17 | const DEFAULT_MAX_DEGREE_ROTATION: u64 = 160; // 160 degrees is typical |
diff --git a/examples/rp23/src/bin/pio_stepper.rs b/examples/rp23/src/bin/pio_stepper.rs index 4fabe78ca..3862c248b 100644 --- a/examples/rp23/src/bin/pio_stepper.rs +++ b/examples/rp23/src/bin/pio_stepper.rs | |||
| @@ -7,17 +7,12 @@ | |||
| 7 | use defmt::info; | 7 | use defmt::info; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::bind_interrupts; | 9 | use embassy_rp::bind_interrupts; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::peripherals::PIO0; | 10 | use embassy_rp::peripherals::PIO0; |
| 12 | use embassy_rp::pio::{InterruptHandler, Pio}; | 11 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 13 | use embassy_rp::pio_programs::stepper::{PioStepper, PioStepperProgram}; | 12 | use embassy_rp::pio_programs::stepper::{PioStepper, PioStepperProgram}; |
| 14 | use embassy_time::{with_timeout, Duration, Timer}; | 13 | use embassy_time::{with_timeout, Duration, Timer}; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 14 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 15 | ||
| 17 | #[link_section = ".start_block"] | ||
| 18 | #[used] | ||
| 19 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 20 | |||
| 21 | bind_interrupts!(struct Irqs { | 16 | bind_interrupts!(struct Irqs { |
| 22 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 17 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 23 | }); | 18 | }); |
diff --git a/examples/rp23/src/bin/pio_uart.rs b/examples/rp23/src/bin/pio_uart.rs index 672732c5b..9712984f9 100644 --- a/examples/rp23/src/bin/pio_uart.rs +++ b/examples/rp23/src/bin/pio_uart.rs | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | use defmt::{info, panic, trace}; | 13 | use defmt::{info, panic, trace}; |
| 14 | use embassy_executor::Spawner; | 14 | use embassy_executor::Spawner; |
| 15 | use embassy_futures::join::{join, join3}; | 15 | use embassy_futures::join::{join, join3}; |
| 16 | use embassy_rp::block::ImageDef; | ||
| 17 | use embassy_rp::peripherals::{PIO0, USB}; | 16 | use embassy_rp::peripherals::{PIO0, USB}; |
| 18 | use embassy_rp::pio_programs::uart::{PioUartRx, PioUartRxProgram, PioUartTx, PioUartTxProgram}; | 17 | use embassy_rp::pio_programs::uart::{PioUartRx, PioUartRxProgram, PioUartTx, PioUartTxProgram}; |
| 19 | use embassy_rp::usb::{Driver, Instance, InterruptHandler}; | 18 | use embassy_rp::usb::{Driver, Instance, InterruptHandler}; |
| @@ -26,10 +25,6 @@ use embassy_usb::{Builder, Config}; | |||
| 26 | use embedded_io_async::{Read, Write}; | 25 | use embedded_io_async::{Read, Write}; |
| 27 | use {defmt_rtt as _, panic_probe as _}; | 26 | use {defmt_rtt as _, panic_probe as _}; |
| 28 | 27 | ||
| 29 | #[link_section = ".start_block"] | ||
| 30 | #[used] | ||
| 31 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 32 | |||
| 33 | bind_interrupts!(struct Irqs { | 28 | bind_interrupts!(struct Irqs { |
| 34 | USBCTRL_IRQ => InterruptHandler<USB>; | 29 | USBCTRL_IRQ => InterruptHandler<USB>; |
| 35 | PIO0_IRQ_0 => pio::InterruptHandler<PIO0>; | 30 | PIO0_IRQ_0 => pio::InterruptHandler<PIO0>; |
diff --git a/examples/rp23/src/bin/pio_ws2812.rs b/examples/rp23/src/bin/pio_ws2812.rs index 4d258234e..d1fcfc471 100644 --- a/examples/rp23/src/bin/pio_ws2812.rs +++ b/examples/rp23/src/bin/pio_ws2812.rs | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | use defmt::*; | 7 | use defmt::*; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::bind_interrupts; | 9 | use embassy_rp::bind_interrupts; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::peripherals::PIO0; | 10 | use embassy_rp::peripherals::PIO0; |
| 12 | use embassy_rp::pio::{InterruptHandler, Pio}; | 11 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 13 | use embassy_rp::pio_programs::ws2812::{PioWs2812, PioWs2812Program}; | 12 | use embassy_rp::pio_programs::ws2812::{PioWs2812, PioWs2812Program}; |
| @@ -15,10 +14,6 @@ use embassy_time::{Duration, Ticker}; | |||
| 15 | use smart_leds::RGB8; | 14 | use smart_leds::RGB8; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
| 18 | #[link_section = ".start_block"] | ||
| 19 | #[used] | ||
| 20 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 21 | |||
| 22 | bind_interrupts!(struct Irqs { | 17 | bind_interrupts!(struct Irqs { |
| 23 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | 18 | PIO0_IRQ_0 => InterruptHandler<PIO0>; |
| 24 | }); | 19 | }); |
diff --git a/examples/rp23/src/bin/pwm.rs b/examples/rp23/src/bin/pwm.rs index ed3c94f15..a3c0f7e49 100644 --- a/examples/rp23/src/bin/pwm.rs +++ b/examples/rp23/src/bin/pwm.rs | |||
| @@ -9,16 +9,11 @@ | |||
| 9 | 9 | ||
| 10 | use defmt::*; | 10 | use defmt::*; |
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_rp::block::ImageDef; | ||
| 13 | use embassy_rp::peripherals::{PIN_25, PIN_4, PWM_SLICE2, PWM_SLICE4}; | 12 | use embassy_rp::peripherals::{PIN_25, PIN_4, PWM_SLICE2, PWM_SLICE4}; |
| 14 | use embassy_rp::pwm::{Config, Pwm, SetDutyCycle}; | 13 | use embassy_rp::pwm::{Config, Pwm, SetDutyCycle}; |
| 15 | use embassy_time::Timer; | 14 | use embassy_time::Timer; |
| 16 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 17 | 16 | ||
| 18 | #[link_section = ".start_block"] | ||
| 19 | #[used] | ||
| 20 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 21 | |||
| 22 | #[embassy_executor::main] | 17 | #[embassy_executor::main] |
| 23 | async fn main(spawner: Spawner) { | 18 | async fn main(spawner: Spawner) { |
| 24 | let p = embassy_rp::init(Default::default()); | 19 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/pwm_input.rs b/examples/rp23/src/bin/pwm_input.rs index ef87fe8b5..bf454a936 100644 --- a/examples/rp23/src/bin/pwm_input.rs +++ b/examples/rp23/src/bin/pwm_input.rs | |||
| @@ -5,16 +5,11 @@ | |||
| 5 | 5 | ||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_rp::block::ImageDef; | ||
| 9 | use embassy_rp::gpio::Pull; | 8 | use embassy_rp::gpio::Pull; |
| 10 | use embassy_rp::pwm::{Config, InputMode, Pwm}; | 9 | use embassy_rp::pwm::{Config, InputMode, Pwm}; |
| 11 | use embassy_time::{Duration, Ticker}; | 10 | use embassy_time::{Duration, Ticker}; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 12 | ||
| 14 | #[link_section = ".start_block"] | ||
| 15 | #[used] | ||
| 16 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 17 | |||
| 18 | #[embassy_executor::main] | 13 | #[embassy_executor::main] |
| 19 | async fn main(_spawner: Spawner) { | 14 | async fn main(_spawner: Spawner) { |
| 20 | let p = embassy_rp::init(Default::default()); | 15 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/pwm_tb6612fng_motor_driver.rs b/examples/rp23/src/bin/pwm_tb6612fng_motor_driver.rs index 0682888e8..3b700884c 100644 --- a/examples/rp23/src/bin/pwm_tb6612fng_motor_driver.rs +++ b/examples/rp23/src/bin/pwm_tb6612fng_motor_driver.rs | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | use assign_resources::assign_resources; | 8 | use assign_resources::assign_resources; |
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::config::Config; | 11 | use embassy_rp::config::Config; |
| 13 | use embassy_rp::gpio::Output; | 12 | use embassy_rp::gpio::Output; |
| 14 | use embassy_rp::{gpio, peripherals, pwm}; | 13 | use embassy_rp::{gpio, peripherals, pwm}; |
| @@ -16,10 +15,6 @@ use embassy_time::{Duration, Timer}; | |||
| 16 | use tb6612fng::{DriveCommand, Motor, Tb6612fng}; | 15 | use tb6612fng::{DriveCommand, Motor, Tb6612fng}; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 16 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 17 | ||
| 19 | #[link_section = ".start_block"] | ||
| 20 | #[used] | ||
| 21 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 22 | |||
| 23 | assign_resources! { | 18 | assign_resources! { |
| 24 | motor: MotorResources { | 19 | motor: MotorResources { |
| 25 | standby_pin: PIN_22, | 20 | standby_pin: PIN_22, |
diff --git a/examples/rp23/src/bin/rosc.rs b/examples/rp23/src/bin/rosc.rs index a096f0b7a..942b72319 100644 --- a/examples/rp23/src/bin/rosc.rs +++ b/examples/rp23/src/bin/rosc.rs | |||
| @@ -7,16 +7,11 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::{clocks, gpio}; | 10 | use embassy_rp::{clocks, gpio}; |
| 12 | use embassy_time::Timer; | 11 | use embassy_time::Timer; |
| 13 | use gpio::{Level, Output}; | 12 | use gpio::{Level, Output}; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | #[embassy_executor::main] | 15 | #[embassy_executor::main] |
| 21 | async fn main(_spawner: Spawner) { | 16 | async fn main(_spawner: Spawner) { |
| 22 | let mut config = embassy_rp::config::Config::default(); | 17 | let mut config = embassy_rp::config::Config::default(); |
diff --git a/examples/rp23/src/bin/shared_bus.rs b/examples/rp23/src/bin/shared_bus.rs index 2151ccb56..c6cb5d64c 100644 --- a/examples/rp23/src/bin/shared_bus.rs +++ b/examples/rp23/src/bin/shared_bus.rs | |||
| @@ -8,7 +8,6 @@ use embassy_embedded_hal::shared_bus::asynch::i2c::I2cDevice; | |||
| 8 | use embassy_embedded_hal::shared_bus::asynch::spi::SpiDevice; | 8 | use embassy_embedded_hal::shared_bus::asynch::spi::SpiDevice; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::bind_interrupts; | 10 | use embassy_rp::bind_interrupts; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::gpio::{AnyPin, Level, Output}; | 11 | use embassy_rp::gpio::{AnyPin, Level, Output}; |
| 13 | use embassy_rp::i2c::{self, I2c, InterruptHandler}; | 12 | use embassy_rp::i2c::{self, I2c, InterruptHandler}; |
| 14 | use embassy_rp::peripherals::{I2C1, SPI1}; | 13 | use embassy_rp::peripherals::{I2C1, SPI1}; |
| @@ -19,10 +18,6 @@ use embassy_time::Timer; | |||
| 19 | use static_cell::StaticCell; | 18 | use static_cell::StaticCell; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 19 | use {defmt_rtt as _, panic_probe as _}; |
| 21 | 20 | ||
| 22 | #[link_section = ".start_block"] | ||
| 23 | #[used] | ||
| 24 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 25 | |||
| 26 | type Spi1Bus = Mutex<NoopRawMutex, Spi<'static, SPI1, spi::Async>>; | 21 | type Spi1Bus = Mutex<NoopRawMutex, Spi<'static, SPI1, spi::Async>>; |
| 27 | type I2c1Bus = Mutex<NoopRawMutex, I2c<'static, I2C1, i2c::Async>>; | 22 | type I2c1Bus = Mutex<NoopRawMutex, I2c<'static, I2C1, i2c::Async>>; |
| 28 | 23 | ||
diff --git a/examples/rp23/src/bin/sharing.rs b/examples/rp23/src/bin/sharing.rs index 68eb5d133..5416e20ce 100644 --- a/examples/rp23/src/bin/sharing.rs +++ b/examples/rp23/src/bin/sharing.rs | |||
| @@ -19,7 +19,6 @@ use core::sync::atomic::{AtomicU32, Ordering}; | |||
| 19 | use cortex_m_rt::entry; | 19 | use cortex_m_rt::entry; |
| 20 | use defmt::info; | 20 | use defmt::info; |
| 21 | use embassy_executor::{Executor, InterruptExecutor}; | 21 | use embassy_executor::{Executor, InterruptExecutor}; |
| 22 | use embassy_rp::block::ImageDef; | ||
| 23 | use embassy_rp::clocks::RoscRng; | 22 | use embassy_rp::clocks::RoscRng; |
| 24 | use embassy_rp::interrupt::{InterruptExt, Priority}; | 23 | use embassy_rp::interrupt::{InterruptExt, Priority}; |
| 25 | use embassy_rp::peripherals::UART0; | 24 | use embassy_rp::peripherals::UART0; |
| @@ -32,10 +31,6 @@ use rand::RngCore; | |||
| 32 | use static_cell::{ConstStaticCell, StaticCell}; | 31 | use static_cell::{ConstStaticCell, StaticCell}; |
| 33 | use {defmt_rtt as _, panic_probe as _}; | 32 | use {defmt_rtt as _, panic_probe as _}; |
| 34 | 33 | ||
| 35 | #[link_section = ".start_block"] | ||
| 36 | #[used] | ||
| 37 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 38 | |||
| 39 | type UartAsyncMutex = mutex::Mutex<CriticalSectionRawMutex, UartTx<'static, UART0, uart::Async>>; | 34 | type UartAsyncMutex = mutex::Mutex<CriticalSectionRawMutex, UartTx<'static, UART0, uart::Async>>; |
| 40 | 35 | ||
| 41 | struct MyType { | 36 | struct MyType { |
diff --git a/examples/rp23/src/bin/spi.rs b/examples/rp23/src/bin/spi.rs index aacb8c7db..4cc4f5210 100644 --- a/examples/rp23/src/bin/spi.rs +++ b/examples/rp23/src/bin/spi.rs | |||
| @@ -7,16 +7,11 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::*; | 8 | use defmt::*; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::spi::Spi; | 10 | use embassy_rp::spi::Spi; |
| 12 | use embassy_rp::{gpio, spi}; | 11 | use embassy_rp::{gpio, spi}; |
| 13 | use gpio::{Level, Output}; | 12 | use gpio::{Level, Output}; |
| 14 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 15 | 14 | ||
| 16 | #[link_section = ".start_block"] | ||
| 17 | #[used] | ||
| 18 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 19 | |||
| 20 | #[embassy_executor::main] | 15 | #[embassy_executor::main] |
| 21 | async fn main(_spawner: Spawner) { | 16 | async fn main(_spawner: Spawner) { |
| 22 | let p = embassy_rp::init(Default::default()); | 17 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/spi_async.rs b/examples/rp23/src/bin/spi_async.rs index ac7f02fa8..266584efc 100644 --- a/examples/rp23/src/bin/spi_async.rs +++ b/examples/rp23/src/bin/spi_async.rs | |||
| @@ -6,15 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | use defmt::*; | 7 | use defmt::*; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::spi::{Config, Spi}; | 9 | use embassy_rp::spi::{Config, Spi}; |
| 11 | use embassy_time::Timer; | 10 | use embassy_time::Timer; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 12 | ||
| 14 | #[link_section = ".start_block"] | ||
| 15 | #[used] | ||
| 16 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 17 | |||
| 18 | #[embassy_executor::main] | 13 | #[embassy_executor::main] |
| 19 | async fn main(_spawner: Spawner) { | 14 | async fn main(_spawner: Spawner) { |
| 20 | let p = embassy_rp::init(Default::default()); | 15 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/spi_display.rs b/examples/rp23/src/bin/spi_display.rs index 6b7c0781f..9c524ab25 100644 --- a/examples/rp23/src/bin/spi_display.rs +++ b/examples/rp23/src/bin/spi_display.rs | |||
| @@ -12,7 +12,6 @@ use defmt::*; | |||
| 12 | use display_interface_spi::SPIInterface; | 12 | use display_interface_spi::SPIInterface; |
| 13 | use embassy_embedded_hal::shared_bus::blocking::spi::SpiDeviceWithConfig; | 13 | use embassy_embedded_hal::shared_bus::blocking::spi::SpiDeviceWithConfig; |
| 14 | use embassy_executor::Spawner; | 14 | use embassy_executor::Spawner; |
| 15 | use embassy_rp::block::ImageDef; | ||
| 16 | use embassy_rp::gpio::{Level, Output}; | 15 | use embassy_rp::gpio::{Level, Output}; |
| 17 | use embassy_rp::spi; | 16 | use embassy_rp::spi; |
| 18 | use embassy_rp::spi::{Blocking, Spi}; | 17 | use embassy_rp::spi::{Blocking, Spi}; |
| @@ -31,10 +30,6 @@ use mipidsi::options::{Orientation, Rotation}; | |||
| 31 | use mipidsi::Builder; | 30 | use mipidsi::Builder; |
| 32 | use {defmt_rtt as _, panic_probe as _}; | 31 | use {defmt_rtt as _, panic_probe as _}; |
| 33 | 32 | ||
| 34 | #[link_section = ".start_block"] | ||
| 35 | #[used] | ||
| 36 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 37 | |||
| 38 | use crate::touch::Touch; | 33 | use crate::touch::Touch; |
| 39 | 34 | ||
| 40 | const DISPLAY_FREQ: u32 = 64_000_000; | 35 | const DISPLAY_FREQ: u32 = 64_000_000; |
diff --git a/examples/rp23/src/bin/spi_sdmmc.rs b/examples/rp23/src/bin/spi_sdmmc.rs index 9fea035bc..9808b6a5d 100644 --- a/examples/rp23/src/bin/spi_sdmmc.rs +++ b/examples/rp23/src/bin/spi_sdmmc.rs | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_embedded_hal::SetConfig; | 10 | use embassy_embedded_hal::SetConfig; |
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_rp::block::ImageDef; | ||
| 13 | use embassy_rp::spi::Spi; | 12 | use embassy_rp::spi::Spi; |
| 14 | use embassy_rp::{gpio, spi}; | 13 | use embassy_rp::{gpio, spi}; |
| 15 | use embedded_hal_bus::spi::ExclusiveDevice; | 14 | use embedded_hal_bus::spi::ExclusiveDevice; |
| @@ -17,10 +16,6 @@ use embedded_sdmmc::sdcard::{DummyCsPin, SdCard}; | |||
| 17 | use gpio::{Level, Output}; | 16 | use gpio::{Level, Output}; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 19 | 18 | ||
| 20 | #[link_section = ".start_block"] | ||
| 21 | #[used] | ||
| 22 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 23 | |||
| 24 | struct DummyTimesource(); | 19 | struct DummyTimesource(); |
| 25 | 20 | ||
| 26 | impl embedded_sdmmc::TimeSource for DummyTimesource { | 21 | impl embedded_sdmmc::TimeSource for DummyTimesource { |
diff --git a/examples/rp23/src/bin/trng.rs b/examples/rp23/src/bin/trng.rs index 8251ebd8b..ad19aef3e 100644 --- a/examples/rp23/src/bin/trng.rs +++ b/examples/rp23/src/bin/trng.rs | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_rp::bind_interrupts; | 8 | use embassy_rp::bind_interrupts; |
| 9 | use embassy_rp::block::ImageDef; | ||
| 10 | use embassy_rp::gpio::{Level, Output}; | 9 | use embassy_rp::gpio::{Level, Output}; |
| 11 | use embassy_rp::peripherals::TRNG; | 10 | use embassy_rp::peripherals::TRNG; |
| 12 | use embassy_rp::trng::Trng; | 11 | use embassy_rp::trng::Trng; |
| @@ -14,10 +13,6 @@ use embassy_time::Timer; | |||
| 14 | use rand::RngCore; | 13 | use rand::RngCore; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 14 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 15 | ||
| 17 | #[link_section = ".start_block"] | ||
| 18 | #[used] | ||
| 19 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 20 | |||
| 21 | bind_interrupts!(struct Irqs { | 16 | bind_interrupts!(struct Irqs { |
| 22 | TRNG_IRQ => embassy_rp::trng::InterruptHandler<TRNG>; | 17 | TRNG_IRQ => embassy_rp::trng::InterruptHandler<TRNG>; |
| 23 | }); | 18 | }); |
diff --git a/examples/rp23/src/bin/uart.rs b/examples/rp23/src/bin/uart.rs index fe28bb046..a59f537bf 100644 --- a/examples/rp23/src/bin/uart.rs +++ b/examples/rp23/src/bin/uart.rs | |||
| @@ -8,14 +8,9 @@ | |||
| 8 | #![no_main] | 8 | #![no_main] |
| 9 | 9 | ||
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::uart; | 11 | use embassy_rp::uart; |
| 13 | use {defmt_rtt as _, panic_probe as _}; | 12 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 13 | ||
| 15 | #[link_section = ".start_block"] | ||
| 16 | #[used] | ||
| 17 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 18 | |||
| 19 | #[embassy_executor::main] | 14 | #[embassy_executor::main] |
| 20 | async fn main(_spawner: Spawner) { | 15 | async fn main(_spawner: Spawner) { |
| 21 | let p = embassy_rp::init(Default::default()); | 16 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/uart_buffered_split.rs b/examples/rp23/src/bin/uart_buffered_split.rs index 9ed130727..468d2b61a 100644 --- a/examples/rp23/src/bin/uart_buffered_split.rs +++ b/examples/rp23/src/bin/uart_buffered_split.rs | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | use defmt::*; | 10 | use defmt::*; |
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_rp::bind_interrupts; | 12 | use embassy_rp::bind_interrupts; |
| 13 | use embassy_rp::block::ImageDef; | ||
| 14 | use embassy_rp::peripherals::UART0; | 13 | use embassy_rp::peripherals::UART0; |
| 15 | use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config}; | 14 | use embassy_rp::uart::{BufferedInterruptHandler, BufferedUart, BufferedUartRx, Config}; |
| 16 | use embassy_time::Timer; | 15 | use embassy_time::Timer; |
| @@ -18,10 +17,6 @@ use embedded_io_async::{Read, Write}; | |||
| 18 | use static_cell::StaticCell; | 17 | use static_cell::StaticCell; |
| 19 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {defmt_rtt as _, panic_probe as _}; |
| 20 | 19 | ||
| 21 | #[link_section = ".start_block"] | ||
| 22 | #[used] | ||
| 23 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 24 | |||
| 25 | bind_interrupts!(struct Irqs { | 20 | bind_interrupts!(struct Irqs { |
| 26 | UART0_IRQ => BufferedInterruptHandler<UART0>; | 21 | UART0_IRQ => BufferedInterruptHandler<UART0>; |
| 27 | }); | 22 | }); |
diff --git a/examples/rp23/src/bin/uart_r503.rs b/examples/rp23/src/bin/uart_r503.rs index 9aed42785..085be280b 100644 --- a/examples/rp23/src/bin/uart_r503.rs +++ b/examples/rp23/src/bin/uart_r503.rs | |||
| @@ -4,17 +4,12 @@ | |||
| 4 | use defmt::{debug, error, info}; | 4 | use defmt::{debug, error, info}; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_rp::bind_interrupts; | 6 | use embassy_rp::bind_interrupts; |
| 7 | use embassy_rp::block::ImageDef; | ||
| 8 | use embassy_rp::peripherals::UART0; | 7 | use embassy_rp::peripherals::UART0; |
| 9 | use embassy_rp::uart::{Config, DataBits, InterruptHandler as UARTInterruptHandler, Parity, StopBits, Uart}; | 8 | use embassy_rp::uart::{Config, DataBits, InterruptHandler as UARTInterruptHandler, Parity, StopBits, Uart}; |
| 10 | use embassy_time::{with_timeout, Duration, Timer}; | 9 | use embassy_time::{with_timeout, Duration, Timer}; |
| 11 | use heapless::Vec; | 10 | use heapless::Vec; |
| 12 | use {defmt_rtt as _, panic_probe as _}; | 11 | use {defmt_rtt as _, panic_probe as _}; |
| 13 | 12 | ||
| 14 | #[link_section = ".start_block"] | ||
| 15 | #[used] | ||
| 16 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 17 | |||
| 18 | bind_interrupts!(pub struct Irqs { | 13 | bind_interrupts!(pub struct Irqs { |
| 19 | UART0_IRQ => UARTInterruptHandler<UART0>; | 14 | UART0_IRQ => UARTInterruptHandler<UART0>; |
| 20 | }); | 15 | }); |
diff --git a/examples/rp23/src/bin/uart_unidir.rs b/examples/rp23/src/bin/uart_unidir.rs index 12214c4c2..a45f40756 100644 --- a/examples/rp23/src/bin/uart_unidir.rs +++ b/examples/rp23/src/bin/uart_unidir.rs | |||
| @@ -11,16 +11,11 @@ | |||
| 11 | use defmt::*; | 11 | use defmt::*; |
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_rp::bind_interrupts; | 13 | use embassy_rp::bind_interrupts; |
| 14 | use embassy_rp::block::ImageDef; | ||
| 15 | use embassy_rp::peripherals::UART1; | 14 | use embassy_rp::peripherals::UART1; |
| 16 | use embassy_rp::uart::{Async, Config, InterruptHandler, UartRx, UartTx}; | 15 | use embassy_rp::uart::{Async, Config, InterruptHandler, UartRx, UartTx}; |
| 17 | use embassy_time::Timer; | 16 | use embassy_time::Timer; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 19 | 18 | ||
| 20 | #[link_section = ".start_block"] | ||
| 21 | #[used] | ||
| 22 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 23 | |||
| 24 | bind_interrupts!(struct Irqs { | 19 | bind_interrupts!(struct Irqs { |
| 25 | UART1_IRQ => InterruptHandler<UART1>; | 20 | UART1_IRQ => InterruptHandler<UART1>; |
| 26 | }); | 21 | }); |
diff --git a/examples/rp23/src/bin/usb_hid_keyboard.rs b/examples/rp23/src/bin/usb_hid_keyboard.rs index ec1e88746..6f496e23a 100644 --- a/examples/rp23/src/bin/usb_hid_keyboard.rs +++ b/examples/rp23/src/bin/usb_hid_keyboard.rs | |||
| @@ -7,7 +7,6 @@ use defmt::*; | |||
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_futures::join::join; | 8 | use embassy_futures::join::join; |
| 9 | use embassy_rp::bind_interrupts; | 9 | use embassy_rp::bind_interrupts; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::gpio::{Input, Pull}; | 10 | use embassy_rp::gpio::{Input, Pull}; |
| 12 | use embassy_rp::peripherals::USB; | 11 | use embassy_rp::peripherals::USB; |
| 13 | use embassy_rp::usb::{Driver as UsbDriver, InterruptHandler}; | 12 | use embassy_rp::usb::{Driver as UsbDriver, InterruptHandler}; |
| @@ -17,10 +16,6 @@ use embassy_usb::{Builder, Config, Handler}; | |||
| 17 | use usbd_hid::descriptor::{KeyboardReport, SerializedDescriptor}; | 16 | use usbd_hid::descriptor::{KeyboardReport, SerializedDescriptor}; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 19 | 18 | ||
| 20 | #[link_section = ".start_block"] | ||
| 21 | #[used] | ||
| 22 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 23 | |||
| 24 | bind_interrupts!(struct Irqs { | 19 | bind_interrupts!(struct Irqs { |
| 25 | USBCTRL_IRQ => InterruptHandler<USB>; | 20 | USBCTRL_IRQ => InterruptHandler<USB>; |
| 26 | }); | 21 | }); |
diff --git a/examples/rp23/src/bin/usb_webusb.rs b/examples/rp23/src/bin/usb_webusb.rs index 15279cabc..e73938ac9 100644 --- a/examples/rp23/src/bin/usb_webusb.rs +++ b/examples/rp23/src/bin/usb_webusb.rs | |||
| @@ -21,7 +21,6 @@ use defmt::info; | |||
| 21 | use embassy_executor::Spawner; | 21 | use embassy_executor::Spawner; |
| 22 | use embassy_futures::join::join; | 22 | use embassy_futures::join::join; |
| 23 | use embassy_rp::bind_interrupts; | 23 | use embassy_rp::bind_interrupts; |
| 24 | use embassy_rp::block::ImageDef; | ||
| 25 | use embassy_rp::peripherals::USB; | 24 | use embassy_rp::peripherals::USB; |
| 26 | use embassy_rp::usb::{Driver as UsbDriver, InterruptHandler}; | 25 | use embassy_rp::usb::{Driver as UsbDriver, InterruptHandler}; |
| 27 | use embassy_usb::class::web_usb::{Config as WebUsbConfig, State, Url, WebUsb}; | 26 | use embassy_usb::class::web_usb::{Config as WebUsbConfig, State, Url, WebUsb}; |
| @@ -30,10 +29,6 @@ use embassy_usb::msos::{self, windows_version}; | |||
| 30 | use embassy_usb::{Builder, Config}; | 29 | use embassy_usb::{Builder, Config}; |
| 31 | use {defmt_rtt as _, panic_probe as _}; | 30 | use {defmt_rtt as _, panic_probe as _}; |
| 32 | 31 | ||
| 33 | #[link_section = ".start_block"] | ||
| 34 | #[used] | ||
| 35 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 36 | |||
| 37 | bind_interrupts!(struct Irqs { | 32 | bind_interrupts!(struct Irqs { |
| 38 | USBCTRL_IRQ => InterruptHandler<USB>; | 33 | USBCTRL_IRQ => InterruptHandler<USB>; |
| 39 | }); | 34 | }); |
diff --git a/examples/rp23/src/bin/watchdog.rs b/examples/rp23/src/bin/watchdog.rs index efc24c4e3..b9d4ef22f 100644 --- a/examples/rp23/src/bin/watchdog.rs +++ b/examples/rp23/src/bin/watchdog.rs | |||
| @@ -7,17 +7,12 @@ | |||
| 7 | 7 | ||
| 8 | use defmt::info; | 8 | use defmt::info; |
| 9 | use embassy_executor::Spawner; | 9 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::block::ImageDef; | ||
| 11 | use embassy_rp::gpio; | 10 | use embassy_rp::gpio; |
| 12 | use embassy_rp::watchdog::*; | 11 | use embassy_rp::watchdog::*; |
| 13 | use embassy_time::{Duration, Timer}; | 12 | use embassy_time::{Duration, Timer}; |
| 14 | use gpio::{Level, Output}; | 13 | use gpio::{Level, Output}; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 14 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 15 | ||
| 17 | #[link_section = ".start_block"] | ||
| 18 | #[used] | ||
| 19 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 20 | |||
| 21 | #[embassy_executor::main] | 16 | #[embassy_executor::main] |
| 22 | async fn main(_spawner: Spawner) { | 17 | async fn main(_spawner: Spawner) { |
| 23 | let p = embassy_rp::init(Default::default()); | 18 | let p = embassy_rp::init(Default::default()); |
diff --git a/examples/rp23/src/bin/wifi_blinky_pico_plus_2.rs b/examples/rp23/src/bin/wifi_blinky_pico_plus_2.rs index ebb3c4373..ab7d6a93e 100644 --- a/examples/rp23/src/bin/wifi_blinky_pico_plus_2.rs +++ b/examples/rp23/src/bin/wifi_blinky_pico_plus_2.rs | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | use cyw43_pio::{PioSpi, RM2_CLOCK_DIVIDER}; | 8 | use cyw43_pio::{PioSpi, RM2_CLOCK_DIVIDER}; |
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::block::ImageDef; | ||
| 12 | use embassy_rp::peripherals::{DMA_CH0, PIO0}; | 11 | use embassy_rp::peripherals::{DMA_CH0, PIO0}; |
| 13 | use embassy_rp::pio::{InterruptHandler, Pio}; | 12 | use embassy_rp::pio::{InterruptHandler, Pio}; |
| 14 | use embassy_rp::{bind_interrupts, gpio}; | 13 | use embassy_rp::{bind_interrupts, gpio}; |
| @@ -17,10 +16,6 @@ use gpio::{Level, Output}; | |||
| 17 | use static_cell::StaticCell; | 16 | use static_cell::StaticCell; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 19 | 18 | ||
| 20 | #[link_section = ".start_block"] | ||
| 21 | #[used] | ||
| 22 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 23 | |||
| 24 | // Program metadata for `picotool info`. | 19 | // Program metadata for `picotool info`. |
| 25 | // This isn't needed, but it's recomended to have these minimal entries. | 20 | // This isn't needed, but it's recomended to have these minimal entries. |
| 26 | #[link_section = ".bi_entries"] | 21 | #[link_section = ".bi_entries"] |
diff --git a/examples/rp23/src/bin/zerocopy.rs b/examples/rp23/src/bin/zerocopy.rs index d317c4b56..39f03c8e4 100644 --- a/examples/rp23/src/bin/zerocopy.rs +++ b/examples/rp23/src/bin/zerocopy.rs | |||
| @@ -10,7 +10,6 @@ use defmt::*; | |||
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::adc::{self, Adc, Async, Config, InterruptHandler}; | 11 | use embassy_rp::adc::{self, Adc, Async, Config, InterruptHandler}; |
| 12 | use embassy_rp::bind_interrupts; | 12 | use embassy_rp::bind_interrupts; |
| 13 | use embassy_rp::block::ImageDef; | ||
| 14 | use embassy_rp::gpio::Pull; | 13 | use embassy_rp::gpio::Pull; |
| 15 | use embassy_rp::peripherals::DMA_CH0; | 14 | use embassy_rp::peripherals::DMA_CH0; |
| 16 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | 15 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; |
| @@ -19,10 +18,6 @@ use embassy_time::{Duration, Ticker, Timer}; | |||
| 19 | use static_cell::StaticCell; | 18 | use static_cell::StaticCell; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 19 | use {defmt_rtt as _, panic_probe as _}; |
| 21 | 20 | ||
| 22 | #[link_section = ".start_block"] | ||
| 23 | #[used] | ||
| 24 | pub static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); | ||
| 25 | |||
| 26 | type SampleBuffer = [u16; 512]; | 21 | type SampleBuffer = [u16; 512]; |
| 27 | 22 | ||
| 28 | bind_interrupts!(struct Irqs { | 23 | bind_interrupts!(struct Irqs { |
