Skip to content

Commit f2e9115

Browse files
committed
ci: Add tombi ci form toml file
https://tombi-toml.github.io/tombi seems like a great tool. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
1 parent badd797 commit f2e9115

File tree

7 files changed

+117
-39
lines changed

7 files changed

+117
-39
lines changed

.github/workflows/lint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,17 @@ jobs:
7373
run: |
7474
cd bluepill-prog && cargo clippy -- -D warnings
7575
cd ../picoprog && cargo clippy -- -D warnings
76+
tombi:
77+
name: TOML Validation
78+
needs: generate-matrix
79+
strategy:
80+
matrix:
81+
commit: ${{ fromJson(needs.generate-matrix.outputs.commits) }}
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@v4
85+
with:
86+
ref: ${{ matrix.commit }}
87+
- uses: tombi-toml/setup-tombi@v1
88+
- name: Validate TOML files
89+
run: tombi lint

Cargo.toml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,49 @@
11
[workspace]
2-
members = [
3-
"bluepill-prog",
4-
"picoprog",
5-
"serprog"
6-
]
72
resolver = "2"
3+
members = ["bluepill-prog", "picoprog", "serprog"]
84

95
[workspace.dependencies]
106
assign-resources = "0.4.1"
11-
cortex-m = { version = "0.7.7", features = ["inline-asm", "critical-section"] }
7+
cortex-m = { version = "0.7.7", features = ["critical-section", "inline-asm"] }
128
cortex-m-rt = "0.7.5"
139
critical-section = "1.2.0"
1410
defmt = "0.3.10"
1511
defmt-rtt = "0.4.1"
16-
embassy-executor = { version = "0.7.0", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "nightly"] }
12+
embassy-executor = { version = "0.7.0", features = [
13+
"arch-cortex-m",
14+
"executor-interrupt",
15+
"executor-thread",
16+
"nightly",
17+
] }
1718
embassy-futures = "0.1.1"
18-
embassy-rp = { version = "0.3.0", features = ["unstable-pac", "time-driver", "critical-section-impl", "rom-func-cache", "rom-v2-intrinsics", "rp2040"] }
19+
embassy-rp = { version = "0.3.0", features = [
20+
"critical-section-impl",
21+
"rom-func-cache",
22+
"rom-v2-intrinsics",
23+
"rp2040",
24+
"time-driver",
25+
"unstable-pac",
26+
] }
1927
embassy-stm32 = { version = "0.2.0" }
2028
embassy-sync = "0.6.2"
2129
embassy-time = "0.4.0"
22-
embassy-usb = { version = "0.4.0", features = ["max-handler-count-6", "max-interface-count-6"] }
30+
embassy-usb = { version = "0.4.0", features = [
31+
"max-handler-count-6",
32+
"max-interface-count-6",
33+
] }
2334
embedded-hal = "1.0.0"
2435
embedded-hal-async = "1.0.0"
25-
futures = { version = "0.3.31", default-features = false, features = ["async-await", "cfg-target-has-atomic", "unstable"] }
26-
heapless = { version = "0.8.0", features = ["portable-atomic-critical-section", "ufmt"] }
36+
futures = { version = "0.3.31", default-features = false, features = [
37+
"async-await",
38+
"cfg-target-has-atomic",
39+
"unstable",
40+
] }
41+
heapless = { version = "0.8.0", features = [
42+
"portable-atomic-critical-section",
43+
"ufmt",
44+
] }
2745
log = "0.4.26"
46+
num_enum = { version = "0.7.3", default-features = false }
2847
panic-probe = { version = "0.3.2", features = ["print-defmt"] }
2948
portable-atomic = { version = "1.11.0", features = ["critical-section"] }
3049
serprog = { path = "./serprog" }
@@ -33,7 +52,6 @@ stm32-fmc = { version = "0.4.0" }
3352
tock-registers = "0.9.0"
3453
ufmt = "0.2.0"
3554
zerocopy = { version = "0.8", features = ["derive"] }
36-
num_enum = { version = "0.7.3", default-features = false }
3755

3856
[patch.crates-io]
3957
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "17301c00e986c5b8536435ea31ebf5aaf13aed17" }
@@ -45,8 +63,8 @@ embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "17301c00e
4563
embassy-usb = { git = "https://github.com/embassy-rs/embassy", rev = "17301c00e986c5b8536435ea31ebf5aaf13aed17" }
4664

4765
[profile.release]
66+
opt-level = "s"
4867
debug = true
68+
lto = "fat"
4969
incremental = false
5070
codegen-units = 1
51-
opt-level = "s"
52-
lto = "fat"

bluepill-prog/Cargo.toml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,48 @@
11
[package]
22
name = "bluepill-prog"
33
version = "0.1.0"
4+
authors = ["Arthur Heymans <arthur@aheymans.xyz>"]
45
edition = "2021"
56
license = "Apache-2.0"
6-
authors = [ "Arthur Heymans <arthur@aheymans.xyz>" ]
77

88
[dependencies]
99
assign-resources.workspace = true
10-
cortex-m = { workspace = true, features = ["inline-asm", "critical-section-single-core"] }
10+
cortex-m = { workspace = true, features = [
11+
"critical-section-single-core",
12+
"inline-asm",
13+
] }
1114
cortex-m-rt.workspace = true
1215
critical-section.workspace = true
13-
defmt-rtt.workspace = true
1416
defmt.workspace = true
15-
embassy-executor = { workspace = true, features = ["defmt", "arch-cortex-m", "executor-thread", "nightly"] }
17+
defmt-rtt.workspace = true
18+
embassy-executor = { workspace = true, features = [
19+
"arch-cortex-m",
20+
"defmt",
21+
"executor-thread",
22+
"nightly",
23+
] }
1624
embassy-futures = { workspace = true, features = ["defmt"] }
17-
embassy-stm32 = { workspace = true, features = ["defmt", "stm32f103c8", "memory-x", "rt", "time-driver-any"] }
25+
embassy-stm32 = { workspace = true, features = [
26+
"defmt",
27+
"memory-x",
28+
"rt",
29+
"stm32f103c8",
30+
"time-driver-any",
31+
] }
1832
embassy-sync = { workspace = true, features = ["defmt"] }
19-
embassy-time = { workspace = true, features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
33+
embassy-time = { workspace = true, features = [
34+
"defmt",
35+
"defmt-timestamp-uptime",
36+
"tick-hz-32_768",
37+
] }
2038
embassy-usb = { workspace = true, features = ["defmt"] }
2139
futures.workspace = true
22-
heapless = { workspace = true, features = ["defmt-03", "portable-atomic", "portable-atomic-critical-section", "ufmt"] }
40+
heapless = { workspace = true, features = [
41+
"defmt-03",
42+
"portable-atomic",
43+
"portable-atomic-critical-section",
44+
"ufmt",
45+
] }
2346
panic-probe.workspace = true
2447
portable-atomic.workspace = true
2548
serprog.workspace = true

picoprog/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
22
linker = "flip-link"
33
runner = "elf2uf2-rs"
4-
#runner = "probe-rs run --chip RP2040"
4+
# runner = "probe-rs run --chip RP2040"
55

66
[build]
77
target = "thumbv6m-none-eabi"

picoprog/Cargo.toml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
11
[package]
22
name = "picoprog"
33
version = "0.1.0"
4+
authors = ["Marvin Drees <marvin.drees@9elements.com>"]
45
edition = "2021"
56
license = "Apache-2.0"
6-
authors = ["Marvin Drees <marvin.drees@9elements.com>"]
77

88
[dependencies]
99
assign-resources.workspace = true
10-
cortex-m = { workspace = true, features = ["inline-asm", "critical-section"] }
10+
cortex-m = { workspace = true, features = ["critical-section", "inline-asm"] }
1111
cortex-m-rt.workspace = true
12-
embassy-executor = { workspace = true, features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "nightly", "defmt"] }
12+
defmt.workspace = true
13+
defmt-rtt.workspace = true
14+
embassy-executor = { workspace = true, features = [
15+
"arch-cortex-m",
16+
"defmt",
17+
"executor-interrupt",
18+
"executor-thread",
19+
"nightly",
20+
] }
1321
embassy-futures.workspace = true
14-
embedded-hal.workspace = true
15-
embedded-hal-async.workspace = true
16-
serprog.workspace = true
17-
embassy-rp = { workspace = true, features = ["unstable-pac", "time-driver", "critical-section-impl", "rom-func-cache", "rom-v2-intrinsics", "rp2040"] }
22+
embassy-rp = { workspace = true, features = [
23+
"critical-section-impl",
24+
"rom-func-cache",
25+
"rom-v2-intrinsics",
26+
"rp2040",
27+
"time-driver",
28+
"unstable-pac",
29+
] }
1830
embassy-sync = { workspace = true, features = ["defmt"] }
1931
embassy-time.workspace = true
20-
embassy-usb = { workspace = true, features = ["max-handler-count-6", "max-interface-count-6", "defmt"] }
21-
heapless = { workspace = true, features = ["portable-atomic-critical-section", "ufmt"] }
32+
embassy-usb = { workspace = true, features = [
33+
"defmt",
34+
"max-handler-count-6",
35+
"max-interface-count-6",
36+
] }
37+
embedded-hal.workspace = true
38+
embedded-hal-async.workspace = true
39+
heapless = { workspace = true, features = [
40+
"portable-atomic-critical-section",
41+
"ufmt",
42+
] }
2243
log.workspace = true
44+
serprog.workspace = true
2345
static_cell.workspace = true
2446
ufmt.workspace = true
25-
defmt.workspace = true
26-
defmt-rtt.workspace = true

rust-toolchain.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[toolchain]
22
channel = "nightly-2025-02-01"
3-
components = [ "rust-src", "rustfmt", "llvm-tools", "miri" ]
3+
components = ["rust-src", "rustfmt", "llvm-tools", "miri"]
44
targets = [
5-
"thumbv6m-none-eabi",
6-
"thumbv7m-none-eabi",
5+
"thumbv6m-none-eabi",
6+
"thumbv7m-none-eabi",
77
]

serprog/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ edition = "2021"
55
license = "Apache-2.0"
66

77
[dependencies]
8-
embassy-usb.workspace = true
8+
# log.workspace = true
9+
defmt.workspace = true
910
embassy-futures.workspace = true
1011
embassy-sync.workspace = true
12+
embassy-usb.workspace = true
1113
embedded-hal.workspace = true
1214
embedded-hal-async.workspace = true
13-
#log.workspace = true
14-
defmt.workspace = true
1515
num_enum.workspace = true
1616
tock-registers.workspace = true
1717
zerocopy.workspace = true
18+
19+
[features]
20+
usb2 = []

0 commit comments

Comments
 (0)