cancel
Showing results for 
Search instead for 
Did you mean: 

myOSLautomatic500.elf section `.bss' will not fit in region `RAM'

Sgowd.1
Associate II

I have this problem

myOSLautomatic500.elf section `.bss' will not fit in region `RAM'

region `RAM' overflowed by 652336 bytes.

my memory is here.

/* Specify the memory areas */

MEMORY

{

ITCM_RAM (rx)     : ORIGIN = 0x00000000, LENGTH = 16K

CCMRAM (xrw)     : ORIGIN = 0x20000000, LENGTH = 128K

RAM (xrw)     : ORIGIN = 0x20020000, LENGTH = 384K

FLASH (rx)     : ORIGIN = 0x08040000, LENGTH = 896K

MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K

}

I know in .map file we can see where exactly this memory issue is happening. But, i am not able to figure how and where exactly in the .map extension file we have to check.

I have also attached the .map extension file here.

Any idea what exactly happened and where exactly it can be checked?

3 REPLIES 3
TDK
Guru

> Any idea what exactly happened and where exactly it can be checked?

Sounds like the amount of data you want to store in RAM is 650kB larger than the 384kB you have available. Probably due to a large array you're trying to put there.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you so much for the reply. yes, you are right, but is it possible to find out by looking at the .map file, exactly in which file i might have declared it??

I tried checking but could not find out where exactly the problem might be. (I believe i havenot declared any array of that big size anywhere in my code)

Yes, the info is probably in there. It's not formatted particularly well and would take time to sort through.
In STM32CubeIDE you can sort by size to find it quickly.
If you feel a post has answered your question, please click "Accept as Solution".