Comments (5)
Eventually it would be awesome to support multi region layouts like:
What kind of layout do you have in mind? For instance, if you place the stack in RAM2 and the rest of sections in RAM then already have stack overflow protection and flip-link
should be a no-op.
This definitively seems doable but we need to list the potential arrangements of stack, static variables and heap. Also more than 2 RAM regions seems possible though I'm not sure cortex-m-rt
supports that particularly well.
from flip-link.
if you place the stack in RAM2 and the rest of sections in RAM then already have stack overflow protection and flip-link should be a no-op.
if we rely solely on standard sections like .bss
and .data
we may miss the cases where the user puts a custom section (.my_section
) in RAM2 -- that could result in a collision. Perhaps we should look at the addresses of symbols instead of at the sections in that (2 RAM regions) case?
from flip-link.
Ohh
You are totally right! I was waaay to fast on an early monday morning! Totally forgot we are only talking about stack. Please disregard this issue! Feel free to close.
from flip-link.
I'm going to leave this open because I think we want to "support" at least the 2 RAM region configuration. By support I mean flip-link
should not error and panic and it should produce a binary that won't result in memory corruption due to stack overflow (even if that means doing nothing = linking normally).
Also, I'm not sure what the behavior is in the 2 RAM regions case; that's an scenario I haven't really tested.
from flip-link.
In my case i am using both ram regions, but only for static queues and buffers:
#[init(None)]
#[link_section = ".ram2"]
res_queue: Option<ResQueue<AtatRxBufLen, consts::U5>>,
#[init(None)]
#[link_section = ".ram2"]
urc_queue: Option<UrcQueue<AtatRxBufLen, consts::U10>>,
#[init(None)]
#[link_section = ".ram2"]
com_queue: Option<ComQueue<consts::U3>>,
// Cellular Socket Buffer
#[init(None)]
#[link_section = ".ram2"]
socket_set: Option<SocketSet<consts::U2, consts::U2048>>,
from flip-link.
Related Issues (20)
- Set up bors HOT 1
- CI: verify memory layout of test-app HOT 1
- CI: add regression test for #22 HOT 2
- Improve cli argument parsing HOT 1
- New release? HOT 5
- flip-link doesn't handle LENGTH in bytes HOT 1
- flip-link does not respect `memory.x` overrides HOT 3
- GHA support HOT 16
- cortex-m-rt 0.7.0 HOT 5
- Does not work with `alloc-cortex-m` HOT 11
- Does not support math in RAM origin
- subtraction is handled incorrectly
- consider rejecting negative lengths HOT 2
- flip-link error HOT 5
- We are on vacation ⛄ HOT 1
- How to know RAM runtime usage? HOT 1
- linker `flip-link` not found when using target `thumbv7em-none-eabihf` HOT 3
- Consider using cargo-dist HOT 1
- Comments in memory.x are not properly handled HOT 1
- Automatically generate CHANGELOG
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 flip-link.