diff options
| author | 9names <[email protected]> | 2024-01-14 13:21:50 +1100 |
|---|---|---|
| committer | 9names <[email protected]> | 2024-01-14 13:21:50 +1100 |
| commit | 4770325bb7b4beca1b2b108674ce5dfbcf17a49f (patch) | |
| tree | 71641699f905ee8ae2a60063f5a14dc0d0dd334c /embassy-rp | |
| parent | bb755963025f55cc04aaabab1e0073b2edfa5bb6 (diff) | |
Additional features docs for embassy-rp
Diffstat (limited to 'embassy-rp')
| -rw-r--r-- | embassy-rp/Cargo.toml | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index edb152a89..794f1109c 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -22,17 +22,17 @@ features = ["defmt", "unstable-pac", "time-driver"] | |||
| 22 | 22 | ||
| 23 | [features] | 23 | [features] |
| 24 | default = [ "rt" ] | 24 | default = [ "rt" ] |
| 25 | ## Enable the RP runtime. | 25 | ## Enable the rt feature of [`rp-pac`](https://docs.rs/crates/rp-pac). This brings in the [`cortex-m-rt`](https://docs.rs/cortex-m-rt) crate, which adds startup code and minimal runtime initialization. |
| 26 | rt = [ "rp-pac/rt" ] | 26 | rt = [ "rp-pac/rt" ] |
| 27 | 27 | ||
| 28 | ## Enable defmt. | 28 | ## Enable [defmt support](https://docs.rs/defmt) and enables `defmt` debug-log messages and formatting in embassy drivers. |
| 29 | defmt = ["dep:defmt", "embassy-usb-driver/defmt", "embassy-hal-internal/defmt"] | 29 | defmt = ["dep:defmt", "embassy-usb-driver/defmt", "embassy-hal-internal/defmt"] |
| 30 | 30 | ||
| 31 | ## critical section that is safe for multicore use. | 31 | ## Configure the critical section crate to use an implementation that is safe for multicore use on rp2040. |
| 32 | critical-section-impl = ["critical-section/restore-state-u8"] | 32 | critical-section-impl = ["critical-section/restore-state-u8"] |
| 33 | 33 | ||
| 34 | ## Reexport the PAC for the currently enabled chip at `embassy_rp::pac`. | 34 | ## Reexport the PAC for the currently enabled chip at `embassy_rp::pac`. |
| 35 | ## This is unstable because semver-minor (non-breaking) releases of embassy-rp may major-bump (breaking) the PAC version. | 35 | ## This is unstable because semver-minor (non-breaking) releases of `embassy-rp` may major-bump (breaking) the PAC version. |
| 36 | ## If this is an issue for you, you're encouraged to directly depend on a fixed version of the PAC. | 36 | ## If this is an issue for you, you're encouraged to directly depend on a fixed version of the PAC. |
| 37 | ## There are no plans to make this stable. | 37 | ## There are no plans to make this stable. |
| 38 | unstable-pac = [] | 38 | unstable-pac = [] |
| @@ -40,15 +40,18 @@ unstable-pac = [] | |||
| 40 | ## Enable the timer for use with `embassy-time` with a 1MHz tick rate. | 40 | ## Enable the timer for use with `embassy-time` with a 1MHz tick rate. |
| 41 | time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000"] | 41 | time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000"] |
| 42 | 42 | ||
| 43 | ## Enable ROM function cache. | 43 | ## Enable ROM function cache. This will store the address of a ROM function when first used, improving performance of subsequent calls. |
| 44 | rom-func-cache = [] | 44 | rom-func-cache = [] |
| 45 | ## Enable intrinsics. | 45 | ## Enable implementations of some compiler intrinsics using functions in the rp2040 Mask ROM. |
| 46 | ## These should be as fast or faster than the implementations in compiler-builtins. They also save code space and reduce memory contention. | ||
| 47 | ## Compiler intrinsics are used automatically, you do not need to change your code to get performance improvements from this feature. | ||
| 46 | intrinsics = [] | 48 | intrinsics = [] |
| 47 | ## Enable ROM v2 intrinsics. | 49 | ## Enable intrinsics based on extra ROM functions added in the v2 version of the rp2040 Mask ROM. |
| 50 | ## This version added a lot more floating point operations - many f64 functions and a few f32 functions were added in ROM v2. | ||
| 48 | rom-v2-intrinsics = [] | 51 | rom-v2-intrinsics = [] |
| 49 | 52 | ||
| 50 | ## Allow using QSPI pins as GPIO pins. This is mostly not what you want (because your flash lives there) | 53 | ## Allow using QSPI pins as GPIO pins. This is mostly not what you want (because your flash is attached via QSPI pins) |
| 51 | ## and would add both code and memory overhead when enabled needlessly. | 54 | ## and adds code and memory overhead when this feature is enabled. |
| 52 | qspi-as-gpio = [] | 55 | qspi-as-gpio = [] |
| 53 | 56 | ||
| 54 | ## Indicate code is running from RAM. | 57 | ## Indicate code is running from RAM. |
| @@ -57,20 +60,24 @@ qspi-as-gpio = [] | |||
| 57 | run-from-ram = [] | 60 | run-from-ram = [] |
| 58 | 61 | ||
| 59 | #! ### boot2 flash chip support | 62 | #! ### boot2 flash chip support |
| 60 | #! If none of these are enabled, w25q080 is used by default (used on the pico) | 63 | #! RP2040's internal bootloader is only able to run code from the first 256 bytes of flash. |
| 61 | ## AT25SF128a. | 64 | #! A 2nd stage bootloader (boot2) is required to run larger programs from external flash. |
| 65 | #! Select from existing boot2 implementations via the following features. If none are selected, | ||
| 66 | #! boot2-w25q080 will be used (w25q080 is the flash chip used on the pico). | ||
| 67 | #! Each implementation uses flash commands and timings specific to a QSPI flash chip family for better performance. | ||
| 68 | ## Use boot2 with support for Renesas/Dialog AT25SF128a SPI flash. | ||
| 62 | boot2-at25sf128a = [] | 69 | boot2-at25sf128a = [] |
| 63 | ## GD25Q64cs. | 70 | ## Use boot2 with support for Gigadevice GD25Q64C SPI flash. |
| 64 | boot2-gd25q64cs = [] | 71 | boot2-gd25q64cs = [] |
| 65 | ## generic-03h. | 72 | ## Use boot2 that only uses generic flash commands - these are supported by all SPI flash, but are slower. |
| 66 | boot2-generic-03h = [] | 73 | boot2-generic-03h = [] |
| 67 | ## IS25LP080. | 74 | ## Use boot2 with support for ISSI IS25LP080 SPI flash. |
| 68 | boot2-is25lp080 = [] | 75 | boot2-is25lp080 = [] |
| 69 | ## ram-memcpy. | 76 | ## Use boot2 that copies the entire program to RAM before booting. This uses generic flash commands to perform the copy. |
| 70 | boot2-ram-memcpy = [] | 77 | boot2-ram-memcpy = [] |
| 71 | ## W25Q080. | 78 | ## Use boot2 with support for Winbond W25Q080 SPI flash. |
| 72 | boot2-w25q080 = [] | 79 | boot2-w25q080 = [] |
| 73 | ## W25X10cl. | 80 | ## Use boot2 with support for Winbond W25X10CL SPI flash. |
| 74 | boot2-w25x10cl = [] | 81 | boot2-w25x10cl = [] |
| 75 | 82 | ||
| 76 | [dependencies] | 83 | [dependencies] |
