Use generic boot loader for rp2040-hal examples

Those examples should be independent of a specific board.
The generic boot loader increases their compatibility.
This commit is contained in:
Jan Niehusmann 2022-08-11 11:56:36 +00:00
parent 2bbc52ffce
commit d4743061fa
19 changed files with 19 additions and 19 deletions

View file

@ -35,7 +35,7 @@ defmt = { version = ">=0.2.0, <0.4", optional = true }
[dev-dependencies] [dev-dependencies]
cortex-m-rt = "0.7" cortex-m-rt = "0.7"
panic-halt = "0.2.0" panic-halt = "0.2.0"
rp2040-boot2 = "0.2.0" rp2040-boot2 = "0.2.1"
hd44780-driver = "0.4.0" hd44780-driver = "0.4.0"
pio-proc = "0.2.0" pio-proc = "0.2.0"
dht-sensor = "0.2.1" dht-sensor = "0.2.1"

View file

@ -34,7 +34,7 @@ use hal::pac;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -32,7 +32,7 @@ use rp2040_hal::clocks::Clock;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -37,7 +37,7 @@ use hal::Clock;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -31,7 +31,7 @@ use embedded_hal::digital::v2::OutputPin;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -54,7 +54,7 @@ use rp2040_hal::gpio::Interrupt::EdgeLow;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -31,7 +31,7 @@ use hal::pac;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -37,7 +37,7 @@ use hal::pac;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -37,7 +37,7 @@ use embedded_hal::digital::v2::ToggleableOutputPin;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -35,7 +35,7 @@ use embedded_hal::digital::v2::ToggleableOutputPin;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -14,7 +14,7 @@ use rp2040_hal as hal;
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {

View file

@ -14,7 +14,7 @@ use rp2040_hal as hal;
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {

View file

@ -16,7 +16,7 @@ use rp2040_hal as hal;
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {

View file

@ -16,7 +16,7 @@ use rp2040_hal as hal;
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {

View file

@ -33,7 +33,7 @@ use hal::pac;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// The minimum PWM value (i.e. LED brightness) we want /// The minimum PWM value (i.e. LED brightness) we want
const LOW: u16 = 0; const LOW: u16 = 0;

View file

@ -31,7 +31,7 @@ use hal::Clock;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -35,7 +35,7 @@ use hal::pac;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -34,7 +34,7 @@ use rp2040_hal::clocks::Clock;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency

View file

@ -34,7 +34,7 @@ use rp2040_hal::clocks::Clock;
/// need this to help the ROM bootloader get our code up and running. /// need this to help the ROM bootloader get our code up and running.
#[link_section = ".boot2"] #[link_section = ".boot2"]
#[used] #[used]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H;
/// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust /// External high-speed crystal on the Raspberry Pi Pico board is 12 MHz. Adjust
/// if your board has a different frequency /// if your board has a different frequency