micropython/ports/nrf/boards/nrf51x22_256k_32k.ld
Ayke van Laethem 4231d4311f nrf: Fix stack size in ld script and enable MICROPY_STACK_CHECK.
The nrf51x22_256k_16k_s110_8.0.0.ld had a stack size of only 1kB, which
is way too low. Additionally, the indicated _minimum_stack_size (set at
2kB for that chip) isn't respected.

This commit sets the heap end based on the stack size (heap end = RAM
end - stack size) making it much easier to configure.

Additionally, the stack/heap size of nrf52 chips has been set to a more
sane value of 8kB.
2018-07-18 17:12:25 +10:00

20 lines
596 B
Plaintext

/*
GNU linker script for NRF51 AC w/ no SoftDevice
*/
/* Specify the memory areas */
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K /* entire flash */
FLASH_TEXT (rx) : ORIGIN = 0x00000000, LENGTH = 192K /* app */
FLASH_USER (rx) : ORIGIN = 0x00030000, LENGTH = 64K /* app data, filesystem */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K /* use all RAM */
}
/* produce a link error if there is not this amount of RAM for these sections */
_stack_size = 4K;
_minimum_heap_size = 24K;
INCLUDE "boards/common.ld"