File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -283,14 +283,16 @@ uint32_t *port_stack_get_top(void) {
283
283
return & _estack ;
284
284
}
285
285
286
- // Place the word in the uninitialized section so it won't get overwritten.
287
- __attribute__((section (".uninitialized" ))) uint32_t _saved_word ;
286
+ // Place the word in the first 32k of RAM. This is saved by us and the
287
+ // 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))
288
290
void port_set_saved_word (uint32_t value ) {
289
- _saved_word = value ;
291
+ * SAVED_WORD = value ;
290
292
}
291
293
292
294
uint32_t port_get_saved_word (void ) {
293
- return _saved_word ;
295
+ return * SAVED_WORD ;
294
296
}
295
297
296
298
uint64_t port_get_raw_ticks (uint8_t * subticks ) {
You can’t perform that action at this time.
0 commit comments