mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 14:53:03 +00:00
rp: use rp2040-boot2 to provide the boot2 blob
we're currently shipping an old boot2 that runs the flash at half speed. use the more recent version instead, and allow user to choose between the different supported boot2 versions for different flash chips if they need that.
This commit is contained in:
parent
79c60f4a7d
commit
0e3cd87a32
@ -30,6 +30,15 @@ rom-func-cache = []
|
||||
intrinsics = []
|
||||
rom-v2-intrinsics = []
|
||||
|
||||
# boot2 flash chip support. if none of these is enabled we'll default to w25q080 (used on the pico)
|
||||
boot2-at25sf128a = []
|
||||
boot2-gd25q64cs = []
|
||||
boot2-generic-03h = []
|
||||
boot2-is25lp080 = []
|
||||
boot2-ram-memcpy = []
|
||||
boot2-w25q080 = []
|
||||
boot2-w25x10cl = []
|
||||
|
||||
# Enable nightly-only features
|
||||
nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"]
|
||||
|
||||
@ -71,3 +80,4 @@ embedded-hal-nb = { version = "=1.0.0-alpha.2", optional = true}
|
||||
paste = "1.0"
|
||||
pio-proc = {version= "0.2" }
|
||||
pio = {version= "0.2.1" }
|
||||
rp2040-boot2 = "0.3"
|
||||
|
Binary file not shown.
@ -131,9 +131,32 @@ embassy_hal_common::peripherals! {
|
||||
WATCHDOG,
|
||||
}
|
||||
|
||||
#[link_section = ".boot2"]
|
||||
#[used]
|
||||
static BOOT2: [u8; 256] = *include_bytes!("boot2.bin");
|
||||
macro_rules! select_bootloader {
|
||||
( $( $feature:literal => $loader:ident, )+ default => $default:ident ) => {
|
||||
$(
|
||||
#[cfg(feature = $feature)]
|
||||
#[link_section = ".boot2"]
|
||||
#[used]
|
||||
static BOOT2: [u8; 256] = rp2040_boot2::$loader;
|
||||
)*
|
||||
|
||||
#[cfg(not(any( $( feature = $feature),* )))]
|
||||
#[link_section = ".boot2"]
|
||||
#[used]
|
||||
static BOOT2: [u8; 256] = rp2040_boot2::$default;
|
||||
}
|
||||
}
|
||||
|
||||
select_bootloader! {
|
||||
"boot2-at25sf128a" => BOOT_LOADER_AT25SF128A,
|
||||
"boot2-gd25q64cs" => BOOT_LOADER_GD25Q64CS,
|
||||
"boot2-generic-03h" => BOOT_LOADER_GENERIC_03H,
|
||||
"boot2-is25lp080" => BOOT_LOADER_IS25LP080,
|
||||
"boot2-ram-memcpy" => BOOT_LOADER_RAM_MEMCPY,
|
||||
"boot2-w25q080" => BOOT_LOADER_W25Q080,
|
||||
"boot2-w25x10cl" => BOOT_LOADER_W25X10CL,
|
||||
default => BOOT_LOADER_W25Q080
|
||||
}
|
||||
|
||||
pub mod config {
|
||||
#[non_exhaustive]
|
||||
|
Loading…
Reference in New Issue
Block a user