aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2023-05-09 16:39:13 +0000
committerGitHub <[email protected]>2023-05-09 16:39:13 +0000
commit856b944eaf20bbd5f1625226415af210a28af89a (patch)
tree7b036d63061b8e77cab6e776c795c1611bc5e858 /embassy-rp/src
parent0b4b87e34442001f3701eaebdc52e5fe5532eb14 (diff)
parent0e3cd87a323c464842ea66eeaf7b6da00d70d300 (diff)
Merge #1439
1439: rp: use rp2040-boot2 to provide the boot2 blob r=Dirbaio a=pennae 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. Co-authored-by: pennae <[email protected]>
Diffstat (limited to 'embassy-rp/src')
-rw-r--r--embassy-rp/src/boot2.binbin256 -> 0 bytes
-rw-r--r--embassy-rp/src/lib.rs29
2 files changed, 26 insertions, 3 deletions
diff --git a/embassy-rp/src/boot2.bin b/embassy-rp/src/boot2.bin
deleted file mode 100644
index fdc1fc756..000000000
--- a/embassy-rp/src/boot2.bin
+++ /dev/null
Binary files differ
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs
index cba7559df..99f62738d 100644
--- a/embassy-rp/src/lib.rs
+++ b/embassy-rp/src/lib.rs
@@ -131,9 +131,32 @@ embassy_hal_common::peripherals! {
131 WATCHDOG, 131 WATCHDOG,
132} 132}
133 133
134#[link_section = ".boot2"] 134macro_rules! select_bootloader {
135#[used] 135 ( $( $feature:literal => $loader:ident, )+ default => $default:ident ) => {
136static BOOT2: [u8; 256] = *include_bytes!("boot2.bin"); 136 $(
137 #[cfg(feature = $feature)]
138 #[link_section = ".boot2"]
139 #[used]
140 static BOOT2: [u8; 256] = rp2040_boot2::$loader;
141 )*
142
143 #[cfg(not(any( $( feature = $feature),* )))]
144 #[link_section = ".boot2"]
145 #[used]
146 static BOOT2: [u8; 256] = rp2040_boot2::$default;
147 }
148}
149
150select_bootloader! {
151 "boot2-at25sf128a" => BOOT_LOADER_AT25SF128A,
152 "boot2-gd25q64cs" => BOOT_LOADER_GD25Q64CS,
153 "boot2-generic-03h" => BOOT_LOADER_GENERIC_03H,
154 "boot2-is25lp080" => BOOT_LOADER_IS25LP080,
155 "boot2-ram-memcpy" => BOOT_LOADER_RAM_MEMCPY,
156 "boot2-w25q080" => BOOT_LOADER_W25Q080,
157 "boot2-w25x10cl" => BOOT_LOADER_W25X10CL,
158 default => BOOT_LOADER_W25Q080
159}
137 160
138pub mod config { 161pub mod config {
139 #[non_exhaustive] 162 #[non_exhaustive]