Hi
Currently I try to migrate my software project (with SDK14.2, S132 (5.0.0), arm-gcc toolchain ) from nRF52832 to nRF52810 (with SDK14.2, S112 (5.1.0), arm-gcc toolchain).
But when I build the "new" nRF52810-project the linker tells me that I have a resource problem:
Linking target: _build/nrf52810_xxaa.out
Make library and executables
/usr/bin/arm-none-eabi-ar: creating _build/nrf52810_xxaa.a
/usr/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: _build/nrf52810_xxaa.out section `.bss' will not fit in region `RAM'
/usr/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: region RAM overflowed with stack
/usr/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: region FLASH overflowed with .data and user data
/usr/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: region `RAM' overflowed by 1484 bytes
collect2: error: ld returned 1 exit status
I think it is very "tight" but the application should fit into the nRF52810. This is the linker output of my "old" nRF52832-project:
/usr/bin/arm-none-eabi-ar: creating _build/nrf52832_xxaa.a
Linking target: _build/nrf52832_xxaa.out
text data bss dec hex filename
80768 200 16136 97104 17b50 _build/nrf52832_xxaa.out
Preparing: _build/nrf52832_xxaa.hex
Preparing: _build/nrf52832_xxaa.bin
So the application needs ~80kB flash and ~15kB RAM. Am I right?
This is what I did...
I followed the instructions in the guide Developing for nRF52810 --> Software emulation of nRF52810.
According to the "ble_app_blinky" example (nRF5_SDK_14.2.0_17b948a\examples\ble_peripheral\ble_app_blinky\pca10040e\s112\armgcc\ble_app_blinky_gcc_nrf52.ld) I have updated the MEMORY section in the linker file as follows:
MEMORY
{
FLASH (rx) : ORIGIN = 0x18000, LENGTH = 0x18000
RAM (rwx) : ORIGIN = 0x20001cd0, LENGTH = 0x4330
}
So about 96kB Flash (0x18000 = 98304 B = 96 kB) and 16kB RAM (0x4330 = 17200 B = 16kB) should be available for the application...
Does anybody know how to solve this problem?
Is there anything wrong with my linker settings?
In the blinky example the softdevice needs 7kB (0x1cd0 = 7376 B = 7kB) RAM. How can I determine the actual RAM consumption of the softdevice? In the devzone I found this description (Memory resource requirements). But this did not help me at all...
BTW: My application does not use the heap, only static memory allocation is used.
Thanks
Alex