Hello,
I am developing on top of S110, for nrf51822_xxaa, building with GCC. And as my code is growing, even after mapping inspection, gcc optimizations, stripping, heap reduction and using nano lib, I am still reaching the infamous link error :
region RAM overflowed with stack
According to gcc_nrf51_common.ld, it seems that the RAM "user" area (.data, .bss, .heap, .stack) is full.
Yes, it sounds like a very common topic, but after reading the S110 specification, chapter 11, I noticed that the RAM is divided in two areas :
R0 [0x2000 0000 - APP_RAM_BASE] : MBR, SoftDevice
R1 [APP_RAM_BASE - 0x2000 4000] : Application, heap, stack
and the doc says I could reduce APP_RAM_BASE down to 0x200019D8, which would free a few bytes.
So, I've tried updating gcc_nrf51_s110_xxaa.ld as follows :
RAM (rwx) : ORIGIN = 0x200019D8, LENGTH = 0x2628
that removes the error but application doesn't boot. I suppose the SoftDevice should be told about the attribute table size... any clue what is the API to do so ?