diff options
Diffstat (limited to 'examples/nrf')
| -rw-r--r-- | examples/nrf/.cargo/config.toml | 12 | ||||
| -rw-r--r-- | examples/nrf/build.rs | 4 |
2 files changed, 4 insertions, 12 deletions
diff --git a/examples/nrf/.cargo/config.toml b/examples/nrf/.cargo/config.toml index 0151d1ed5..c75b5c539 100644 --- a/examples/nrf/.cargo/config.toml +++ b/examples/nrf/.cargo/config.toml | |||
| @@ -2,17 +2,5 @@ | |||
| 2 | # replace nRF82840_xxAA with your chip as listed in `probe-run --list-chips` | 2 | # replace nRF82840_xxAA with your chip as listed in `probe-run --list-chips` |
| 3 | runner = "probe-run --chip nRF52840_xxAA" | 3 | runner = "probe-run --chip nRF52840_xxAA" |
| 4 | 4 | ||
| 5 | rustflags = [ | ||
| 6 | # LLD (shipped with the Rust toolchain) is used as the default linker | ||
| 7 | "-C", "link-arg=--nmagic", | ||
| 8 | "-C", "link-arg=-Tlink.x", | ||
| 9 | "-C", "link-arg=-Tdefmt.x", | ||
| 10 | |||
| 11 | # Code-size optimizations. | ||
| 12 | "-Z", "trap-unreachable=no", | ||
| 13 | "-C", "inline-threshold=5", | ||
| 14 | "-C", "no-vectorize-loops", | ||
| 15 | ] | ||
| 16 | |||
| 17 | [build] | 5 | [build] |
| 18 | target = "thumbv7em-none-eabi" | 6 | target = "thumbv7em-none-eabi" |
diff --git a/examples/nrf/build.rs b/examples/nrf/build.rs index d534cc3df..30691aa97 100644 --- a/examples/nrf/build.rs +++ b/examples/nrf/build.rs | |||
| @@ -28,4 +28,8 @@ fn main() { | |||
| 28 | // here, we ensure the build script is only re-run when | 28 | // here, we ensure the build script is only re-run when |
| 29 | // `memory.x` is changed. | 29 | // `memory.x` is changed. |
| 30 | println!("cargo:rerun-if-changed=memory.x"); | 30 | println!("cargo:rerun-if-changed=memory.x"); |
| 31 | |||
| 32 | println!("cargo:rustc-link-arg-bins=--nmagic"); | ||
| 33 | println!("cargo:rustc-link-arg-bins=-Tlink.x"); | ||
| 34 | println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); | ||
| 31 | } | 35 | } |
