Make firmware - region `SRAM' overflowed by 20 bytes


I am trying to build on my machine the firmware for Electron.
I am in the /firmware/modules directory. I then "make PLATFORM=electron clean all "

/usr/local/Caskroom/gcc-arm-embedded/5_4-2016q3,20160926/gcc-arm-none-eabi-5_4-2016q3/bin/…/lib/gcc/arm-none-eabi/5.4.1/…/…/…/…/arm-none-eabi/bin/ld: …/…/…/build/target/system-part2/platform-10-m/system-part2.elf section .bss' will not fit in regionSRAM’
/usr/local/Caskroom/gcc-arm-embedded/5_4-2016q3,20160926/gcc-arm-none-eabi-5_4-2016q3/bin/…/lib/gcc/arm-none-eabi/5.4.1/…/…/…/…/arm-none-eabi/bin/ld: static RAM use exceeds allocated space
/usr/local/Caskroom/gcc-arm-embedded/5_4-2016q3,20160926/gcc-arm-none-eabi-5_4-2016q3/bin/…/lib/gcc/arm-none-eabi/5.4.1/…/…/…/…/arm-none-eabi/bin/ld: region `SRAM’ overflowed by 20 bytes
collect2: error: ld returned 1 exit status
make[1]: *** […/…/…/build/target/system-part2/platform-10-m/system-part2.elf] Error 1
make: *** [/Users/davebutz/remo-firmware/firmware/modules/electron/system-part2/makefile] Error 2

is my output.

Any help would be appreciated.

Hi @davidbutz

It looks like the compiler/linker is telling you that you have too many things allocated in static RAM. Do you have a lot of large Strings or other large data structures?

You might be able to make some of them const which will mean that they only live in flash program memory and never in RAM.


Which firmware branch are you building? There are some combinations of system firmware version and compiler that won’t build because they won’t fit.


I did a download of the latest release/stable. prior to that i tried 0.6.2.
I haven’t changed the code in either of those downloads. It was straight from git.

I do have another branch in which i have made some small mods - That one works just fine if I write
"make PLATFORM=photon clean all". Likewise all 3 git downloads work with photon, but not electron.

I’ve got a 99.9% confidence that it’s something stupid I am doing. I am really naively doing these steps from Mac…

  1. SourceTree git to clone repository
  2. go to [repository]/firmware/modules
  3. type in “make PLATFORM=electron clean all”

I am currently trying to become more expert on the documentation. But your help is so wonderful and appreciated.

For anyone else: The issue was arm-none-eabi-gcc --version… mine was 5.4, however i had to downgrade to make it work.

What version did you downgrade to? Why did you have to downgrade?