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

ld: region RAM overflowed with stack

I have a project in which I've started from the proximity app example code and added some UART stuff using app_uart.c. The linker is giving me this error immediately after building app_uart.c:

ld: region RAM overflowed with stack

Can this be true? The RAM is 8kB, right? Attaching linker scripts and a screenshot that shows everything included in the project.

screenshot_eclipse.png

Parents
  • More detail from my map file:

    ... .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-strlen.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-strncpy.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-__call_atexit.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-atexit.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/armv6-m/crtend.o .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/armv6-m/crtn.o *(COMMON) 0x0000000020002e6c . = ALIGN (0x4) fill 0x0000000020002e69 0x3 00 0x0000000020002e6c bss_end = .

    .heap 0x0000000020002e70 0x800 0x0000000020002e70 end = . 0x0000000020002e70 end = end (.heap) .heap 0x0000000020002e70 0x800 ./lib/startup_nrf51.o 0x0000000020002e70 __HeapBase 0x0000000020003670 __HeapLimit = .

    .stack_dummy 0x0000000020002e70 0x800 (.stack) .stack 0x0000000020002e70 0x800 ./lib/startup_nrf51.o 0x0000000020004000 __StackTop = (ORIGIN (RAM) + 0x2000) 0x0000000020003800 __StackLimit = (__StackTop - SIZEOF (.stack_dummy)) 0x0000000020004000 PROVIDE (__stack, __StackTop) 0x0000000000000001 ASSERT ((__StackLimit >= __HeapLimit), region RAM overflowed with stack)

Reply
  • More detail from my map file:

    ... .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-strlen.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-strncpy.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-__call_atexit.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/armv6-m/libc.a(lib_a-atexit.o) .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/armv6-m/crtend.o .bss 0x0000000020002e69 0x0 /Users/Eliot/dev/gcc-arm/bin/../lib/gcc/arm-none-eabi/4.7.4/armv6-m/crtn.o *(COMMON) 0x0000000020002e6c . = ALIGN (0x4) fill 0x0000000020002e69 0x3 00 0x0000000020002e6c bss_end = .

    .heap 0x0000000020002e70 0x800 0x0000000020002e70 end = . 0x0000000020002e70 end = end (.heap) .heap 0x0000000020002e70 0x800 ./lib/startup_nrf51.o 0x0000000020002e70 __HeapBase 0x0000000020003670 __HeapLimit = .

    .stack_dummy 0x0000000020002e70 0x800 (.stack) .stack 0x0000000020002e70 0x800 ./lib/startup_nrf51.o 0x0000000020004000 __StackTop = (ORIGIN (RAM) + 0x2000) 0x0000000020003800 __StackLimit = (__StackTop - SIZEOF (.stack_dummy)) 0x0000000020004000 PROVIDE (__stack, __StackTop) 0x0000000000000001 ASSERT ((__StackLimit >= __HeapLimit), region RAM overflowed with stack)

Children
No Data
Related