Overflow memory

Firmware/software/electronics/mechanics
Post Reply
doddz
Beginner
Posts: 15
Joined: Mon Jan 06, 2014 9:19 pm

Overflow memory

Post by doddz »

Hi guys,

I've been playing around with making the altitude hold function run on a fuzzy logic engine instead of using PID. I've ran into this error.

Code: Select all

/home/bitcraze/bin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: cflie.elf section `.bss' will not fit in region `RAM'
/home/bitcraze/bin/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: region `RAM' overflowed by 388 bytes
My understanding is that everything I write is getting plopped into the RAM region because its undefined.

Could I specify my variables in a way they get put into the flash so it fits? Or maybe can I extend this area to have more space in the RAM...

doddz
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Overflow memory

Post by marcus »

Hi,

If you have variables and structures that are only read (never written) then declare them const and they will only be stored in flash. If you are still short on memory then I would recommend reducing the FreeRTOS heap. The size of the heap is located in config/FreeRTOSConfig.h and you should be able to reduce it with at least the 388 bytes you are missing (you could probably reduce it with 1k without any problems).
Post Reply