-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for 'arm-none-eabi' #464
Comments
I have the same intention of using it on bare ARM Cortex-M and have the same issue as above. I think because Rust doesn't have GC, it would be extremely useful for IoT devices. |
FWIW, I'm currently working on documenting how to set up a Rust development environment for bare metal programming ARM Cortex-M devices. I'm still drafting the process to go from zero to blinking an LED, but once it's done I'll push it to this repository. After I'm done with that documentation, I'm going to propose an RFC that will let I'm going to postpone the automatic installation of a C toolchain ( |
@japaric Cool. I am in great need of this feature, but I don't understand (yet) the process of cross-compiling or the Rust set-up. However, as far as I understand, there are several EABIs for ARM:
Also, big-endian variants exist (I personally need to target the big-endian versions of both |
@japaric Oh, that's fantastic! I think that will really help a lot of people like myself that want to use Rust for embedded development. |
Might want to take a look at rust-cross to understand the requirements of cross compilation and how to cross compile with
What devices do you have in mind? Those targets sound like you want to do bare metal programming of Cortex A processors like the Raspberry Pi. I'm not familiar with bare metal programming of those though. If you actually meant targets like
I think the big endian version of the 😄 The docs I'm writing are aimed to people that haven't done embedded development before. My goal is to lower the entry barrier to this area of programming as much as possible. Using Rust instead of C is part of that goal but the tooling could be improved hence the RFC I mentioned above. |
@japaric Thanks, I'll take a look. I am trying to cross compile for Raspberry Pi 1 model B+ (ARM1176JZF-S) and Raspberry Pi 3 model b (ARM Cortex-A53). |
It turns out this a lot easier that I thought. I discovered this when building someone else's project, and being surprised that it worked without any hassle. There's a
It's a good workaround in the meantime. |
That works fine until you have to add dependencies from crates.io like e.g. byteorder that don't depend on the (Didn't see you edited your post until now) Those linux targets are currently supported. The RPi1 is the You need big endian variants of those targets, right? We would have to decide how to handle conditional compilation between those two variants (little & big) before adding support for them in the compiler / standard libraries. @toothbrush7777777 Can you point me to a linux distribution that provides releases for big endian ARM? Those would be helpful for testing. |
PSA: I have submitted the RFC. |
PSA: The documentation is up now. |
Oh that's terrific, I will definitely check it out. Nice work! On Thu, Jul 7, 2016 at 3:50 PM, Jorge Aparicio notifications@github.com
|
Now that rust-lang/rust#36874 landed would that be easier to add the new targets? |
@fabricedesre The Rust/tooling team is leaning towards not providing binary releases of the core crate as making Cargo capable of (cross) compiling Installing the toolchain using rustup could be handled by rustup plugin. An alternative to having rustup install the toolchain is to make rustc no longer depend on arm-none-eabi-gcc by embedding lld, LLVM's linker, in rustc; that internal lld would handle linking Rust programs. |
How can we use xargo to compile for bare metal RPi3? https://stackoverflow.com/questions/51005145/cross-compiling-baremetal-rust-for-raspberry-pi-3-b-from-windows |
I believe appropriate targets now exist in Rust. |
My coworkers and I are keen to use Rust on bare-metal ARM Cortex-M microcontrollers, but the current process of getting set up is too complicated to get everyone onboard. It would be a much easier sell if rustup could set up the toolchain and libcore (no standard library).
The text was updated successfully, but these errors were encountered: