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.
1 parent cf68679 commit b0779f0Copy full SHA for b0779f0
cores/nRF5/gcc_startup_nrf52.S
@@ -28,7 +28,7 @@
28
.syntax unified
29
.arch armv7e-m
30
31
-/* Adafruit nrf52 use RTOS, thus disable stack here */
+/* Adafruit define stack & heap inside linker script */
32
/* .section .stack
33
.align 3
34
#ifdef __STACK_SIZE
@@ -362,6 +362,16 @@ Reset_Handler:
362
363
.L_loop1_done:
364
365
+/* Adafruit fill stack region with pattern 0xADADADAD */
366
+ ldr r0, =__StackLimit
367
+ ldr r1, =__StackSize
368
+ ldr r2, =0xADADADAD
369
+.L_fill:
370
+ str r2, [r0]
371
+ adds r0, 4
372
+ subs r1, 4
373
+ bne .L_fill
374
+
375
/* This part of work usually is done in C library startup code. Otherwise,
376
* define __STARTUP_CLEAR_BSS to enable it in this startup. This section
377
* clears the RAM where BSS data is located.
0 commit comments