adafruit / adafruit/Adafruit_nRF52_Arduino

Add .non_init RAM

Open
#741 2 comments 0 reactions 0 assignees View on GitHub
Feature
Dominant language
C
Stars
699
Forks
570
PR merge metrics
No merged PRs in 30d

Description

Is it (already) possible to use variables that are not initialised at softreset?
like:
static uint8_t data[16] __attribute__((section(".non_init")));
or

So after a power-On Reset the Variable "counter" is random or zero
the counter is increased by application.

after a softreset the variable "counter" should contain the old value before the softreset

Reason: i have an Application running which does a reset from time to time (i think it happens at BLE transfer) and some values should be hold. and i cant writ them in Filesystem, because i dont know the time of the next softreset.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by checking the nRF52 Arduino startup and linker handling for variables in a .non_init section. Verify how softreset and power-on reset treat the section, then confirm that the counter retains its value across softreset while its power-on state is unspecified or zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.