Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions cortex-m-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,25 @@
//! }
//! EOF
//!
//! $ cargo rustc --target thumbv7m-none-eabi -- -C link-arg=-nostartfiles -C link-arg=-Tlink.x
//!
//! $ RUSTFLAGS="-C link-arg=-Tlink.x" cargo build --target thumbv7m-none-eabi
//! $ file target/thumbv7m-none-eabi/debug/app
//! app: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, (..)
//! ```
//!
//! To avoid typing the long command, you can create a `.cargo/config.toml` file:
//!
//! ```toml
//! [target.thumbv7m-none-eabi]
//! rustflags = ["-C", "link-arg=-Tlink.x"]
//!
//! [build]
//! target = "thumbv7m-none-eabi"
//! ```
//!
//! With this configuration, a simple `cargo build` is enough.
//!
//! For Cortex-M4 devices, use the target thumbv7em-none-eabi instead.
//!
//! # Optional features
//!
//! ## `device`
Expand Down