Skip to content

Commit

Permalink
Update dependencies in Cargo.toml + build instructions
Browse files Browse the repository at this point in the history
I was able to get the blinky example to build and run on a
SAML11 Xplained board with these changes.

Looks like you were able to upstream the `thumbv8m.base-none-eabi`
target definition:

rust-lang/rust#55041

I was able to use that via rustup on a recent nightly, so no more need
for (patched) xargo.

I went ahead and bumped all of the crates to the latest releases as I
wasn't able to get anything to compile without doing so.

All that said, I was able to blink an LED on a SAML11 Xplained.
  • Loading branch information
tarcieri committed May 25, 2019
1 parent ef8ea3a commit 78af2bc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 54 deletions.
34 changes: 13 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,23 @@ version = "0.1.0"
[dependencies]
bare-metal = "0.2.0"
vcell = "0.1.0"

[dependencies.cortex-m]
git = "https://github.com/rust-embedded/cortex-m"
rev = "b70a2179f4e8ee7908b61a6a97970e0cfcf2f313"

[dependencies.cortex-m-rt]
git = "https://github.com/rust-embedded/cortex-m-rt"
rev = "9cd01176a6a9985c9bc0040801ed593687dd6ab1"
optional = true

[dev-dependencies.cortex-m-rt]
git = "https://github.com/rust-embedded/cortex-m-rt"
rev = "9cd01176a6a9985c9bc0040801ed593687dd6ab1"

[dev-dependencies.cortex-m-semihosting]
git = "https://github.com/rust-embedded/cortex-m-semihosting"
rev = "471378bc848172e12e22b9a3b83190747e70bf5c"

[dev-dependencies.panic-semihosting]
git = "https://github.com/evq/panic-semihosting"
rev = "3d7041af24969f32606e5eb804e23eaac7fb0bfa"
cortex-m = "0.6"
cortex-m-rt = { version = "0.6", optional = true }
cortex-m-semihosting = "0.3"
panic-semihosting = "0.5"

[features]
default = ["rt"]
rt = ["cortex-m-rt/device"]

[profile.release]
debug = false
lto = true

[[example]]
name = "blink"
required-features = ["rt"]

[[example]]
name = "hello"
required-features = ["rt"]
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ Peripheral access API for SAM L11 microcontrollers

# WIP

This crate is a work in progress. Building it either requires
a xargo change or renaming the target spec due to the target
naming convention used.

https://github.com/japaric/xargo/pull/226
This crate is a work in progress.

## Usage

### Building the blink example

You'll need a recent Rust `nightly` build. Add the `thumbv8m.base-none-eabi` target:

```
$ rustup target add thumbv8m.base-none-eabi
```

Then use cargo to build the example:

```
RUST_TARGET_PATH=`pwd` xargo build --release --target thumbv8m.base-none-eabi --example blink
$ cargo build --release --example blink
```

### Programming blink example to FLASH on the SAM L11 XPLAINED dev board
Expand Down
27 changes: 0 additions & 27 deletions thumbv8m.base-none-eabi.json

This file was deleted.

0 comments on commit 78af2bc

Please sign in to comment.