aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/Cargo.toml
diff options
context:
space:
mode:
author9names <[email protected]>2025-02-16 12:34:48 +1100
committer9names <[email protected]>2025-02-16 15:43:01 +1100
commit4cc5ab9474773148dd8976e22f3fb6f5e270cd3a (patch)
tree96058b9a554ea8dee7895875d9a20a4ebad358bc /embassy-rp/Cargo.toml
parent0ce6da9706b9d929691c9292c923117fcbc2f9c6 (diff)
Add rp235x imagedef features (based on rp2040 boot2 features)
rp235x firmwares need an Image Definition if they want to be called from the rp235x bootrom. Currently this Image Definition is manually added to each project/example, but for most users it will always be the default (Secure Exe). This commit adds crate features to allow users to configure this, with the default of including a Secure Exe Image Definition in. Just like the boot2-* features, this includes an opt-out (imagedef-none) to allow the user to not make use of this included Image Definition.
Diffstat (limited to 'embassy-rp/Cargo.toml')
-rw-r--r--embassy-rp/Cargo.toml25
1 files changed, 24 insertions, 1 deletions
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index 4e5c66feb..d65e281ee 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -83,7 +83,7 @@ boot2-ram-memcpy = []
83boot2-w25q080 = [] 83boot2-w25q080 = []
84## Use boot2 with support for Winbond W25X10CL SPI flash. 84## Use boot2 with support for Winbond W25X10CL SPI flash.
85boot2-w25x10cl = [] 85boot2-w25x10cl = []
86## Have embassy not provide the boot2 so you can use your own. 86## Have embassy-rp not provide the boot2 so you can use your own.
87## Place your own in the ".boot2" section like: 87## Place your own in the ".boot2" section like:
88## ``` 88## ```
89## #[link_section = ".boot2"] 89## #[link_section = ".boot2"]
@@ -92,6 +92,29 @@ boot2-w25x10cl = []
92## ``` 92## ```
93boot2-none = [] 93boot2-none = []
94 94
95#! ### Image Definition support
96#! RP2350's internal bootloader will only execute firmware if it has a valid Image Definition.
97#! There are other tags that can be used (for example, you can tag an image as "DATA")
98#! but programs will want to have an exe header. "SECURE_EXE" is usually what you want.
99#! Use imagedef-none if you want to configure the Image Definition manually
100#! If none are selected, imagedef-secure-exe will be used
101
102## Image is executable and starts in Secure mode
103imagedef-secure-exe = []
104## Image is executable and starts in Non-secure mode
105imagedef-nonsecure-exe = []
106
107## Have embassy-rp not provide the Image Definition so you can use your own.
108## Place your own in the ".start_block" section like:
109## ```
110## use embassy_rp::block::ImageDef;
111##
112## #[link_section = ".start_block"]
113## #[used]
114## static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); // Update this with your own implementation.
115## ```
116imagedef-none = []
117
95## Configure the hal for use with the rp2040 118## Configure the hal for use with the rp2040
96rp2040 = ["rp-pac/rp2040"] 119rp2040 = ["rp-pac/rp2040"]
97_rp235x = ["rp-pac/rp235x"] 120_rp235x = ["rp-pac/rp235x"]