Skip to content

Commit

Permalink
Merge #47
Browse files Browse the repository at this point in the history
47: Add support for defmt 0.3 r=jonas-schievink a=newAM

Update defmt (and other knurling-rs tools) to 0.3, see <https://ferrous-systems.com/blog/defmt-3/>

Co-authored-by: Alex Martens <alexmgit@protonmail.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
  • Loading branch information
3 people committed Nov 15, 2021
2 parents ae3d995 + 10ad5ae commit fa66e62
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: |
cargo build --all-targets
cargo build --all-targets --all-features
run: cargo build --all-targets
- name: Build All Features
# defmt 0.3 doesn't build when targeting windows
if: ${{ matrix.os != 'windows-latest' }}
run: cargo build --all-targets --all-features
- name: Run tests
run: cargo test

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package = "embedded-can"

[dependencies.defmt]
optional = true
version = "0.2.3"
version = ">=0.2.3,<0.4.0"

[features]
unstable-defmt = ["defmt"]
Expand Down
30 changes: 7 additions & 23 deletions testsuite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,19 @@ name = "interrupts"
harness = false

[dependencies]
cortex-m = "0.6.3"
cortex-m-rt = "0.6.13"
defmt = "0.2.0"
defmt-rtt = "0.2.0"
defmt-test = "0.2.0"
panic-probe = "0.2.0"
cortex-m = "0.7.3"
cortex-m-rt = "0.7.0"
defmt = "0.3.0"
defmt-rtt = "0.3.0"
defmt-test = "0.3.0"
panic-probe = "0.3.0"
#panic-probe = { version = "0.2.0", features = ["print-defmt"] }
# NB: We use F107 here, which seems to share its SVD file with the F105. The difference is that the
# 107 has Ethernet, but we don't use that.
stm32f1 = { version = "0.12.1", features = ["stm32f107", "rt"] }
stm32f1 = { version = "0.14.0", features = ["stm32f107", "rt"] }
nb = "1.0.0"
irq = "0.2.3"

[dependencies.bxcan]
path = ".."
features = ["unstable-defmt"]

[features]
# set logging levels here
default = [
# in tests, enable all logs
"defmt-trace",
# "dependency-a/defmt-trace",
]

# do NOT modify these features
defmt-default = []
defmt-trace = []
defmt-debug = []
defmt-info = []
defmt-warn = []
defmt-error = []

0 comments on commit fa66e62

Please sign in to comment.