xargo | The sysroot manager that lets you build and customize | DevOps library
kandi X-RAY | xargo Summary
kandi X-RAY | xargo Summary
The sysroot manager that lets you build and customize std. Xargo builds and manages "sysroots" (cf. rustc --print sysroot). Making it easy to cross compile Rust crates for targets that don't have binary releases of the standard crates, like the thumbv*m-none-eabi* targets. And it also lets you build a customized std crate, e.g. compiled with -C panic=abort, for your target.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of xargo
xargo Key Features
xargo Examples and Code Snippets
Community Discussions
Trending Discussions on xargo
QUESTION
I am working on an embedded rust project using msp430 controllers (MSP430G2553 - LaunchPad).
I have boilerplate code up and running from the msp430 quickstart repo
However, for my project, I need to run hmac, so I found a no_std
compatible crate. I have tried roughly 10 other crates as well without luck.
I believe I need to specify some flags for the linker, but I do not know which I am missing. I currently have rust the following rustflag set in .cargo/config
:
ANSWER
Answered 2021-Mar-17 at 13:05It seems that you are linking to the wrong memory spec file.
I would recommend to ensure that this file exists link-arg=-Tlink.x
, otherwise switch it to the correct file.
Rust embedded named their memory file memory.x, and I assume have followed the steps. So changing the flag to link-arg=-Tmemory.x
should fix it.
QUESTION
I'm compiling a Rust application for the AArch64 architecture and I need to pass the LLVM backend parameter -mgeneral-regs-only
so that the code uses only general purpose registers.
How do I pass the parameter to Xargo as I need to cross-compile the application?
As suggested, I tried to run the command with RUSTFLAGS
but got an error about unknown command line arguments:
ANSWER
Answered 2018-Oct-05 at 12:54See the Xargo documentation about compiling the sysroot with custom rustc
flags. rustc
allows setting LLVM flags via the -C
switch:
QUESTION
I'm trying to follow this blog but on Windows and with the latest Rust. It seems to me that the correct way of doing things like this is changing very frequently with Rust, so I'm hoping for an up-to-date Windows adaptation.
What I've tried so far:I installed gcc-arm-embedded.
I had unverified partial success manually cross-compiling libcore, but then I switched to use the recommended xargo
, the functionality of which (I read) is on its way to being included in Cargo eventually. While I don't understand any of it very well, I'm hoping to get to the part where I can write/run the code and then maybe I can back into understanding the compilation better.
With japaric's awesome help, I was able to get the "aarch64" targeted build working to generate the .o file (as of this particular commit).
And this part seems to verify:
...ANSWER
Answered 2018-Aug-21 at 10:53I think it's working! Things I learned:
xargo
is good- rpi3 is different enough from rpi2 to cause my problems in tool selection
xargo
doesn't care what toolchain rustup defaults to because I'm not asking it to link for me and it does its own toolchain selection- I needed to target aarch64, not arm. For this I used the linaro aarch64 mingw32 download, unpacked, added its bin folder to my PATH. Then the aarch64 tools were easy to adapt from the blog.
For people who want to do this themselves, see https://github.com/JasonKleban/rust-rasp . Not so complicated!
I aim to blink the onboard activity led as confirmation that we do really have control, but looks like that will be kinda complicated on the rpi3 (see my readme, if still applicable)
QUESTION
While beginning my work on CS140e today I've completed phase 3 of the project (writing C code to speak directly to GPIO pins on a Raspberry Pi 3 which would simply blink an LED) but on phase 4, once I attempt to compile my solution in Rust, rustc
seems to not be able to find the aarch64-none-elf
target:
ANSWER
Answered 2018-Aug-20 at 17:57Turns out all I needed to do was run rustup default nightly
and use the nightly version of rustc
, as mentioned in the warning and I'm able to get past that error. If anyone want's to explain why this is, that'd be nice.
QUESTION
I would like to install Xargo v0.3.10 on my machine. The current version of Xargo is v0.3.11 and it is installed by the cargo install xargo
command. How can I install an older version of Xargo?
ANSWER
Answered 2018-Apr-03 at 21:37cargo install --version 0.3.10 xargo
Reading the help for the cargo
tool is very useful:
QUESTION
I want to generate the epub ebook of The Rust Programming Language for my Kindle.
I downloaded this Github project to rebuild the book the second edition draft. When I do cargo run --release
, I encounter the following error:
ANSWER
Answered 2018-Jan-20 at 15:29rustc-serialize 0.3.19 was released on April 4, 2016. It includes the syntax:
QUESTION
So I'm following this tutorial on how to create a VERY BASIC Operating System using the Rust programming language. (I intend on buying an actual book on the subject, but I'm using this for now).
Here are some files we created just to clarify things a little:
Cargo.toml
...
ANSWER
Answered 2017-Dec-30 at 16:53SOLVED: Turns out it was actually related to where I placed my files.
I had to create a blog_os
folder and stored my files in there. Hence the error:
QUESTION
I'm brand new to Rust so forgive me if I don't know the lingo/tools yet. I'm trying to get an STM32F4 to blink an LED, and I think the code is right, but when I build it xargo doesn't generate a binary or any sort of error. My code is:
...ANSWER
Answered 2017-Nov-18 at 16:12In the tutorial you were following, all of the examples are in an "examples" directory. You can build these using the --example
argument, as shown in the tutorial:
QUESTION
Based on this comment, it should be possible to use Xargo to manage the installation of a custom core
crate for a particular target. I've tried the following to get it working with a crate that has no other dependency except core
:
Cargo.toml
: no dependencies listed
ANSWER
Answered 2017-Jul-27 at 17:15You may need to install the nightly Rust toolchain to allow xargo to buildup some support code for your target. I had to do something similar to get an embedded ARM setup working with xargo. Do this in the directory of your embedded target:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xargo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page