Report
6 months, 1 week ago.

Compiling using the generated Makefile: I get FLASH will be overflowed; while "mbed compile" is fine

I have a strange situation when `mbed compile` builds a good image that works fine, however when I generate a Makefile using `mbed export -i make_gcc_arm` the linking stage fails with:

... region `FLASH' overflowed by 3816 bytes

I tried to get the full commands used at the linking stage in both cases, and the commands looked almost identical: similar options and same object files. Obviously, I do a full clean before trying each option.

What could be causing the overflow specifically when I build with the generated Makefile?

Question relating to:

The nRF51 Development Kit is a single-board development kit for Bluetooth Smart, ANT and 2.4GHz proprietary applications using the nRF51 Series SoC. This kit supports both development for both nRF51822 ...

Solved: turns out GCC options in the generated Makefile include `-O0 -g3`, which should be changed manually to `-Os`, like `mbed compile` does

posted by Hovik Melikyan 08 Feb 2017
Comment on this question

1 Answer

6 months, 1 week ago.

Yes, the compile command and the makefile use slightly different compile optimizations. However, this is the intended behavior for exported projects, as they are generally used for debugging purposes, and optimizations make that difficult.


To post an answer, please log in.