Skip to content

Commit 392b874

Browse files
committed
bsp(atsame54_xpro): Add defmt feature
1 parent 6cc41bd commit 392b874

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

boards/atsame54_xpro/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ rtt-target = {version = "0.3", features = ["cortex-m"]}
3838

3939
[features]
4040
default = ["rt", "atsamd-hal/same54p"]
41+
defmt = ["atsamd-hal/defmt"]
4142
dma = ["atsamd-hal/dma"]
4243
max-channels = ["dma", "atsamd-hal/max-channels"]
4344
# Enable async support from atsamd-hal

boards/atsame54_xpro/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ fn main() {
1212
println!("cargo:rustc-link-search={}", out.display());
1313
println!("cargo:rerun-if-changed=memory.x");
1414
}
15+
if env::var_os("CARGO_FEATURE_DEFMT").is_some() {
16+
println!("cargo:rustc-link-arg=-Tdefmt.x");
17+
}
1518
println!("cargo:rerun-if-changed=build.rs");
1619
}

0 commit comments

Comments
 (0)