Skip to content
This repository was archived by the owner on Apr 11, 2021. It is now read-only.

Getting Started on Building for MSP430 #4

Open
ssnover opened this issue Nov 14, 2018 · 1 comment
Open

Getting Started on Building for MSP430 #4

ssnover opened this issue Nov 14, 2018 · 1 comment

Comments

@ssnover
Copy link

ssnover commented Nov 14, 2018

Hello, I see that this repository is marked work in progress. I'm trying to get a Rust toolchain up and running to develop for TI's MSP430 Launchpad board with the MSP430G2553. I'm trying to build blinky.rs but without directions I'm stuck trying to piece some stuff together.

I've got a typical Rust project set up where I have Cargo.toml, Xargo.toml, and memory.x replicating the file in this repo and main.rs replicating blinky.rs. Finally, I have a file in .cargo/config with the following contents:

[target.msp430]
rustflags = ["-C", "link-arg=-Tmemory.x"]

[build]
target = "msp430"

When I run cargo build or xargo build I get identical results:

ssnover@styrka:~/develop/rust-embedded/blink-msp430$ xargo build
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -C link-arg=-Tmemory.x --target msp430 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (exit code: 1)
--- stderr
error: Error loading target specification: Could not find specification for target "msp430"
  |
  = help: Use `--print target-list` for a list of built-in targets

I'm on nightly, however I'm not able to install the msp430 target:
error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rust-std' for target 'msp430'

Is there something I'm missing? I'd be happy to write something up once I've got it working to add to this repository for those following, but I'm a little stuck right now 😃 I'm pretty new to Rust, with considerably more experience developing for embedded (I've just rewritten a couple algorithms homeworks in Rust to get a feel for it).

Thanks!

@ktsiligkiris
Copy link

ktsiligkiris commented Mar 28, 2021

Hi @ssnover,

I'm feeling my way around also around this TI launched and found your comment.

Checking the error message you had, I ran:

-<%>- rustc --print target-list | grep msp
msp430-none-elf

So you see the target is named msp430-none-elf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants