Skip to content

Commit 4691c71

Browse files
authored
Merge pull request #13 from 9names/update_readme_0.2
Document how to add+build bootloader files
2 parents a10c385 + 773281d commit 4691c71

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ puts the array exported by this crate at the start of your flash image (0x000 to
1010
Add to your application's `Cargo.toml`:
1111

1212
```toml
13-
rp2040_boot2 = { version="0.1" }
13+
rp2040_boot2 = { version = "0.2" }
1414
```
1515

1616
Add to your `main.rs`:
@@ -65,6 +65,22 @@ Additionally, you need to change your linker script in order to specify the VMAs
6565
} > RAM AT > FLASH
6666
```
6767

68+
## Adding or changing an existing bootloader
69+
70+
In order to remove the need for GCC for users of this crate, we link against prebuilt versions of each of the bootloaders by default.
71+
72+
If you wish to add or change an existing bootloader you should install GCC and build with the feature `assemble`
73+
74+
```
75+
cargo build --features=assemble
76+
```
77+
78+
To add a new bootloader to the build you need to add it to `SOURCE_FILES` in `build.rs` and add an entry for it in `lib.rs`
79+
80+
Once you are done testing, add the padded binary file in the `bin` folder (example: `bin/boot2_w25q080.padded.bin`) to git
81+
82+
You can run `check-blobs.sh` to verify that you have built your latest sources before making a Pull Request.
83+
6884
## Licence
6985

7086
Some of the assembly source files are Copyright Raspberry Pi Trading and licensed under a BSD 3-clause licence. See source files for details.

0 commit comments

Comments
 (0)