aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2019-10-21 16:38:04 -0500
committerGravatar Jorge Aparicio <jorge@japaric.io> 2019-10-21 16:38:04 -0500
commit9f092efe24a712add30a0512a922cd64d3666069 (patch)
tree98034938ce7c9bdbecf6b7174fb3c1204ed44896
parent1fe9767ebac37a6f220d5e84505e16691b370002 (diff)
downloadrtic-9f092efe24a712add30a0512a922cd64d3666069.tar.gz
rtic-9f092efe24a712add30a0512a922cd64d3666069.tar.zst
rtic-9f092efe24a712add30a0512a922cd64d3666069.zip
do not zero late resource memory on boot
Diffstat (limited to '')
-rw-r--r--macros/src/codegen/resources.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/macros/src/codegen/resources.rs b/macros/src/codegen/resources.rs
index bec46020..8cb788d1 100644
--- a/macros/src/codegen/resources.rs
+++ b/macros/src/codegen/resources.rs
@@ -32,7 +32,11 @@ pub fn codegen(
cross_initialized: false,
} => (
util::cfg_core(*core, app.args.cores),
- util::link_section("data", *core),
+ if expr.is_none() {
+ util::link_section_uninit(Some(*core))
+ } else {
+ util::link_section("data", *core)
+ },
),
// shared `static`s and cross-initialized resources need to be in `.shared` memory
@@ -42,7 +46,11 @@ pub fn codegen(
} else {
None
},
- None,
+ if expr.is_none() {
+ util::link_section_uninit(None)
+ } else {
+ None
+ },
),
};