From 1c6a816182632b01f9a9236709e44eb8272cd31d Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Mon, 28 Nov 2022 11:30:52 +0000 Subject: [PATCH] Use generic boot loader for arduino nano connect Fixes #503 --- boards/arduino_nano_connect/src/lib.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/boards/arduino_nano_connect/src/lib.rs b/boards/arduino_nano_connect/src/lib.rs index 2782c23..2412616 100644 --- a/boards/arduino_nano_connect/src/lib.rs +++ b/boards/arduino_nano_connect/src/lib.rs @@ -5,13 +5,25 @@ pub extern crate rp2040_hal as hal; #[cfg(feature = "rt")] pub use rp2040_hal::entry; -//// The linker will place this boot block at the start of our program image. We -//// need this to help the ROM bootloader get our code up and running. +/// The linker will place this boot block at the start of our program image. We +/// need this to help the ROM bootloader get our code up and running. +/// +/// According to +/// https://store.arduino.cc/products/arduino-nano-rp2040-connect +/// the board should contain a AT25SF128A flash chip. But +/// there are reports of board with different flash chips, +/// where the boot loader BOOT_LOADER_AT25SF128A does not +/// work. (https://github.com/rp-rs/rp-hal/issues/503) +/// +/// Therefore, the generic boot loader is used by default. For a specific +/// board, the flash performance can be increased by switching to the +/// matching boot loader. #[cfg(feature = "boot2")] #[link_section = ".boot2"] #[no_mangle] #[used] -pub static BOOT2_FIRMWARE: [u8; 256] = rp2040_boot2::BOOT_LOADER_AT25SF128A; +pub static BOOT2_FIRMWARE: [u8; 256] = rp2040_boot2::BOOT_LOADER_GENERIC_03H; +// pub static BOOT2_FIRMWARE: [u8; 256] = rp2040_boot2::BOOT_LOADER_AT25SF128A; pub use hal::pac;