On platforms using both tickless and the low power ticker wrapper
so much of the background stack is used that it overflows. To
ensure the background thread's stack doesn't overflow increase this
size by 256 bytes when tickless is enabled. Worst case usage
on the NUCLEO_F476RG was recorded at 656 when tickless is
turned on so this increased size should safely prevent overflows.
Add a config option for the following values:
MBED_SYS_STATS_ENABLED
MBED_STACK_STATS_ENABLED
MBED_CPU_STATS_ENABLED
MBED_HEAP_STATS_ENABLED
MBED_THREAD_STATS_ENABLED
MBED_CONF_APP_MAIN_STACK_SIZE
MBED_CONF_APP_TIMER_THREAD_STACK_SIZE
MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
MBED_CONF_APP_THREAD_STACK_SIZE
To maintain backwards compatibility inside the RTOS both
APP and RTOS config values can be used.
Add the target config option "boot-stack-size" which is passed to the
linker as the define "MBED_BOOT_STACK_SIZE" so the linker can
adjust the stack accordingly. On mbed 2 the boot stack becomes the
main stack after boot. On mbed 5 the boot stack becomes the
ISR stack after boot. Because of these different uses the stack size
for mbed 2 is set to 4K by default while on mbed 5 it is set to 1k.
Additionally, the NRF5X family requires a larger interrupt stack size
due to the softdevice so the size is increased to 2k on mbed 5 builds.