mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 20:51:31 +11:00
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:
parent
2bbc52ffce
commit
d4743061fa
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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() -> ! {
|
||||||
|
|
|
@ -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() -> ! {
|
||||||
|
|
|
@ -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() -> ! {
|
||||||
|
|
|
@ -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() -> ! {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue