Coder Social home page Coder Social logo

Comments (15)

japaric avatar japaric commented on August 26, 2024

That sounds like the "abort-on-panic" feature has not been enabled for the cortex-m-rt crate. You can either enable that or provide your own panic_fmt lang item.

from rtic.

japaric avatar japaric commented on August 26, 2024

I also updated the f3 crate to the 0.5.1 version.

If you are depending on the f3 crate, instead of re-using the f3 Cargo project, then you'll need to enable the cortex-m-rt feature like this:

[dependencies.cortex-m-rt]
features = ["abort-on-panic"]
version = "0.3.12"

from rtic.

clebi avatar clebi commented on August 26, 2024

I have the following in my Cargo.toml :

[dependencies.cortex-m-rt]
features = ["abort-on-panic"]
version = "0.3.0"

Here is my complete Cargo file :

[package]
name = "i2c_magnetic"
version = "0.1.0"
authors = ["clement"]

[dependencies]
cortex-m = "0.4.0"
cortex-m-rtfm = "0.3.1"
f3 = "0.5.1"

[dependencies.cortex-m-rt]
features = ["abort-on-panic"]
version = "0.3.0"

[dependencies.cortex-m-semihosting]
version = "0.2.0"

[profile.release]
debug = true
lto = true

[profile.dev]
codegen-units = 1
incremental = false

from rtic.

japaric avatar japaric commented on August 26, 2024

That looks correct. Hmm, you do have an extern crate f3 in your main.rs (or example files), right?

from rtic.

japaric avatar japaric commented on August 26, 2024

Give me a few minutes. Something definitively seems to be wrong in the f3 crate (it's missing the extern crate cortex_m_rt) but for some reason my example are building / linking without errors. 😕

from rtic.

japaric avatar japaric commented on August 26, 2024

Just to rule out some rustc weirdness. What nightly version are you using? @clebi

from rtic.

japaric avatar japaric commented on August 26, 2024

Something definitively seems to be wrong in the f3 crate

Actually the f3 crate is OK. f3 is pulling cortex-m-rt into mix through its stm32f30x dependency. Perhaps you really are missing the extern crate f3 in your file? Do you have a branch for me to test?

from rtic.

clebi avatar clebi commented on August 26, 2024

I am on the nightly rustc 1.25.0-nightly (da569fa9d 2018-01-16).

I have the extern crate f3 in my main.rs:

#![feature(proc_macro)]
#![no_std]

extern crate cortex_m;
extern crate cortex_m_rtfm as rtfm;
extern crate cortex_m_semihosting as semihosting;
extern crate f3;

from rtic.

japaric avatar japaric commented on August 26, 2024

I don't see any obvious problem and I can't repro locally with the f3 examples. The only thing that occurs to me if you got a "lemon" version for the cortex-m-rt crate. v0.3.10 and v0.3.11 are broken and already yanked but if you updated your lockfile before I got to yank them you may be using the broken version. I suggest forcing the cortex-m-rt version to be at least v0.3.12 in your Cargo.toml.

from rtic.

clebi avatar clebi commented on August 26, 2024

My cortex-m-rt seems to be at version 0.3.12.

[[package]]
name = "cortex-m-rt"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "cortex-m 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "r0 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "rustc_version 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

I can send you an archive of the project.

from rtic.

japaric avatar japaric commented on August 26, 2024

I can send you an archive of the project.

Please do.

from rtic.

clebi avatar clebi commented on August 26, 2024

Here it is: i2c_magnetic.zip

from rtic.

japaric avatar japaric commented on August 26, 2024

Oh, I see now. The "rt" feature of the stm32f30x needs to be enable or the cortex-m-rt won't be included in the dependency graph. You can work around the issue by adding these lines to your Cargo.toml:

[dependencies.stm32f30x]
version = "0.6.0"
features = ["rt"]

But I think it would make most sense to re-export the "rt" feature through the stm32f30x-hal and f3 crates.

from rtic.

clebi avatar clebi commented on August 26, 2024

It's working now ! thanks.

from rtic.

japaric avatar japaric commented on August 26, 2024

It's working now !

Yay!

thanks

Thank you for reporting the issue and pointing holes in the crates.

I'm closing this issue though because this should be fixed in stm32f30x-hal and f3.

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.