Comments (4)
You can do this without any changes to cortex-m-rt, though perhaps it could be better documented.
In your memory.x
, write something like:
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 128K
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
}
SECTIONS
{
.ccmram (NOLOAD) : ALIGN(4)
{
*(.ccmram .ccmram.*);
. = ALIGN(4);
} > CCMRAM
} INSERT AFTER .bss;
/* Place stack in CCMRAM (optional) */
_stack_start = ORIGIN(CCMRAM) + LENGTH(CCMRAM);
You can then place uninit statics into CCMRAM:
#[link_section=".ccmram"]
static mut BUF: [u8; 1024] = [0u8; 1024];
from cortex-m-rt.
Thanks for the assistance-- I did not realize SECTIONS could be modified this way. This works!
from cortex-m-rt.
Is this documented somewhere in this detail? If not it probably should be.
from cortex-m-rt.
Is this documented somewhere in this detail? If not it probably should be.
I'd be happy to write this up somewhere. Where's the right spot? Maybe the lib comments
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
- 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.