Skip to content

Commit bda6273

Browse files
Marcus Chang0xc0170
authored andcommitted
Fix ISR stack size inconsistencies on NRF52 series
GCC and IAR ISR stack sizes have been set to 0x800. (ARM compiler does not set stack size explicitly).
1 parent f2dd38f commit bda6273

File tree

3 files changed

+6
-6
lines changed
  • targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52

3 files changed

+6
-6
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_GCC_ARM/NRF52832.ld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ SECTIONS
223223
*(.heap*);
224224

225225
/* Expand the heap to reach the stack boundary. */
226-
ASSERT(. <= (ORIGIN(RAM) + LENGTH(RAM) - 0x8000), "heap region overflowed into stack");
227-
. += (ORIGIN(RAM) + LENGTH(RAM) - 0x8000) - .;
226+
ASSERT(. <= (ORIGIN(RAM) + LENGTH(RAM) - 0x800), "heap region overflowed into stack");
227+
. += (ORIGIN(RAM) + LENGTH(RAM) - 0x800) - .;
228228
} > RAM
229229
PROVIDE(__heap_start = ADDR(.heap));
230230
PROVIDE(__heap_size = SIZEOF(.heap));

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_IAR/nRF52832.icf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export symbol __ICFEDIT_region_RAM_end__;
4040

4141
/*-Sizes-*/
4242
/*Heap 1/4 of ram and stack 1/8*/
43-
define symbol __ICFEDIT_size_cstack__ = 0x2000;
44-
define symbol __ICFEDIT_size_heap__ = 0x4000;
43+
define symbol __ICFEDIT_size_cstack__ = 0x800;
44+
define symbol __ICFEDIT_size_heap__ = 0x5800;
4545
/**** End of ICF editor section. ###ICF###*/
4646

4747
define symbol __code_start_soft_device__ = 0x0;

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_IAR/nRF52840.icf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export symbol __ICFEDIT_region_RAM_end__;
4040

4141
/*-Sizes-*/
4242
/*Heap 1/4 of ram and stack 1/8*/
43-
define symbol __ICFEDIT_size_cstack__ = 0x8000;
44-
define symbol __ICFEDIT_size_heap__ = 0x10000;
43+
define symbol __ICFEDIT_size_cstack__ = 0x800;
44+
define symbol __ICFEDIT_size_heap__ = 0x17800;
4545
/**** End of ICF editor section. ###ICF###*/
4646

4747
define symbol __code_start_soft_device__ = 0x0;

0 commit comments

Comments
 (0)