This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

"region RAM overflowed with stack" error while using TLS

Hello everyone,

I am using nrf52832 with SDK version 11.0 for an IoT application. I am communicating with Atmel ATWINC 1500 module through SPI in order to connect to Wifi. First I faced memory issues using SPI which were fixed by setting heap size to 0 as suggested in this thread. Now when I enable TLS for mqtt communication I get region RAM overflowed with stack. I have tried changing stack to 16kB with heap as 0 and also tried with various other combinations of stack and heap but the error stays the same. My .map file,make file and startup file is attached for reference. I am not using any soft device so is there any way of making TLS work by utilizing maximum available RAM?

nrf52832_xxaa.map Makefile arm_startup_nrf52.s

Parents
  • I don't have too much experience with gcc, but you can find it here:

    .heap           0x2000fd40      0x200
                    0x2000fd40                __end__ = .
                    0x2000fd40                PROVIDE (end, .)
     *(.heap*)
     .heap          0x2000fd40      0x200 _build/gcc_startup_nrf52.o
                    0x2000fd40                __HeapBase
                    0x2000ff40                __HeapLimit = .
    
    .stack_dummy    0x2000fd40     0x3c00
     *(.stack*)
     .stack         0x2000fd40     0x3c00 _build/gcc_startup_nrf52.o
                    0x20010000                __StackTop = (ORIGIN (RAM) + LENGTH (RAM))
                    0x2000c400                __StackLimit = (__StackTop - SIZEOF (.stack_dummy))
                    0x20010000                PROVIDE (__stack, __StackTop)
                    0x00000000                ASSERT ((__StackLimit >= __HeapLimit), region RAM overflowed with stack)
    
Reply
  • I don't have too much experience with gcc, but you can find it here:

    .heap           0x2000fd40      0x200
                    0x2000fd40                __end__ = .
                    0x2000fd40                PROVIDE (end, .)
     *(.heap*)
     .heap          0x2000fd40      0x200 _build/gcc_startup_nrf52.o
                    0x2000fd40                __HeapBase
                    0x2000ff40                __HeapLimit = .
    
    .stack_dummy    0x2000fd40     0x3c00
     *(.stack*)
     .stack         0x2000fd40     0x3c00 _build/gcc_startup_nrf52.o
                    0x20010000                __StackTop = (ORIGIN (RAM) + LENGTH (RAM))
                    0x2000c400                __StackLimit = (__StackTop - SIZEOF (.stack_dummy))
                    0x20010000                PROVIDE (__stack, __StackTop)
                    0x00000000                ASSERT ((__StackLimit >= __HeapLimit), region RAM overflowed with stack)
    
Children
Related