Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TR3FIR-347 usb tbk #3452

Open
wants to merge 99 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
dec5950
configure artifactory publishing of relevant crates
TaylorCarpenter Jan 16, 2024
062e6e5
ci: Disable doctest to prevent failures from `cargo test`
DavidZemon Feb 5, 2024
a3155ad
add support for tim16/17 by using UIF remapping
TaylorCarpenter Mar 21, 2024
7b69066
Add TSC support
TaylorCarpenter Mar 21, 2024
3ddafaa
messy commit of more generic tsc functionality
TaylorCarpenter Jan 25, 2024
f8e3c0c
auto-configure pins when added to TSC
TaylorCarpenter Jan 25, 2024
3d357a0
Take references only
TaylorCarpenter Jan 25, 2024
79f506a
don't require mutable reference for EXTI waiting
TaylorCarpenter Mar 21, 2024
23a9adf
update version
TaylorCarpenter Mar 22, 2024
fbd56ba
update wpan version to build against the new base
TaylorCarpenter Mar 22, 2024
de44b50
update rest of the things
TaylorCarpenter Mar 22, 2024
20faa0a
resolve double-period counting
TaylorCarpenter Mar 23, 2024
7098084
bump version and dependencies of bootloader
TaylorCarpenter Apr 8, 2024
00d3ef6
[TR3FIR-141] Merge branch 'main' into pull_upstream2
mattcaron-token May 3, 2024
5512d01
[TR3FIR-141] Bump version numbers for crates.
mattcaron-token May 3, 2024
8ea456a
[TR3FIR-141] Update TSC to not use sealed types.
mattcaron-token May 3, 2024
b75ca66
Merge pull request #2 from tokenize-inc/pull_upstream
TaylorCarpenter May 9, 2024
b8d8a02
Merge branch 'token-main' into update_embassy
mattcaron-token May 9, 2024
88b7a5a
Merge branch 'main' into update_embassy
mattcaron-token May 9, 2024
b50fa13
[TR3FIR-141] Flip dependencies back to using artifactory.
mattcaron-token May 9, 2024
041883e
[TR3FIR-141] Re-fix double tick count.
mattcaron-token May 9, 2024
3d69805
Merge pull request #5 from tokenize-inc/update_embassy
mattcaron-token May 9, 2024
d102d06
Add required crate to local registry publishing
TaylorCarpenter May 13, 2024
9e886d9
Point to local registry version of metapac
TaylorCarpenter May 13, 2024
daad424
Point to local version of usb
TaylorCarpenter May 13, 2024
fec772d
Remove problematic print statement
TaylorCarpenter May 13, 2024
a42ba43
[TR3FIR-141] Bump the embassy-boot-stm32 version number.
mattcaron-token May 13, 2024
5ac75f2
Merge pull request #6 from tokenize-inc/chore/TR3FIR-141-update_versi…
mattcaron-token May 13, 2024
41706af
use internal hci package
TaylorCarpenter May 15, 2024
cde498f
Merge pull request #7 from tokenize-inc/update-hci-dep
TaylorCarpenter May 15, 2024
028b16e
Don't enable PLL if not given config
TaylorCarpenter May 20, 2024
2fa76b0
Merge pull request #8 from tokenize-inc/TR3FIR-168-embassy-dont-initi…
TaylorCarpenter May 21, 2024
77ac254
build(stm32): Reference local embassy projects
DavidZemon May 22, 2024
4300fb5
Merge pull request #9 from tokenize-inc/feat/fix-cargo-madness
mattcaron-token May 22, 2024
4a30923
[TR3FIR-149] Update embassy-stm32-wpan to use the latest stm32wb-hci
mattcaron-token May 23, 2024
ce3d401
Merge pull request #10 from tokenize-inc/feat/TR3FIR-149-set_ble_phy
mattcaron-token May 23, 2024
d2ef8f0
Add aes module which is mostly modified cryp module
grochowski-withintent May 21, 2024
efb112b
cryp.rs -> aes.rs changes, part one
grochowski-withintent May 24, 2024
46b9d2e
AES drivers ready for feedback loop testing
grochowski-withintent May 27, 2024
9987eba
Fixes
grochowski-withintent May 27, 2024
3afd974
Apply corrections coming from 1st on-device test
grochowski-withintent May 27, 2024
a65878c
Working temp
grochowski-withintent May 28, 2024
b60f69a
WIP
grochowski-withintent May 29, 2024
7608a05
Working, sanitized mvp
grochowski-withintent May 31, 2024
f7e784f
Working, sanitized mvp
grochowski-withintent May 31, 2024
4064587
Dma WIP: not fully working - inverted bytes
grochowski-withintent Jun 3, 2024
1b12ab1
Working full words
grochowski-withintent Jun 3, 2024
d87ce0c
Fully working AES DMA
grochowski-withintent Jun 4, 2024
38333cc
Remove debug logs; make block size a hard constant; small improvements
grochowski-withintent Jun 6, 2024
c31e7fc
Refactor: invert ownership within AES module, simplify byte filling l…
grochowski-withintent Jun 7, 2024
ffef90c
Restore overzealous changes of infrastracture and formatting
grochowski-withintent Jun 7, 2024
a0c636f
Make the nightly toolchain to be the default one
grochowski-withintent Jun 10, 2024
35949ae
Bump stm32wb-hci version
lukasz-zajac Jun 10, 2024
b460ce8
Merge pull request #12 from tokenize-inc/bump-stm32wb-hci
lukasz-zajac Jun 10, 2024
4dbaa9a
Add missing unstable feature declaration
grochowski-withintent Jun 10, 2024
d783db0
Bump metapac even further
grochowski-withintent Jun 11, 2024
2f40458
Bump metapac version to 15.10002.0
grochowski-withintent Jun 11, 2024
6f0f5ed
Bump crate version
grochowski-withintent Jun 11, 2024
a24d826
Fix CI with enforcing compilation target
grochowski-withintent Jun 11, 2024
c8249b4
Make usize `to_xx_bytes` usages adjusted to used architecture
grochowski-withintent Jun 12, 2024
f1f086c
Merge pull request #11 from tokenize-inc/tr3fir-155-finalize-AES-drivers
grochowski-withintent Jun 12, 2024
4176cff
Fix AES IV setup; fix embassy-stm32 version in neighbour crates
grochowski-withintent Jun 12, 2024
aa8cf5b
Further bump embassy-stm32 version
grochowski-withintent Jun 12, 2024
a5629f7
Merge pull request #13 from tokenize-inc/aes-fixes
grochowski-withintent Jun 13, 2024
7862258
[TR3FIR-197] Merge branch 'main' into TR3FIR-197-update_embassy
mattcaron-token Jun 13, 2024
3962205
[TR3FIR-197] Remove homegrown TSC driver.
mattcaron-token Jun 10, 2024
a8d94cc
[TR3FIR-197] Use updated stm32-metapac.
mattcaron-token Jun 20, 2024
d778382
Merge pull request #14 from tokenize-inc/TR3FIR-197-update_embassy
mattcaron-token Jun 26, 2024
250e1fe
[TR3FIR-197] I missed a couple dependency version updates for embassy…
mattcaron-token Jun 26, 2024
c329901
Merge pull request #15 from tokenize-inc/chore/TR3FIR-197-missed_a_co…
mattcaron-token Jun 26, 2024
142d2c0
TR3FIR-197 Add SOP document for how to update embassy.
mattcaron-token Jun 26, 2024
ac24702
Merge pull request #16 from tokenize-inc/TR3FIR-197-add_readme_sop_doc
mattcaron-token Jun 26, 2024
18a54e0
Add resetting the peripheral while creating `AesCcm` instance
grochowski-withintent Jul 8, 2024
b3b7a90
Merge pull request #18 from tokenize-inc/TR3FIR-237-fix-broken-aes-ccm
grochowski-withintent Jul 9, 2024
e60477a
fix: [TR3FIR-238] replace coreid detection values with shifted ones
mszustakiewicz-i Jun 28, 2024
659ce40
Merge pull request #17 from tokenize-inc/TR3FIR-238-HSEM-panics-on-CP…
mszustakiewicz-i Jul 9, 2024
a3c654a
[TR3FIR-198] Add function to send the flash erase activity command.
mattcaron-token Jul 5, 2024
a31e57d
Merge pull request #19 from tokenize-inc/feat/TR3FIR-198-add_flash_co…
mattcaron-token Jul 9, 2024
5b418fb
[TR3FIR-275] Merge branch 'main' into chore/TR3FIR-275-update_embassy
mattcaron-token Jul 23, 2024
c17ce6f
[TR3FIR-275] Roll back versions to match upstream.
mattcaron-token Jul 23, 2024
4e88999
[TR3FIR-275] Remove artifactory registry entries.
mattcaron-token Jul 23, 2024
7a40279
[TR3FIR-275] Remove Token README.
mattcaron-token Jul 23, 2024
00d53ec
[TR3FIR-275] Suppress a warning.
mattcaron-token Jul 24, 2024
bbdce13
[TR3FIR-275] Change deprecated config directive.
mattcaron-token Jul 24, 2024
e6d8d92
Merge pull request #22 from tokenize-inc/chore/TR3FIR-275-update_embassy
mattcaron-token Jul 29, 2024
117e820
Implemented PKA module
Jul 4, 2024
a2090a0
[TR3FIR-217] Refactor PKA and remove RSA struct
RafalUlko Jul 22, 2024
9e481f8
Merge pull request #20 from tokenize-inc/pka_implement
lukasz-zajac Aug 5, 2024
640a30d
[TR3FIR-336] DOCS Document Token changes to baseline embassy.
mattcaron-token Aug 15, 2024
3ec8efc
Merge pull request #23 from tokenize-inc/docs/TR3FIR-336-document_tok…
Aug 20, 2024
af79435
[TR3FIR-345] Bump stm32wb-hci version
lukasz-zajac Sep 3, 2024
cab40fd
Merge pull request #24 from tokenize-inc/TR3FIR-345-l2cap-connection-…
lukasz-zajac Sep 3, 2024
124f251
Bump stm32-metapac
grochowski-withintent Sep 23, 2024
84cc9bd
Merge pull request #25 from tokenize-inc/bump-stm32-metapac-to-15-1004-0
grochowski-withintent Sep 23, 2024
78106a0
[TR3FIR-440] Bump stm32wb-hci version
lukasz-zajac Oct 11, 2024
edf56f7
Merge pull request #26 from tokenize-inc/TR3FIR-440
lukasz-zajac Oct 11, 2024
715c100
[TR3FIR-449] Bump stm32wb-hci version
lukasz-zajac Oct 14, 2024
c614253
Merge pull request #27 from tokenize-inc/TR3FIR-449
lukasz-zajac Oct 15, 2024
e4668d2
Fixing missing impl for the msos structures
TylerGajewski-Token Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
201 changes: 201 additions & 0 deletions README.Token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# Token modifications to baseline embassy.

1. **Files**: `*/.cargo/config.toml`

* **Changes**: Added our local repository information.
* **Rationale**: So that we can publish to our artifactory insance.
* **Status**: No longer necessary. We aren't publishing to artifactory anymore. We are consuming `embassy` as a
submodule.
* **Conflict Potential**: Low
* Upstream would have to add a configuration of their own.

1. **File**: `embassy-boot-stm32/Cargo.toml`

* **Changes**:
1. Added `defmt-rtt` dependency.
1. Enabled the `rt` feature in `embassy-stm32`.
1. Set `stm32wb55vg` as a `default` feature.
1. Set `debug` to `defmt-rtt`
1. Added a bunch of boards as options (including ours).
* **Rationale**:
1. Allows us to use `defmt-rtt` for debugging.
1. Enables the minimal runtime for cortex-m. See [the embassy docs for that feature](https://docs.embassy.dev/embassy-stm32/git/stm32f103c8/index.html#feature-flags) which enables the [rt feature in stm32-metapac](https://docs.rs/crate/stm32-metapac/latest/features).
1. This is our chip variant. Defaulting it here means we don't need to set it everywhere.
1. Automatically uses `defmt-rtt` for debug output when debugging is enabled.
1. Allows us to select our board.
* **Status**: Necessary
* **Conflict Potential**: Medium

1. **File**: `embassy-boot/Cargo.toml`

* **Changes**: Changed uses of `default_features` to `default-features`.
* **Rationale**: Suppresses a deprecation warning from the linter.
* **Status**: Necessary, unless you want to be annoyed.
* **Conflict Potential**: High
* Eventually, upstream is going to make this change, at which point we will be guaranteed a conflict. However, we should just accept it and then we will no longer be deviating from upstream.

1. **Files**: `embassy-executor-macros/Cargo.toml`, `embassy-futures/Cargo.toml`, and `embassy-time-queue-driver/Cargo.toml`.

* **Changes**: Set `doctest` to `false`.
* **Rationale**: We don't care about a third party module's documentation failing tests.
* **Status**: Necessary, unless we want to add the docs ourselves.
* **Conflict Potential**: Low

1. **File**: `embassy-executor/Cargo.toml`

* **Changes**: Added `optional = true` to the `embassy-time-driver` and `embassy-time-queue-driver` dependency lines.
* **Rationale**: We want to be able to switch the dependency on and off.
* **Status**: Necessary, assuming that we want to have this flexibility.
* **Conflict Potential**: Medium
* There's a version number in this line, so if upstream ever updates the version, it will conflict.

1. **File**: `embassy-stm32-wpan/Cargo.toml`

* **Changes**:
1. Changed `embassy-stm32`'s dependency line to be ` default-features = false, features=["rt"]`.
1. Some option ordering on some other lines.
1. `stm32wb-hci` line changed to use our artifactory and version.
1. Add a `default` entry enabling the `stm32wb55vg` feature.
* **Rationale**:
1. We're using the minimal runtime for cortex-m (See [the embassy docs for that feature](https://docs.embassy.dev/embassy-stm32/git/stm32f103c8/index.html#feature-flags) which enables the [rt feature in stm32-metapac](https://docs.rs/crate/stm32-metapac/latest/features).), but none of the other features for this crate.
1. I expect someone's automatic formatter made these changes, as there is no functional change here.
1. We added things to `stm32wb-hci` relative to upstream, so we need to use our fork.
1. We're using this chip variant.
* **Status**:
1. Necessary
1. Unnecessary, but the code formatter is going to change it on save every time we touch this file.
1. Necessary
1. Necessary
* **Conflict Potential**: High
1. There are a version numbers in these lines, so if upstream ever updates the version, it will conflict.
1. As above.
1. As above, but more, as upstream `stm32wb-hci` changes more frequently - and therefore we need to merge the changes into ours, update it, etc.
1. Will conflict if upstream adds a default features line.

1. **File**: `embassy-stm32-wpan/src/sub/sys.rs`

* **Changes**: Added `shci_c2_flash_erase_activity` function.
* **Rationale**: We need to be able to tell CPU2 that we're erasing flash (per best practices as detailed on the [Flash and BLE contention page](https://tokenring.atlassian.net/wiki/spaces/Firmware/pages/216301570/Flash+and+BLE+contention)).
* **Status**: Necessary
* **Conflict Potential**: Low
* There will only be a conflict if upstream adds this.

1. **File**: `embassy-stm32-wpan/src/unsafe_linked_list.rs`

* **Changes**: Commented out a debug line in the `debug_linked_list` function.
* **Rationale**: Taylor found this annoying. He committed the change with the message "Remove problematic print statement".
* **Status**: Unnecessary
* **Conflict Potential**: Low

1. **File**: `embassy-stm32/Cargo.toml`

* **Changes**:
1. Changed the `stm32-metapac` line to use our repository and version.
1. Added `stm32wb55vg` to the `default` feature list.
1. Added lines to allow TIM16 and TIM17 as the time driver.
* **Rationale**:
1. We added things to `stm32-metapac` relative to upstream, so we need to use our fork.
1. This is the chip variant that we are using.
1. We have these timers in our chip, this allows us to use them.
* **Status**: Necessary
* **Conflict Potential**: High
1. Upstream `stm32-metapac` changes relatively frequently - and therefore we need to merge the changes into ours, update it, etc.
1. If upstream changes the default feature list, it will conflict.
1. If upstream ever adds these, it will conflict.

1. **File**: `embassy-stm32/build.rs`

* **Changes**:
1. Added build support for using TIM16 and TIM17 as the time drivers.
1. Added build support for using the AES hardware.
* **Rationale**:
1. We have these timers in our chip, this allows us to use them.
1. We have AES hardware in our chip, this allows us to use it.
* **Status**: Necessary
* **Conflict Potential**: Medium
1. If upstream ever adds these, it will conflict.
1. As above.

1. **File**: `embassy-stm32/src/aes/mod.rs`

* **Changes**: Added AES driver.
* **Rationale**: We wanted to be able to use the AES hardware.
* **Status**: Necessary, unless we want to drop hardware AES.
* **Conflict Potential**: Medium
* If upstream ever adds this driver, it will conflict.

1. **File**: `embassy-stm32/src/exti.rs`

* **Changes**: Changed to not require a mutable reference when waiting on an external interrupt.
* **Rationale**: Unsure. Taylor made this change and didn't explain, apart from:
> don't require mutable reference for EXTI waiting
>
> Requires removing implementation of embedded-hal, otherwise it creates a recursive loop

And there was no ticket associated with it.
* **Status**: Unsure if necessary.
* **Conflict Potential**: Low

1. **File**: `embassy-stm32/src/hsem/mod.rs`

* **Changes**: Fix a bug in the HSEM implementation on our core.
* **Rationale**: HSEM was panicking on CPUID check. (See [TR3FIR-238](https://tokenring.atlassian.net/browse/TR3FIR-238).)
* **Status**: Necessary.
* **Conflict Potential**: Medium
* Eventually, upstream will fix this bug and we'll have to replace our fix with theirs.

1. **File**: `embassy-stm32/src/lib.rs`

* **Changes**:
1. Added some feature flags to the library crate which are necessary to support the AES driver.
1. Added the AES driver as a `mod` so it gets compiled in.
* **Rationale**:
1. We need these flags enable to support code constructs used by the AES driver.
1. We wanted the AES driver.
* **Status**: Necessary, unless we want to drop hardware AES.
* **Conflict Potential**: Medium
* If upstream ever adds this driver, it will conflict.

1. **File**: `embassy-stm32/src/rcc/l.rs`

* **Changes**: Don't enable the PLL unless we were provided with a config.
* **Rationale**: Power savings. Fixed in [TR3FIR-168](https://tokenring.atlassian.net/browse/TR3FIR-168) where we don't enable clocks we don't want.
* **Status**: Necessary, for power savings.
* **Conflict Potential**: Low

1. **File**: `embassy-stm32/src/spi/mod.rs`

* **Changes**: Added `allow(dead_code)` for an unused function.
* **Rationale**: Newly-merged code from upstream was now causing a build warning, so suppress it.
* **Status**: Necessary, unless you like compilation warnings.
* **Conflict Potential**: Low

1. **File**: `embassy-stm32/src/time_driver.rs`

* **Changes**:
1. Added support for using TIM16 and TIM17.
1. Change `calc_now` logic to handle overflow.
1. Enable overflow interrupts and handle them.
* **Rationale**:
1. We have these timers in our chip, this allows us to use them.
1. We wanted to be able to calculate the current time properly, even if the counter had overflowed.
1. As above.
* **Status**: Necessary
* **Conflict Potential**: Low

1. **Files**: `rust-toolchain-nightly.toml` and `rust-toolchain-stable.toml`

* **Changes**: Swapped the two files.
* **Rationale**: We are using unstable nightly features.
* **Status**: Necessary, though we could do this better.
* Rather than just lying to `cargo` and telling it that the nightly toolchain is the stable one, there should be a way to just tell it to use the nightly toolchain for all builds.
* **Conflict Potential**: Medium
* Whenever upstream updates their toolchain, we need to adjust this accordingly.

1. **Files**: `README.Token.md`

* **Changes**: Added Token-specifc readme.
* **Rationale**: We wanted documentation of our changes.
* **Status**: Necessary
* **Conflict Potential**: None
* Does not exist upstream, and highly unlikely they would ever add it.
37 changes: 37 additions & 0 deletions embassy-boot-stm32/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Replacing crates.io is called "source replacement". See:
# https://doc.rust-lang.org/cargo/reference/source-replacement.html
#
# And registries are documented here:
# https://doc.rust-lang.org/nightly/cargo/reference/registries.html

# Makes artifactory the default registry and saves passing --registry
# parameter for some things (does not seem to work for commands that
# don't take a --registry argument)
#
# The default is our local registry because we should never be
# publishing to anything else unless we're working on public crates on
# crates.io, in which case we want a safe default - better to publish
# open source code to our private repo than private code to crates.io.
[registry]
default = "artifactory"
global-credential-providers = ["cargo:token"]

# Establish our artifactory remote as a registry
[registries.artifactory-remote]
index = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-remote/index/"

# Our local artifactory registry.
[registries.artifactory]
index = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-local/index/"

# Optional, use with --registry to publish to crates.io
[registries.crates-io]
index = "https://github.com/rust-lang/crates.io-index"

# Use our artifactory remote as a candidate for source replacement.
[source.artifactory-remote]
registry = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-remote/index/"

# Replace crates.io with our artifactory remote.
[source.crates-io]
replace-with = "artifactory-remote"
22 changes: 21 additions & 1 deletion embassy-boot-stm32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ target = "thumbv7em-none-eabi"

[dependencies]
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.4", optional = true }
log = { version = "0.4", optional = true }

embassy-sync = { version = "0.6.0", path = "../embassy-sync" }
embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false }
embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, features=["rt"]}
embassy-boot = { version = "0.2.0", path = "../embassy-boot" }
cortex-m = { version = "0.7.6" }
cortex-m-rt = { version = "0.7" }
Expand All @@ -34,8 +35,27 @@ embedded-storage-async = { version = "0.4.1" }
cfg-if = "1.0.0"

[features]
default = ["stm32wb55vg"]
defmt = ["dep:defmt", "embassy-boot/defmt", "embassy-stm32/defmt"]
log = ["dep:log", "embassy-boot/log", "embassy-stm32/log"]
debug = ["defmt-rtt"]

stm32wb10cc = [ "embassy-stm32/stm32wb10cc" ]
stm32wb15cc = [ "embassy-stm32/stm32wb15cc" ]
stm32wb30ce = [ "embassy-stm32/stm32wb30ce" ]
stm32wb35cc = [ "embassy-stm32/stm32wb35cc" ]
stm32wb35ce = [ "embassy-stm32/stm32wb35ce" ]
stm32wb50cg = [ "embassy-stm32/stm32wb50cg" ]
stm32wb55cc = [ "embassy-stm32/stm32wb55cc" ]
stm32wb55ce = [ "embassy-stm32/stm32wb55ce" ]
stm32wb55cg = [ "embassy-stm32/stm32wb55cg" ]
stm32wb55rc = [ "embassy-stm32/stm32wb55rc" ]
stm32wb55re = [ "embassy-stm32/stm32wb55re" ]
stm32wb55rg = [ "embassy-stm32/stm32wb55rg" ]
stm32wb55vc = [ "embassy-stm32/stm32wb55vc" ]
stm32wb55ve = [ "embassy-stm32/stm32wb55ve" ]
stm32wb55vg = [ "embassy-stm32/stm32wb55vg" ]
stm32wb55vy = [ "embassy-stm32/stm32wb55vy" ]

[profile.dev]
debug = 2
Expand Down
37 changes: 37 additions & 0 deletions embassy-boot/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Replacing crates.io is called "source replacement". See:
# https://doc.rust-lang.org/cargo/reference/source-replacement.html
#
# And registries are documented here:
# https://doc.rust-lang.org/nightly/cargo/reference/registries.html

# Makes artifactory the default registry and saves passing --registry
# parameter for some things (does not seem to work for commands that
# don't take a --registry argument)
#
# The default is our local registry because we should never be
# publishing to anything else unless we're working on public crates on
# crates.io, in which case we want a safe default - better to publish
# open source code to our private repo than private code to crates.io.
[registry]
default = "artifactory"
global-credential-providers = ["cargo:token"]

# Establish our artifactory remote as a registry
[registries.artifactory-remote]
index = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-remote/index/"

# Our local artifactory registry.
[registries.artifactory]
index = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-local/index/"

# Optional, use with --registry to publish to crates.io
[registries.crates-io]
index = "https://github.com/rust-lang/crates.io-index"

# Use our artifactory remote as a candidate for source replacement.
[source.artifactory-remote]
registry = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-remote/index/"

# Replace crates.io with our artifactory remote.
[source.crates-io]
replace-with = "artifactory-remote"
4 changes: 2 additions & 2 deletions embassy-boot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ features = ["defmt"]
defmt = { version = "0.3", optional = true }
digest = "0.10"
log = { version = "0.4", optional = true }
ed25519-dalek = { version = "2", default_features = false, features = ["digest"], optional = true }
ed25519-dalek = { version = "2", default-features = false, features = ["digest"], optional = true }
embassy-embedded-hal = { version = "0.1.0", path = "../embassy-embedded-hal" }
embassy-sync = { version = "0.6.0", path = "../embassy-sync" }
embedded-storage = "0.3.1"
Expand All @@ -42,7 +42,7 @@ rand = "0.8"
futures = { version = "0.3", features = ["executor"] }
sha1 = "0.10.5"
critical-section = { version = "1.1.1", features = ["std"] }
ed25519-dalek = { version = "2", default_features = false, features = ["std", "rand_core", "digest"] }
ed25519-dalek = { version = "2", default-features = false, features = ["std", "rand_core", "digest"] }

[features]
ed25519-dalek = ["dep:ed25519-dalek", "_verify"]
Expand Down
37 changes: 37 additions & 0 deletions embassy-embedded-hal/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Replacing crates.io is called "source replacement". See:
# https://doc.rust-lang.org/cargo/reference/source-replacement.html
#
# And registries are documented here:
# https://doc.rust-lang.org/nightly/cargo/reference/registries.html

# Makes artifactory the default registry and saves passing --registry
# parameter for some things (does not seem to work for commands that
# don't take a --registry argument)
#
# The default is our local registry because we should never be
# publishing to anything else unless we're working on public crates on
# crates.io, in which case we want a safe default - better to publish
# open source code to our private repo than private code to crates.io.
[registry]
default = "artifactory"
global-credential-providers = ["cargo:token"]

# Establish our artifactory remote as a registry
[registries.artifactory-remote]
index = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-remote/index/"

# Our local artifactory registry.
[registries.artifactory]
index = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-local/index/"

# Optional, use with --registry to publish to crates.io
[registries.crates-io]
index = "https://github.com/rust-lang/crates.io-index"

# Use our artifactory remote as a candidate for source replacement.
[source.artifactory-remote]
registry = "sparse+https://tokenizeinc.jfrog.io/artifactory/api/cargo/cargo-remote/index/"

# Replace crates.io with our artifactory remote.
[source.crates-io]
replace-with = "artifactory-remote"
Loading