Hey everyone,
I'm developing an application using the IoT SDK. The first part of the application consisted of a normal BLE peripheral to interact with an android app. The second part consists of getting the peripheral connected to the internet through a gateway so that the system can be scaled.
I was compiling my application with the flag to drop unused sections, and had the IP stack initialization function commented out. Now that I'm done with the initial part of the application and uncommented the IP stack initialization function, I get the following error when I try to compile:
arm-none-eabi/bin/ld: region RAM overflowed with stack
ended making
I read in other questions that this could be fixed with one of two solutions:
- Finding places in my code that are using too much ram and trimming the fat. Thing is, I'm able to see in the generated map file what regions of the flash are being used but not ram regions, so I don't know where to start trimming. Also, when the linker fails with this message it doesn't output a map file, so I'm not able to see the space occupied by the entire code.
- Playing around with the stack and heap sizes. Supposedly after the softdevice is flashed I should be able to have 8kB ram available to me. I'm using the flags -D__HEAP_SIZE=2048 -D__STACK_SIZE=3440 in the compiler and assembler, and I can't increase the stack size past those 3440 bytes (even if i reduce the size of the heap).
Any ideas on what I'm doing wrong? I'm admittedly a noob at reading map files, so I'm using this utility to make it more understandable.
EDIT:
Should't I be able to use all of those 8kB?