Giter Site home page Giter Site logo

minimal example fails to build about rtic HOT 5 CLOSED

rtic-rs avatar rtic-rs commented on August 22, 2024
minimal example fails to build

from rtic.

Comments (5)

TeXitoi avatar TeXitoi commented on August 22, 2024

Actually, cortex-m-rtfm depends on cortex-m-rt 0.3. You are using 0.5 in your binary.

You can use https://github.com/japaric/cortex-m-rtfm/pull/87 waiting for the update.

from rtic.

timbod7 avatar timbod7 commented on August 22, 2024

Not sure I understand what you mean by "use #87".

I've simplified the dependendecies, and use cortex-m-rt 0.3:

[dependencies.stm32f4]
version = "0.2.3"
features = ["stm32f407", "rt"]

[dependencies.cortex-m]
version = "0.5.7"

[dependencies.cortex-m-rt]
version = "0.3"

[dependencies]
cortex-m-rtfm = "0.3.4"

[dependencies.panic-abort]
version = "0.3.0"

But still see the problem:

8:31:30 {master} ~/personal/projects/stm-f4/rust-stm32f4-examples/minimal-rtfm$ ../../bin/cargo build
    Updating crates.io index
   Compiling proc-macro2 v0.4.19                                                                                      
   Compiling unicode-xid v0.1.0
   Compiling cc v1.0.25
   Compiling num-traits v0.2.6
   Compiling num-integer v0.1.39
   Compiling libc v0.2.43
   Compiling failure_derive v0.1.2
   Compiling rustc-demangle v0.1.9
   Compiling cfg-if v0.1.5
   Compiling semver-parser v0.7.0
   Compiling rand_core v0.2.1
   Compiling vcell v0.1.0
   Compiling either v1.5.0
   Compiling cortex-m v0.3.1
   Compiling cortex-m v0.5.7
   Compiling cortex-m-rt v0.6.3
   Compiling cortex-m v0.4.3
   Compiling bare-metal v0.2.3
   Compiling untagged-option v0.1.1
   Compiling bare-metal v0.1.3
   Compiling cortex-m-rtfm v0.3.4
   Compiling r0 v0.2.2
   Compiling stm32f4 v0.2.3
   Compiling aligned v0.1.2
   Compiling aligned v0.2.0
   Compiling rtfm-core v0.2.0
   Compiling minimal-rtfm v0.0.1 (file:///home/timd/personal/projects/stm-f4/rust-stm32f4-examples/minimal-rtfm)
   Compiling panic-abort v0.3.1
   Compiling volatile-register v0.2.0
   Compiling rand v0.5.5
   Compiling time v0.1.40
   Compiling semver v0.9.0
   Compiling backtrace-sys v0.1.24
   Compiling rustc_version v0.2.3
   Compiling backtrace v0.3.9
   Compiling quote v0.6.8
   Compiling syn v0.14.9
   Compiling chrono v0.4.6
   Compiling cortex-m-rt v0.3.16
   Compiling synstructure v0.9.0
   Compiling cortex-m-rt-macros v0.1.1
   Compiling failure v0.1.2
   Compiling rtfm-syntax v0.3.4
   Compiling cortex-m-rtfm-macros v0.3.2
error: function is never used: `init`
  --> src/main.rs:28:1
   |
28 | fn init(p: init::Peripherals) {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: function is never used: `idle`
  --> src/main.rs:41:1
   |
41 | fn idle() -> ! {
   | ^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

error: Could not compile `minimal-rtfm`.

from rtic.

TeXitoi avatar TeXitoi commented on August 22, 2024

stm32f4 v0.2.3 depends on cortex-m-rt v0.5.

I mean you can use the branch of the pull request:

cortex-m-rtfm = { git = "https://github.com/ykomatsu/cortex-m-rtfm", branch = "update" }

from rtic.

timbod7 avatar timbod7 commented on August 22, 2024

Thanks so much! That approach did eventually work.

from rtic.

TeXitoi avatar TeXitoi commented on August 22, 2024

Welcome.

from rtic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.