-
Notifications
You must be signed in to change notification settings - Fork 39
Role of xargo and generally getting started #124
Comments
You are using outdated manual. Read Embedded Book or |
Thanks! The reason I ask is because a regular cargo build does not work either and I assumed that it had something to do with xargo (probably best to remove that old documentation) For example, running the following: Gives the following error on Nightly Toolchain: Adding that attribute to the blinky.rs example does not fix it either. |
@ninjasource Yeah, there's something wonky going on with the latest nightlies. We're also picking up spurious errors with our CI systems. Is stable rust not an option for you? |
Unfortunately it does not build on stable either. Same error. Do you know what version of nightly these examples build against? I've tried going back to October with no success. It looks like this has something to do with the latest release of rtfm (0.4.0) |
@ninjasource Sorry I forgot that this crate doesn't build on stable. May I humbly recommend you try https://github.com/stm32-rs/stm32f1xx-hal on stable instead? The examples compile as follows:
|
This crate should build on stable. |
@TeXitoi The lib part does, the examples do not:
|
Ha, OK. |
Thanks Daniel, that works! If anyone else reads this thread then be aware that you need to install the thunmv7m-non-eabi triple target on stable before you can do this. This can be achieved with the following command: |
Hi, Is there any way to specify the features in the ./cargo/config file? Here are the docs which don't mention features unfortunately: David |
You need not download this repo.
in your program Cargo.toml |
Thanks burrbull but surely if you clone this repo and simply type "cargo build --example blinky" it should "just work" and if it doesn't then there should be instructions on how to make it work in the README.md file. For example, why does "cargo build --example blinky --features "stm32f103,rt" " not work? I think it would lower the barrier to entry if devs at least knew how to build it. Also, if library builds on stable but the examples do not then that should be in the README.md file too. |
Hi Jorge,
Thanks for your epic contributions to the whole embedded rust ecosystem, very impressive. Unfortunately though, I am having trouble running your example. Consider the Documentation section of your crate (copied) below:
$ git clone https://github.com/japaric/stm32f103xx-hal
// on another terminal
$ openocd -f interface/$INTERFACE.cfg -f target/stm32f1x.cfg
// flash and debug the "Hello, world" example
// NOTE examples assume 64KB of Flash and 20KB of RAM; you can tweak layout in memory.x
$ cd stm32f103xx-hal
$ xargo run --example hello
A beginner is going to be very confused by your openocd command there especially since some setups won't know where to locate the $INTERFACE.cfg file or what that means at all. Consider all OS's this will be run on. I think that it would be better to include a basic openocd.cfg file in the root of this project for convenience. Also, just saying what openocd does with a brief description and how it relates to this project goes a long way.
Furthermore, the role of xargo is not clear. The first thing you read about xargo when visiting your github repo is that it is in maintenance mode. To the newbie, this indicates that it is no longer required (or needed) for embedded rust development on coretex-m devices. This is further reinforced when you read the embedded rust book. Xargo is just a side note. It would be useful to say why it is important. For example, why do you have to build libcore (my understanding of the reason for xargo's existence) for the stm32f103xx examples when you can build a simple hello world in the coretex_m_quickstart and run it on a stm32f103xx device without xargo altogether?
Right now, the command "xargo run --example hello" fails with the following error message: "error: Could not compile
compiler_builtins
". This is being actively being discussed in the github xargo Issues section but it is difficult to figure out what to do. This looks like a new problem but using previous versions of nightly does not seem to work either. Perhaps you could state a nightly build number that your repo was known to build successfully on.Keep up the great work, I hope I can contribute something soon!
The text was updated successfully, but these errors were encountered: