Git Product home page Git Product logo

Comments (5)

japaric avatar japaric commented on May 16, 2024

There is a problem to get peripherals to enable the FPU.

(FWIW, cortex-m-rt enables the FPU before main on the thumbv7em-none-eabihf target)

let p = cortex_m::Peripherals::take().unwrap() will move all the core peripherals into the current execution context. After that you can pass p.SCB around to wherever you need. If you are using rtfm, SCB is under p.core where p: init::Peripherals.

We can't do that because peripherals will not be accessible from other scopes :

You can move SCB from init to any task using a late resource. If several tasks need access to it then the SCB resource can be shared by several tasks.

If any of that doesn't work for you could you give me more details about how your application is structured?

from cortex-m-rt.

clebi avatar clebi commented on May 16, 2024

I've tried to update the cortex-m crate in cortex-m-rt. When switching to cortex-m 0.4.3, I had a problem on the fpu enable part before main. I've looked for a solution and did not find anything that could works without taking preripherals and making them not accessible in main.

from cortex-m-rt.

gordonhjs avatar gordonhjs commented on May 16, 2024

I think I have the same issue on cortex-m 0.4.3, unable to run through scb.enable_fpu(); line on a thumbv7em-none-eabihf target (STM32L432).
Gdb does not give back the hand once I step through this line and I have to kill it.
Everything works fine if I disable the fpu (switch to a thumbv7em-none-eabi target).

from cortex-m-rt.

jonas-schievink avatar jonas-schievink commented on May 16, 2024

Is this still an issue? The last comment was about a cortex-m version that still required nightly. A lot has changed since then. Are there any MCUs that require specific FPU enabling actions?

from cortex-m-rt.

jonas-schievink avatar jonas-schievink commented on May 16, 2024

Closing this as fixed. c-m-rt now uses assembly to enable the FPU. If there are still issues with the current version, please file a new issue.

from cortex-m-rt.

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.