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

RAM Overflowed: section `.bss' will not fit in region `RAM'

I just integrated CMock which is part of my unit testing framework and i am trying to test a mocked function however i am running into RAM overflow error. Is there a way to reduce the size of CMock or increase that RAM section which is required? I am using an NRF51422 chip but i also have the NRF51822 available if that makes a difference.

Any help is greatly appreciated! Thank you in advance

   c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: ..\medsens_periph_build/nrf51422_xxac.out section `.bss' will not fit in region `RAM'
    c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack
    c:/program files (x86)/gnu tools arm embedded/6 2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 13700 bytes
    collect2.exe: error: ld returned 1 exit status
                 RAM:       38148 B      24448 B    156.04%
    ../drivers_common/Makefile.common.mk:122: recipe for target '..\medsens_periph_build/nrf51422_xxac.out' failed
    make: *** [..\medsens_periph_build/nrf51422_xxac.out] Error 1
  • Hi,

    Do you really need to do the tests on your target HW? We use CMock in our SDK for Mesh, but we run the tests on a host system, like a PC, and not the nRF51.

    Here is some documentation: Building the mesh stack

  • Ok thats intersting to know thank you for direct me to that page, however im slightly confused and please note ( Im no expert at all with all those build tools, tool chains and what not that required to be used to make everything work) therefore can you please assist me in understanding what i need to do to make all this work.

    I currently use eclipse IDE ( we moved from keil due to the 32 kb limitation) along with arm-none-eabi-gcc compiler. We are using make files for our build.

    Now in order to use the method you recommend for running the tests on the computer as opposed to on the NRF51 what is the additional tools i need to use?

    Is CMake required for me as we already have make files used to compile the project in eclipse. Also is it possible to run all this stuff from eclipse or does it need to be run from the command line as in the examples provided?

    Also im confused what is sdk for mesh exactly, cant i run the unit tests utilizing the sdk what is mesh exactly? isnt it just simply the bluetoooth communciation protocol or is it what provides the capability of running the tests locally? Sorry for all my questions im just confused! Thank you for your help in advance.

  • Hi ,

    Just a quick question do you manually create the CMAKELists.txt files or is it possible to automate them somehow?

    Regards,

    Faisal

  • Hi,

    Sorry for not getting back to you.

    I talked to the Mesh guys again and as mentioned earlier they do all their testing on a host system, and they don't have the need for testing their code directly on HW. Hence, it is a little difficult for us to help you out in your quest since we are on a different path in this regard. And unfortunately the files are made by hand. 

Related