diff options
-rw-r--r-- | Cargo.toml | 16 | ||||
-rw-r--r-- | examples/.cargo/config | 19 | ||||
-rw-r--r-- | examples/build.rs | 5 | ||||
-rw-r--r-- | examples/rust-toolchain.toml | 6 |
4 files changed, 5 insertions, 41 deletions
@@ -26,14 +26,6 @@ embassy-nrf = { git = "https://github.com/embassy-rs/embassy" } embassy-macros = { git = "https://github.com/embassy-rs/embassy" } embassy-traits = { git = "https://github.com/embassy-rs/embassy" } -[profile.dev] -codegen-units = 1 -debug = 2 -debug-assertions = true -incremental = false -opt-level = 3 -overflow-checks = true - [profile.release] codegen-units = 1 debug = 2 @@ -43,14 +35,6 @@ lto = "fat" opt-level = 's' overflow-checks = false -# do not optimize proc-macro crates = faster builds from scratch -[profile.dev.build-override] -codegen-units = 8 -debug = false -debug-assertions = false -opt-level = 0 -overflow-checks = false - [profile.release.build-override] codegen-units = 8 debug = false diff --git a/examples/.cargo/config b/examples/.cargo/config index b8aa023..e9a3bdb 100644 --- a/examples/.cargo/config +++ b/examples/.cargo/config @@ -1,25 +1,6 @@ [target.'cfg(all(target_arch = "arm", target_os = "none"))'] runner = "probe-run --chip nRF52840_xxAA" -rustflags = [ - # LLD (shipped with the Rust toolchain) is used as the default linker - "-C", "link-arg=--nmagic", - "-Z", "trap-unreachable=no", - "-C", "link-arg=-Tlink.x", - "-C", "link-arg=-Tdefmt.x", - - # if you run into problems with LLD switch to the GNU linker by commenting out - # this line - # "-C", "linker=arm-none-eabi-ld", - - # if you need to link to pre-compiled C libraries provided by a C toolchain - # use GCC as the linker by commenting out both lines above and then - # uncommenting the three lines below - # "-C", "linker=arm-none-eabi-gcc", - # "-C", "link-arg=-Wl,-Tlink.x", - # "-C", "link-arg=-nostartfiles", -] - [build] # Pick ONE of these compilation targets # target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ diff --git a/examples/build.rs b/examples/build.rs index d534cc3..735fa25 100644 --- a/examples/build.rs +++ b/examples/build.rs @@ -28,4 +28,9 @@ fn main() { // here, we ensure the build script is only re-run when // `memory.x` is changed. println!("cargo:rerun-if-changed=memory.x"); + + println!("cargo:rustc-link-arg-bins=--nmagic"); + println!("cargo:rustc-link-arg-bins=-Tlink.x"); + println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); + } diff --git a/examples/rust-toolchain.toml b/examples/rust-toolchain.toml deleted file mode 100644 index 2db8bbd..0000000 --- a/examples/rust-toolchain.toml +++ /dev/null @@ -1,6 +0,0 @@ -# Before upgrading check that everything is available on all tier1 targets here: -# https://rust-lang.github.io/rustup-components-history -[toolchain] -channel = "nightly-2021-08-03" -components = ["rust-src", "rustfmt"] -targets = ["thumbv7em-none-eabihf"] |