[SOLVED] Region RAM overflowed with stack, when upgrading SEGGER RTT

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Region RAM overflowed with stack, when upgrading SEGGER RTT

    Hi,

    I just upgraded the SEGGER RTT source files from V4.98e to the new V5.41b for a Nordic nRF51DK (256kB flash, 32kB RAM) project using gcc/Makefile. When linking the (now quite large) program, I got the error messages:
    c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: _build/nrf51422_xxac_s130.out section `.bss' will not fit in region `RAM'
    c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack
    c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 6872 bytes
    e
    I have understood that Segger's printf() can consume a substantiation amount of RAM. What strikes me here is that the new RTT increases the stack with over 6872 bytes by just upgrading the RTT! This looks strange to me. Q1: Do you have any comments to that?

    Q2: Do you have any other ideas for getting the RAM size 7k smaller?
    regards,

    Elm
  • Hi,

    The RTT printf module uses a configurable buffer on the stack,
    which can be set with SEGGER_RTT_PRINTF_BUFFER_SIZE in SEGGER_RTT_Conf.h and is 64 bytes by default.

    Other than that there isn't a huge amount of memory allocated on the stack.

    The static RTT buffers for channel 0 are configurable, too (BUFFER_SIZE_UP and BUFFER_SIZE_DOWN in SEGGER_RTT_Conf.h),
    additionally 120 bytes are required for the RTT Control Block.

    If your buffer sizes are not extensively huge, I do not see where the RAM size should come from.

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Elm,

    Good to hear that everything is working now!

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.