diff --git a/cores/nRF5/linker/gcc_startup_nrf52833.S b/cores/nRF5/linker/gcc_startup_nrf52833.S index 3fee5d92..0a856468 100644 --- a/cores/nRF5/linker/gcc_startup_nrf52833.S +++ b/cores/nRF5/linker/gcc_startup_nrf52833.S @@ -244,6 +244,16 @@ Reset_Handler: .L_loop1_done: +/* Adafruit fill stack region with pattern 0xADADADAD */ + ldr r0, =__StackLimit + ldr r1, =__StackSize + ldr r2, =0xADADADAD +.L_fill: + str r2, [r0] + adds r0, 4 + subs r1, 4 + bne .L_fill + /* This part of work usually is done in C library startup code. Otherwise, * define __STARTUP_CLEAR_BSS to enable it in this startup. This section * clears the RAM where BSS data is located. diff --git a/cores/nRF5/linker/nrf52833_s140_v7.ld b/cores/nRF5/linker/nrf52833_s140_v7.ld index 4a1d6a50..fb8f19e8 100755 --- a/cores/nRF5/linker/nrf52833_s140_v7.ld +++ b/cores/nRF5/linker/nrf52833_s140_v7.ld @@ -14,7 +14,7 @@ MEMORY * - Concurrent connection peripheral + central + secure links * - Event Len, HVN queue, Write CMD queue */ - RAM (rwx) : ORIGIN = 0x20006000, LENGTH = 0x20040000 - 0x20006000 + RAM (rwx) : ORIGIN = 0x20006000, LENGTH = 0x20020000 - 0x20006000 } SECTIONS diff --git a/programmers.txt b/programmers.txt index 85add04a..e96c18c8 100644 --- a/programmers.txt +++ b/programmers.txt @@ -1,11 +1,17 @@ #********************************************** # Jlink with nrfjprog #********************************************** + + nrfjprog.name=J-Link for Bluefruit nRF52 nrfjprog.program.tool=bootburn nrfjprog.program.cmd={runtime.tools.nrfjprog.path}/nrfjprog nrfjprog.program.cmd.windows={runtime.tools.nrfjprog.path}/nrfjprog.exe +# Use nrfjprog in PATH +#nrfjprog.program.cmd=nrfjprog +#nrfjprog.program.cmd.windows=nrfjprog.exe + # Burn bootloader pattern nrfjprog.program.burn_pattern="{program.cmd}" --program "{bootloader.file}.hex" -f nrf52 --chiperase --reset