mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-24 05:01:31 +11:00
Fix building of examples which do not use defmt
Uses build.rs in board directories to set the linker options locally. The file .cargo/config can't be used for that, as in a workspace the local .cargo/config is ignored if the build is triggered from the workspace root.
This commit is contained in:
parent
46110c0d32
commit
365ac70ae4
|
@ -31,7 +31,6 @@ rustflags = [
|
||||||
"-C", "link-arg=-Tlink.x",
|
"-C", "link-arg=-Tlink.x",
|
||||||
"-C", "inline-threshold=5",
|
"-C", "inline-threshold=5",
|
||||||
"-C", "no-vectorize-loops",
|
"-C", "no-vectorize-loops",
|
||||||
"-C", "link-arg=-Tdefmt.x",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# This runner will make a UF2 file and then copy it to a mounted RP2040 in USB
|
# This runner will make a UF2 file and then copy it to a mounted RP2040 in USB
|
||||||
|
|
6
boards/pimoroni-plasma-2040/build.rs
Normal file
6
boards/pimoroni-plasma-2040/build.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
//! This build script makes sure the linker flag -Tdefmt.x is added
|
||||||
|
//! for the examples.
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("cargo:rustc-link-arg-examples=-Tdefmt.x");
|
||||||
|
}
|
6
boards/pimoroni-tiny2040/build.rs
Normal file
6
boards/pimoroni-tiny2040/build.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
//! This build script makes sure the linker flag -Tdefmt.x is added
|
||||||
|
//! for the examples.
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("cargo:rustc-link-arg-examples=-Tdefmt.x");
|
||||||
|
}
|
6
boards/rp-pico/build.rs
Normal file
6
boards/rp-pico/build.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
//! This build script makes sure the linker flag -Tdefmt.x is added
|
||||||
|
//! for the examples.
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("cargo:rustc-link-arg-examples=-Tdefmt.x");
|
||||||
|
}
|
Loading…
Reference in a new issue