Skip to content

Cargo doesn't work out of the box for Cortex-M micros #9

Closed
@japaric

Description

@japaric

The Rust compiler supports the Cortex-M architecture but this doesn't work out of the box:

$ cargo build --target thumbv6m-none-eabi

for two reasons:

  • thumbv6m-none-eabi is not a "built-in" target so you have to supply your own target definition.
  • cargo build doesn't compile the standard crates and there's no binary release of the standard
    crates for this target.

The upstream solution is to either:

  • Add the thumb targets to the compiler and also provide binary releases of the standard crates
    for them. Or,
  • Just add the targets and teach Cargo how to build the standard libraries "on the fly".

This is being worked on. Seems like the Rust team is leaning towards the second solution. You can
track the upstream status in:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions