Skip to content

Commit 27010b0

Browse files
committed
Use workspace dependencies
1 parent a9738ef commit 27010b0

File tree

6 files changed

+26
-13
lines changed

6 files changed

+26
-13
lines changed

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ members = [
44
"e310x",
55
"e310x-hal",
66
"hifive1",
7+
"hifive1-examples",
78
]
9+
default-members = [
10+
"e310x",
11+
"e310x-hal",
12+
"hifive1",
13+
]
14+
15+
[workspace.dependencies]
16+
critical-section = "1.2.0"
17+
riscv = { git = "https://github.com/rust-embedded/riscv.git", branch = "post-init" }
18+
riscv-peripheral = { git = "https://github.com/rust-embedded/riscv.git", branch = "post-init" }
19+
riscv-rt = { git = "https://github.com/rust-embedded/riscv.git", branch = "post-init", features = ["single-hart", "no-interrupts"] }

e310x-hal/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ embedded-hal-nb = "1.0.0"
1616
embedded-io = "0.6.1"
1717
e310x = { path = "../e310x", version = "0.12.0", features = ["rt", "critical-section"] }
1818
nb = "1.0.0"
19-
portable-atomic = { version = "1.9", default-features = false}
20-
riscv = { version = "0.14.0", features = ["critical-section-single-hart"] }
19+
portable-atomic = { version = "1.9", default-features = false }
20+
riscv = { workspace = true, features = ["critical-section-single-hart"] }
2121

2222
[features]
2323
g002 = ["e310x/g002"]

e310x/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ rust-version = "1.76"
1111
edition = "2021"
1212

1313
[dependencies]
14-
critical-section = { version = "1.2.0", optional = true }
15-
riscv = "0.14.0"
16-
riscv-peripheral = "0.3.0"
17-
riscv-rt = { version = "0.15.0", features = ["no-interrupts"], optional = true }
14+
critical-section = { workspace = true, optional = true }
15+
riscv = { workspace = true }
16+
riscv-peripheral = { workspace = true }
17+
riscv-rt = { workspace = true, optional = true }
1818
vcell = "0.1.3"
1919

2020
[features]

hifive1-examples/.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ rustflags = [
99

1010
[build]
1111
target = "riscv32imc-unknown-none-elf"
12+
13+
[env]
14+
RISCV_RT_BASE_ISA = "rv32i"

hifive1-examples/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ license = "ISC"
1010
edition = "2021"
1111
rust-version = "1.72"
1212

13-
[workspace]
14-
1513
[dependencies]
16-
critical-section = { version = "1.2.0" }
14+
critical-section = { workspace = true }
1715
hifive1 = { path = "../hifive1", version = "0.13.0", features = ["board-hifive1-revb"] } # Change to your board
18-
riscv = { version = "0.14.0" }
19-
riscv-rt = { version = "0.15.0", features = ["single-hart"] }
16+
riscv = { workspace = true }
17+
riscv-rt = { workspace = true, features = [] }
2018
panic-halt = "1.0.0"
2119
semihosting = { version = "0.1", features = ["stdio", "panic-handler"] }
2220
max3010x = "0.2.0"

hifive1/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ edition = "2021"
1111
rust-version = "1.76"
1212

1313
[dependencies]
14-
critical-section = { version = "1.1.3" }
14+
critical-section = { workspace = true }
1515
e310x-hal = { path = "../e310x-hal", version = "0.12.0" }
1616
nb = "1.0.0"
17-
riscv = "0.14.0"
17+
riscv = { workspace = true }
1818

1919
[features]
2020
board-hifive1 = []

0 commit comments

Comments
 (0)