From 3e95f13e47ef65084871406c277f75955aa6b288 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 29 Jun 2017 11:46:50 +0700 Subject: [PATCH] reduce stack from 3KB to 2KB --- cores/nRF5/SDK/components/toolchain/gcc/nrf5x_common.ld | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cores/nRF5/SDK/components/toolchain/gcc/nrf5x_common.ld b/cores/nRF5/SDK/components/toolchain/gcc/nrf5x_common.ld index 068dfaee..7c273ede 100755 --- a/cores/nRF5/SDK/components/toolchain/gcc/nrf5x_common.ld +++ b/cores/nRF5/SDK/components/toolchain/gcc/nrf5x_common.ld @@ -45,7 +45,13 @@ OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") */ ENTRY(Reset_Handler) -__StackSize = 1024*3; +/* Adafruit + * Stack is used by ISR and SoftDevice only, + * other code run on thread's allocated stack from heap + * Maximum stack used by S132's spec is 1536 byte. + * Therefore 2KB should be enough + */ +__StackSize = 1024*2; /* Set stack top to end of RAM, and stack limit move down by * size of stack_dummy section */