Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bb6e419af | ||
|
|
0154a9efc7 | ||
|
|
c6fafaedc2 | ||
|
|
82e36ffe13 | ||
|
|
d035016e65 | ||
|
|
362c715b19 |
@@ -1,4 +1,5 @@
|
|||||||
[target.thumbv6m-none-eabi]
|
[target.thumbv6m-none-eabi]
|
||||||
|
runner = 'arm-none-eabi-gdb'
|
||||||
rustflags = [
|
rustflags = [
|
||||||
"-C", "link-arg=-Tlink.x",
|
"-C", "link-arg=-Tlink.x",
|
||||||
"-C", "linker=arm-none-eabi-ld",
|
"-C", "linker=arm-none-eabi-ld",
|
||||||
@@ -6,6 +7,7 @@ rustflags = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[target.thumbv7m-none-eabi]
|
[target.thumbv7m-none-eabi]
|
||||||
|
runner = 'arm-none-eabi-gdb'
|
||||||
rustflags = [
|
rustflags = [
|
||||||
"-C", "link-arg=-Tlink.x",
|
"-C", "link-arg=-Tlink.x",
|
||||||
"-C", "linker=arm-none-eabi-ld",
|
"-C", "linker=arm-none-eabi-ld",
|
||||||
@@ -13,6 +15,7 @@ rustflags = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[target.thumbv7em-none-eabi]
|
[target.thumbv7em-none-eabi]
|
||||||
|
runner = 'arm-none-eabi-gdb'
|
||||||
rustflags = [
|
rustflags = [
|
||||||
"-C", "link-arg=-Tlink.x",
|
"-C", "link-arg=-Tlink.x",
|
||||||
"-C", "linker=arm-none-eabi-ld",
|
"-C", "linker=arm-none-eabi-ld",
|
||||||
@@ -20,6 +23,7 @@ rustflags = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[target.thumbv7em-none-eabihf]
|
[target.thumbv7em-none-eabihf]
|
||||||
|
runner = 'arm-none-eabi-gdb'
|
||||||
rustflags = [
|
rustflags = [
|
||||||
"-C", "link-arg=-Tlink.x",
|
"-C", "link-arg=-Tlink.x",
|
||||||
"-C", "linker=arm-none-eabi-ld",
|
"-C", "linker=arm-none-eabi-ld",
|
||||||
|
|||||||
26
CHANGELOG.md
26
CHANGELOG.md
@@ -5,7 +5,21 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## v0.1.4 - 2017-05-13
|
## [v0.1.6] - 2017-05-26
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Set the default runner in .cargo/config to `arm-none-eabi-gdb`. Now `xargo
|
||||||
|
run` will build the program and start a debug session.
|
||||||
|
|
||||||
|
## [v0.1.5] - 2017-05-16
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- A warning about using CARGO_INCREMENTAL to the how to use and the
|
||||||
|
troubleshooting sections.
|
||||||
|
|
||||||
|
## [v0.1.4] - 2017-05-13
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -15,7 +29,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
- Extend troubleshooting section
|
- Extend troubleshooting section
|
||||||
|
|
||||||
## v0.1.3 - 2017-05-13
|
## [v0.1.3] - 2017-05-13
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -25,13 +39,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
- Bumped the cortex-m crate version to v0.2.6
|
- Bumped the cortex-m crate version to v0.2.6
|
||||||
|
|
||||||
## v0.1.2 - 2017-05-07
|
## [v0.1.2] - 2017-05-07
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- .gdbinit: jump to reset handler after loading the program.
|
- .gdbinit: jump to reset handler after loading the program.
|
||||||
|
|
||||||
## v0.1.1 - 2017-04-27
|
## [v0.1.1] - 2017-04-27
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
@@ -43,7 +57,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|
||||||
[Unreleased]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.4...HEAD
|
[Unreleased]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.6...HEAD
|
||||||
|
[v0.1.6]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.5...v0.1.6
|
||||||
|
[v0.1.5]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.4...v0.1.5
|
||||||
[v0.1.4]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.3...v0.1.4
|
[v0.1.4]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.3...v0.1.4
|
||||||
[v0.1.3]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.2...v0.1.3
|
[v0.1.3]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.2...v0.1.3
|
||||||
[v0.1.2]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.1...v0.1.2
|
[v0.1.2]: https://github.com/japaric/cortex-m-quickstart/compare/v0.1.1...v0.1.2
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ keywords = ["arm", "cortex-m", "template"]
|
|||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
name = "cortex-m-quickstart"
|
name = "cortex-m-quickstart"
|
||||||
repository = "https://github.com/japaric/cortex-m-quickstart"
|
repository = "https://github.com/japaric/cortex-m-quickstart"
|
||||||
version = "0.1.4"
|
version = "0.1.6"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cortex-m = "0.2.6"
|
cortex-m = "0.2.6"
|
||||||
|
|||||||
41
src/lib.rs
41
src/lib.rs
@@ -74,6 +74,13 @@
|
|||||||
//! $ rm -r src/* && cp examples/hello.rs src/main.rs
|
//! $ rm -r src/* && cp examples/hello.rs src/main.rs
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
|
//! - Disable incremental compilation. It doesn't work for embedded development.
|
||||||
|
//! You'll hit nonsensical linker errors if you use it.
|
||||||
|
//!
|
||||||
|
//! ``` text
|
||||||
|
//! $ unset CARGO_INCREMENTAL
|
||||||
|
//! ```
|
||||||
|
//!
|
||||||
//! - Build the application
|
//! - Build the application
|
||||||
//!
|
//!
|
||||||
//! ``` text
|
//! ``` text
|
||||||
@@ -114,6 +121,16 @@
|
|||||||
//! $ arm-none-eabi-gdb target/..
|
//! $ 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
|
//! # Examples
|
||||||
//!
|
//!
|
||||||
//! Check the [examples module](./examples/index.html)
|
//! Check the [examples module](./examples/index.html)
|
||||||
@@ -221,6 +238,30 @@
|
|||||||
//!
|
//!
|
||||||
//! Solution: Switch to the nightly toolchain with `rustup default nightly`.
|
//! Solution: Switch to the nightly toolchain with `rustup default nightly`.
|
||||||
//!
|
//!
|
||||||
|
//! ## Used `CARGO_INCREMENTAL=1`
|
||||||
|
//!
|
||||||
|
//! Error message:
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
//! $ xargo build
|
||||||
|
//! error: linking with `arm-none-eabi-ld` failed: exit code: 1
|
||||||
|
//! |
|
||||||
|
//! = note: "arm-none-eabi-ld" (..)
|
||||||
|
//! = note: arm-none-eabi-ld:
|
||||||
|
//! You must specify the exception handlers.
|
||||||
|
//! Create a non `pub` static variable with type
|
||||||
|
//! `cortex_m::exception::Handlers` and place it in the
|
||||||
|
//! '.rodata.exceptions' section. (cf. #[link_section]). Apply the
|
||||||
|
//! `#[used]` attribute to the variable to make it reach the linker.
|
||||||
|
//! arm-none-eabi-ld:
|
||||||
|
//! Invalid '.rodata.exceptions' section.
|
||||||
|
//! Make sure to place a static with type `cortex_m::exception::Handlers`
|
||||||
|
//! in that section (cf. #[link_section]) ONLY ONCE.
|
||||||
|
//! ```
|
||||||
|
//!
|
||||||
|
//! Solution: `$ unset CARGO_INCREMENAL`. And to be on the safe side, call
|
||||||
|
//! `cargo clean` and thrash the Xargo sysroot: `$ rm -rf ~/.xargo`
|
||||||
|
//!
|
||||||
//! ## Used `gdb` instead of `arm-none-eabi-gdb`
|
//! ## Used `gdb` instead of `arm-none-eabi-gdb`
|
||||||
//!
|
//!
|
||||||
//! Error message:
|
//! Error message:
|
||||||
|
|||||||
Reference in New Issue
Block a user