Skip to content

Commit

Permalink
set default runner to arm-none-eabi-gdb
Browse files Browse the repository at this point in the history
with this `xargo run` will build the program *and* immediately start a GDB
session.
  • Loading branch information
japaric committed May 26, 2017
1 parent 82e36ff commit c6fafae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
[target.thumbv6m-none-eabi]
runner = 'arm-none-eabi-gdb'
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=arm-none-eabi-ld",
"-Z", "linker-flavor=ld",
]

[target.thumbv7m-none-eabi]
runner = 'arm-none-eabi-gdb'
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=arm-none-eabi-ld",
"-Z", "linker-flavor=ld",
]

[target.thumbv7em-none-eabi]
runner = 'arm-none-eabi-gdb'
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=arm-none-eabi-ld",
"-Z", "linker-flavor=ld",
]

[target.thumbv7em-none-eabihf]
runner = 'arm-none-eabi-gdb'
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=arm-none-eabi-ld",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["arm", "cortex-m", "template"]
license = "MIT OR Apache-2.0"
name = "cortex-m-quickstart"
repository = "https://github.com/japaric/cortex-m-quickstart"
version = "0.1.5"
version = "0.1.6"

[dependencies]
cortex-m = "0.2.6"
Expand Down
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@
//! $ arm-none-eabi-gdb target/..
//! ```
//!
//! **NOTE** As of nightly-2017-05-14 or so and cortex-m-quickstart v0.1.6 you
//! can simply run `cargo run` or `cargo run --example $ex` to build and flash
//! the program, and immediately start a debug session. IOW, it lets you omit
//! `arm-none-eabi-gdb` command.
//!
//! ```
//! $ cargo run --example hello
//! > # drop you into GDB session
//! ```
//!
//! # Examples
//!
//! Check the [examples module](./examples/index.html)
Expand Down

0 comments on commit c6fafae

Please sign in to comment.