diff options
Diffstat (limited to 'examples/rp')
| -rw-r--r-- | examples/rp/.cargo/config.toml | 11 | ||||
| -rw-r--r-- | examples/rp/build.rs | 5 |
2 files changed, 5 insertions, 11 deletions
diff --git a/examples/rp/.cargo/config.toml b/examples/rp/.cargo/config.toml index 9b852b8e9..1ce57510b 100644 --- a/examples/rp/.cargo/config.toml +++ b/examples/rp/.cargo/config.toml | |||
| @@ -1,16 +1,5 @@ | |||
| 1 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] | 1 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] |
| 2 | runner = "probe-run-rp --chip RP2040" | 2 | runner = "probe-run-rp --chip RP2040" |
| 3 | 3 | ||
| 4 | rustflags = [ | ||
| 5 | # LLD (shipped with the Rust toolchain) is used as the default linker | ||
| 6 | "-C", "link-arg=--nmagic", | ||
| 7 | "-C", "link-arg=-Tlink.x", | ||
| 8 | "-C", "link-arg=-Tlink-rp.x", | ||
| 9 | "-C", "link-arg=-Tdefmt.x", | ||
| 10 | |||
| 11 | # Code-size optimizations. | ||
| 12 | "-Z", "trap-unreachable=no", | ||
| 13 | ] | ||
| 14 | |||
| 15 | [build] | 4 | [build] |
| 16 | target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ | 5 | target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ |
diff --git a/examples/rp/build.rs b/examples/rp/build.rs index d534cc3df..3f915f931 100644 --- a/examples/rp/build.rs +++ b/examples/rp/build.rs | |||
| @@ -28,4 +28,9 @@ 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=-Tlink-rp.x"); | ||
| 35 | println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); | ||
| 31 | } | 36 | } |
