hashmismatch / freertos.rs

A Rust wrapper for FreeRTOS.
231 stars 22 forks source link

Compilation using rustc 1.17.0-nightly #3

Closed ru-sh closed 7 years ago

ru-sh commented 7 years ago

I created a new project. After that I copied all files from "qemu_stm32_tests" to my project (including cargo.toml).

I've changed Cargo.toml to load freertos_rs from the repository:

[dependencies] freertos_rs = "0.1" xargo = "0.3.5" ...

Now I'm trying to compile the project, but it fails with the following error:

Compiling FreeRtos v0.1.0 (file:///C:/Electronics/Rust/FreeRtos) error[E0433]: failed to resolve. Use of undeclared type or module FreeRtosUtils --> src\test_delay.rs:9:15 | 9 | let start = FreeRtosUtils::get_tick_count(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use of undeclared type or module FreeRtosUtils .

rudib commented 7 years ago

I've slightly reworked the API for delays and time units since the 0.1.0 release. So you're using the new tests with the old library. Either checkout tests from the 0.1.0 release (hash 8a4c656) or point your Cargo.toml library entry directly to the git repository.

Also, xargo isn't a library, it should be installed as a local development utility with cargo install xargo. With the newer 0.3 versions you'll also need a Xargo.toml file which specifies that you require the collections library to be built:

target.stm32_f4_qemu.dependencies]
collections = {}

I'm planning on updating the library to 0.2.0 with an API for the software timers, some other changes and an updated CI build for Xargo 0.3.