Comments (5)
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.
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.
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.
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.
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)
- How to link exceptions to C handlers HOT 2
- "error: cortex-m-rt appears more than once in the dependency graph" HOT 9
- main() calling convention discrepancy HOT 1
- How to utilize CCM SRAM for uninit statics? HOT 4
- VTOR and initial stack for debuggers HOT 5
- undefined reference to `__sheap' HOT 10
- Forward-port Changelog entries for v0.6.x
- RAM initialization code violates pointer provenance HOT 4
- Per crate memory.x file in a workspace. HOT 2
- [feature request] possibility to include asm stub before __pre_init for MCU that starts with RAM disabled HOT 5
- SCB.ICSR is more than 8 bits HOT 1
- Different virtual and physical address for FLAH HOT 1
- Error compiling with rwpi relocation model. HOT 2
- Position Independent Code HOT 2
- Why the code in this repo isn't the same as in crate.io even if the version number is the same? HOT 1
- master branch is out of date relative to 0.6.14 release HOT 2
- Use the semver trick? HOT 3
- Multiple versions of cortex-m-rt result in cryptic error messages HOT 4
- How to prevent generation of 'extra' code for ISR HOT 2
- Using the hard float compiler `thumbv7em-none-eabihf` problematic HOT 29
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cortex-m-rt.