Greetings all.
So I'm relatively new to Rust, and in particular I'm not all that familiar with the tools yet. I've been trying to set up a bare-metal environment, but things don't seem to be working as expected. I've tried playing around a bit myself to see if I can make it happen, but truth is I'm just not familiar enough with the systems at play.
I'm using Fedora 27 as a host environment, and targeting a Raspberry Pi 2 (or, more accurately, the raspi2
QEMU machine). I've been using a seemingly well-referenced blog (post) as my base, and trying to adapt the information to the platform I'm using. It didn't go quite as expected, so I've tried also integrating other information from around the place; I think the main other resource I tried was the Xargo README.
So here's where I've gotten to:
- Installed Xargo and the
rust-src
component; - Installed the
nightly-armv7-unknown-linux-gnueabihf
toolchain (the closest one I can figure toarm-none-eabi
); - Added
rlibc
as a dependency; - Created a
arm-nx-eabihf.json
target file, based on thearmv7-unknown-linux-gnueabihf
target given byrustc --print target-spec-json
; - Tried running
xargo +nightly build --target=arm-nx-eabihf
;
Xargo complains it can't find the crate for core
, and notes that the target may not be installed. Now, my understanding is that Xargo should be building core
from the Rust source that I am led to believe I obtained earlier (the rust-src
component), but it doesn't seem to be doing such a thing.
I've also tried just using the armv7-unknown-linux-gnueabihf
target, but this resulted in a huge amount of unknown symbols from the linker. Searching for one of these symbols turned up references to gcc_eh
, but searching for that library turned up nothing useful at all. That's a slightly different problem, though I wouldn't be surprised if this problem showed itself again.
The source, configuration files and Makefiles that I'm using can be found on GitHub (commit), if anyone wants to take a browse.
I am happy to provide any extra information. Any help is much appreciated.