Skip to content

Commit

Permalink
Merge pull request #113 from malishav/update-readme
Browse files Browse the repository at this point in the history
Add default features to edhoc-rs-no_std example and update README.md
  • Loading branch information
malishav authored Oct 5, 2023
2 parents f7e94d9 + d88f01d commit 567669d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ To build an example application that works on the [nrf52840dk](https://www.nordi
# head to the example `no_std` example
cd ./examples/edhoc-rs-no_std

# build using the cryptocell310 crypto backend (hardware-accelerated)
cargo build --target="thumbv7em-none-eabihf" --release

# build using the psa crypto backend (software-based)
cargo build --target="thumbv7em-none-eabihf" --no-default-features --features="crypto-psa, rtt" --release
cargo build --target="thumbv7em-none-eabihf" --no-default-features --features="crypto-psa, ead-none, rtt" --release

# build using the cryptocell310 crypto backend (hardware-accelerated)
cargo build --target="thumbv7em-none-eabihf" --no-default-features --features="crypto-cryptocell310, rtt"
```

To build **and** flash to the board, replace the word `build` with `embed` in the commands above (you may need to `cargo install cargo-embed`).

For example: `cargo embed --target="thumbv7em-none-eabihf" --no-default-features --features="cryptocell310, rtt"`
For example: `cargo embed --target="thumbv7em-none-eabihf" --no-default-features --features="crypto-psa, ead-none, rtt"`

## Directory structure
This library is structured as a Workspace, a feature from Cargo which makes it easy to manage more than one package / application in the same repository. Here are its the main folders:
Expand Down
2 changes: 1 addition & 1 deletion examples/edhoc-rs-no_std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ panic-semihosting = { version = "0.6.0", features = ["exit"] }
rtt-target = { version = "0.3.1", features = ["cortex-m"] }

[features]
default = [ ]
default = [ "rtt", "crypto-cryptocell310", "ead-none" ]
rtt = [ ]
crypto-psa = [ "edhoc-rs/crypto-psa-baremetal" ]
crypto-cryptocell310 = [ "edhoc-rs/crypto-cryptocell310" ]
Expand Down

0 comments on commit 567669d

Please sign in to comment.