Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 10 months 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:
1 Answer
7 years, 10 months 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.
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