From 176f281121841a61e3ba006efd0a1dc1c2d02635 Mon Sep 17 00:00:00 2001 From: s7rul Date: Mon, 12 Jun 2023 22:36:37 +0200 Subject: [PATCH 1/2] Added section for note about rp2040_boot2 When not using rp-pico but rp2040_boot2 the bootloader needs added. Added a section about this in the readme. --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 4384fcf..7e25d92 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ If you aren't using a debugger (or want to use cargo-embed/probe-rs-debugger), c
  • Installation of development dependencies
  • Running
  • Alternative runners
  • +
  • Notes on using rp2040_boot2
  • Roadmap
  • Contributing
  • Code of conduct
  • @@ -231,6 +232,23 @@ Some of the options for your `runner` are listed below: + + +
    +

    Notes on using rp2040_boot2

    + + When rp2040_boot2 is used instead of rp-pico the bootloader + must be written to the .boot2 sector. This can be done by adding the + following to the beginning of main.rs: + ```rust + use rp2040_boot2; + #[link_section = ".boot2"] + #[used] + pub static BOOT_LOADER: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; + ``` + +
    + ## Roadmap From 724b969373e782580082f6bde4bad488bb414db0 Mon Sep 17 00:00:00 2001 From: s7rul Date: Sat, 17 Jun 2023 09:36:21 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Making it clear why the boot-loader needs to be added manually. Co-authored-by: Jan Niehusmann --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7e25d92..6f99768 100644 --- a/README.md +++ b/README.md @@ -237,8 +237,9 @@ Some of the options for your `runner` are listed below:

    Notes on using rp2040_boot2

    - When rp2040_boot2 is used instead of rp-pico the bootloader - must be written to the .boot2 sector. This can be done by adding the + The second-stage boot loader must be written to the .boot2 section. That + is usually handled by the board support package (e.g.`rp-pico`). If you don't use + one, you should initialize the boot loader manually. This can be done by adding the following to the beginning of main.rs: ```rust use rp2040_boot2;