Skip to content

Commit e6043da

Browse files
Yogesh PandeYogesh Pande
authored andcommitted
Changing -O2 parameter to -Os
This commit includes - Changing build option parameter from -O2 to -Os to reduce flash size of the final binary pacakge. The original parameter of -O2 is kept to circumvent the error http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46762 . But this error has been long fixed and released in latest 4.9.x GCC compiler. This change is necessary to reduce the generated binary size of mbed Client component to avoid problem of getting images over 512 kB which is causing application to crash because of Configuration Store problem https://github.com/ARMmbed/configuration-store/issues/21
1 parent 3ea625c commit e6043da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
8787
self.flags["common"].append("-g")
8888
self.flags["common"].append("-O0")
8989
else:
90-
self.flags["common"].append("-O2")
90+
self.flags["common"].append("-Os")
9191

9292
main_cc = join(tool_path, "arm-none-eabi-gcc")
9393
main_cppc = join(tool_path, "arm-none-eabi-g++")

0 commit comments

Comments
 (0)