Skip to content

Commit 06e2139

Browse files
committed
Adjust the main stack of nrf51 targets to the call stack of the
softdevice. The call stack of the soft device can be 0x600 (1536) bytes long, by adjusting the stack to a value of 2048 bytes, their is enough room for the softdevice and RTX kernel to live together in the main stack. Random issues due to stack overflow were visible with the previous value.
1 parent 9714a0e commit 06e2139

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@
9797
# define OS_MAINSTKSIZE 128
9898
# elif defined(TARGET_STM32F334R8) || defined(TARGET_STM32F303RE) || defined(TARGET_STM32F303K8) || defined(TARGET_STM32F334C8) \
9999
|| defined(TARGET_STM32L031K6) || defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8) || defined(TARGET_STM32L073RZ) \
100-
|| defined(TARGET_EFM32HG_STK3400) || defined(TARGET_MCU_NRF51822)
100+
|| defined(TARGET_EFM32HG_STK3400)
101101
# define OS_MAINSTKSIZE 112
102+
# elif defined(TARGET_MCU_NRF51822)
103+
# define OS_MAINSTKSIZE 512
102104
# else
103105
# error "no target defined"
104106
# endif

0 commit comments

Comments
 (0)