mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-11 04:51:31 +11:00
Switch to new rp2040-boot2 crate.
This commit is contained in:
parent
c8bb2e43c7
commit
8e66ddcfb1
|
@ -18,7 +18,7 @@ embedded-time = "0.12.0"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
panic-halt= "0.2.0"
|
panic-halt= "0.2.0"
|
||||||
embedded-hal ="0.2.5"
|
embedded-hal ="0.2.5"
|
||||||
rp2040-boot2 = { git = "https://github.com/rp-rs/rp2040-boot2-rs", rev = "d2128ef9875e91e454dd0fb0d747c7439ae0627b" }
|
rp2040-boot2 = "0.2"
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
smart-leds = "0.3.0"
|
smart-leds = "0.3.0"
|
||||||
pio = { git = "https://github.com/rp-rs/pio-rs.git", branch = "main" }
|
pio = { git = "https://github.com/rp-rs/pio-rs.git", branch = "main" }
|
||||||
|
|
|
@ -22,7 +22,7 @@ usbd-hid = "0.5.1"
|
||||||
panic-halt= "0.2.0"
|
panic-halt= "0.2.0"
|
||||||
embedded-hal ="0.2.5"
|
embedded-hal ="0.2.5"
|
||||||
cortex-m-rtic = "0.6.0-alpha.5"
|
cortex-m-rtic = "0.6.0-alpha.5"
|
||||||
rp2040-boot2 = "0.1.2"
|
rp2040-boot2 = "0.2"
|
||||||
nb = "1.0"
|
nb = "1.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -38,7 +38,7 @@ use pico::hal;
|
||||||
//// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// Entry point to our bare-metal application.
|
/// Entry point to our bare-metal application.
|
||||||
///
|
///
|
||||||
|
|
|
@ -35,7 +35,7 @@ use pico::hal;
|
||||||
|
|
||||||
#[link_section = ".boot2"]
|
#[link_section = ".boot2"]
|
||||||
#[used]
|
#[used]
|
||||||
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
#[entry]
|
#[entry]
|
||||||
fn main() -> ! {
|
fn main() -> ! {
|
||||||
|
|
|
@ -34,7 +34,7 @@ use pico::hal;
|
||||||
//// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// Entry point to our bare-metal application.
|
/// Entry point to our bare-metal application.
|
||||||
///
|
///
|
||||||
|
|
|
@ -38,7 +38,7 @@ use pico::hal;
|
||||||
//// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
|
@ -6,7 +6,7 @@ use rp2040_hal as hal;
|
||||||
|
|
||||||
#[link_section = ".boot2"]
|
#[link_section = ".boot2"]
|
||||||
#[used]
|
#[used]
|
||||||
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
#[rtic::app(device = crate::hal::pac, peripherals = true)]
|
#[rtic::app(device = crate::hal::pac, peripherals = true)]
|
||||||
mod app {
|
mod app {
|
||||||
|
|
|
@ -37,7 +37,7 @@ use usbd_serial::SerialPort;
|
||||||
//// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// Entry point to our bare-metal application.
|
/// Entry point to our bare-metal application.
|
||||||
///
|
///
|
||||||
|
|
|
@ -49,7 +49,7 @@ use usbd_serial::SerialPort;
|
||||||
//// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// The USB Device Driver (shared with the interrupt).
|
/// The USB Device Driver (shared with the interrupt).
|
||||||
static mut USB_DEVICE: Option<UsbDevice<hal::usb::UsbBus>> = None;
|
static mut USB_DEVICE: Option<UsbDevice<hal::usb::UsbBus>> = None;
|
||||||
|
|
|
@ -48,7 +48,7 @@ use usbd_hid::hid_class::HIDClass;
|
||||||
//// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// The USB Device Driver (shared with the interrupt).
|
/// The USB Device Driver (shared with the interrupt).
|
||||||
static mut USB_DEVICE: Option<UsbDevice<hal::usb::UsbBus>> = None;
|
static mut USB_DEVICE: Option<UsbDevice<hal::usb::UsbBus>> = None;
|
||||||
|
|
|
@ -27,5 +27,5 @@ rt = ["cortex-m-rt","rp2040-hal/rt"]
|
||||||
display-interface = "0.4.1"
|
display-interface = "0.4.1"
|
||||||
panic-halt = "0.2.0"
|
panic-halt = "0.2.0"
|
||||||
arrayvec = { version="0.7.1", default-features=false }
|
arrayvec = { version="0.7.1", default-features=false }
|
||||||
rp2040-boot2 = { git = "https://github.com/rp-rs/rp2040-boot2-rs", rev = "67400f600b192e950b58df79ddc9b57ff209ef08" }
|
rp2040-boot2 = "0.2"
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
|
|
|
@ -18,7 +18,7 @@ use pico_explorer::{hal, pac, Button, PicoExplorer, XOSC_CRYSTAL_FREQ};
|
||||||
|
|
||||||
#[link_section = ".boot2"]
|
#[link_section = ".boot2"]
|
||||||
#[used]
|
#[used]
|
||||||
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
// See 4.9.5 from RP2040 datasheet
|
// See 4.9.5 from RP2040 datasheet
|
||||||
fn calc_temp(adc_value: f32, refv: f64) -> f64 {
|
fn calc_temp(adc_value: f32, refv: f64) -> f64 {
|
||||||
|
|
|
@ -19,7 +19,7 @@ embedded-time = "0.12.0"
|
||||||
panic-halt= "0.2.0"
|
panic-halt= "0.2.0"
|
||||||
embedded-hal ="0.2.5"
|
embedded-hal ="0.2.5"
|
||||||
cortex-m-rtic = "0.6.0-alpha.5"
|
cortex-m-rtic = "0.6.0-alpha.5"
|
||||||
rp2040-boot2 = "0.1.2"
|
rp2040-boot2 = "0.2"
|
||||||
nb = "1.0"
|
nb = "1.0"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ use pico_lipo_16_mb::hal;
|
||||||
//// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// Entry point to our bare-metal application.
|
/// Entry point to our bare-metal application.
|
||||||
///
|
///
|
||||||
|
|
|
@ -21,7 +21,7 @@ rt = ["cortex-m-rt", "rp2040-hal/rt"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
panic-halt = "0.2.0"
|
panic-halt = "0.2.0"
|
||||||
rp2040-boot2 = { git = "https://github.com/rp-rs/rp2040-boot2-rs", rev = "67400f600b192e950b58df79ddc9b57ff209ef08" }
|
rp2040-boot2 = "0.2"
|
||||||
smart-leds = "0.3.0"
|
smart-leds = "0.3.0"
|
||||||
embedded-time = "0.12.0"
|
embedded-time = "0.12.0"
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
|
|
|
@ -33,7 +33,7 @@ use ws2812_pio::Ws2812;
|
||||||
/// We need this to help the ROM bootloader get our code up and running.
|
/// We 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// Entry point to our bare-metal application.
|
/// Entry point to our bare-metal application.
|
||||||
///
|
///
|
||||||
|
|
|
@ -18,7 +18,7 @@ embedded-time = "0.12.0"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
panic-halt= "0.2.0"
|
panic-halt= "0.2.0"
|
||||||
embedded-hal ="0.2.5"
|
embedded-hal ="0.2.5"
|
||||||
rp2040-boot2 = { git = "https://github.com/rp-rs/rp2040-boot2-rs", rev = "d2128ef9875e91e454dd0fb0d747c7439ae0627b" }
|
rp2040-boot2 = "0.2"
|
||||||
smart-leds = "0.3"
|
smart-leds = "0.3"
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
pio = { git = "https://github.com/rp-rs/pio-rs.git", branch = "main" }
|
pio = { git = "https://github.com/rp-rs/pio-rs.git", branch = "main" }
|
||||||
|
|
|
@ -27,7 +27,7 @@ rand_core = "0.6.3"
|
||||||
[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 = { git = "https://github.com/rp-rs/rp2040-boot2-rs", rev = "67400f600b192e950b58df79ddc9b57ff209ef08" }
|
rp2040-boot2 = "0.2"
|
||||||
hd44780-driver = "0.4.0"
|
hd44780-driver = "0.4.0"
|
||||||
pio-proc = { git = "https://github.com/rp-rs/pio-rs.git", branch = "main" }
|
pio-proc = { git = "https://github.com/rp-rs/pio-rs.git", branch = "main" }
|
||||||
|
|
||||||
|
|
|
@ -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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
#[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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
#[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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
||||||
|
|
|
@ -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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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;
|
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
|
||||||
|
|
||||||
/// 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