8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c0bbe26 + bcae6ae commit f9a18fbCopy full SHA for f9a18fb
ports/nordic/supervisor/port.c
@@ -283,14 +283,16 @@ uint32_t *port_stack_get_top(void) {
283
return &_estack;
284
}
285
286
-// Place the word in the uninitialized section so it won't get overwritten.
287
-__attribute__((section(".uninitialized"))) uint32_t _saved_word;
+// Place the word in the first 32k of RAM. This is saved by us and the
+// bootloader for the soft device. We only use it before the soft device uses
288
+// that memory.
289
+#define SAVED_WORD ((uint32_t *)(0x20008000 - 4))
290
void port_set_saved_word(uint32_t value) {
- _saved_word = value;
291
+ *SAVED_WORD = value;
292
293
294
uint32_t port_get_saved_word(void) {
- return _saved_word;
295
+ return *SAVED_WORD;
296
297
298
uint64_t port_get_raw_ticks(uint8_t *subticks) {
0 commit comments