@@ -31,15 +31,20 @@ compiler.warning_flags.default=
31
31
compiler.warning_flags.more=-Wall -Wno-expansion-to-defined
32
32
compiler.warning_flags.all=-Wall -Wextra -Wno-expansion-to-defined
33
33
34
+ # maintain retrocompatibility
35
+ compiler.optimization_flags=-Os
36
+ compiler.optimization_flags.release=-Os
37
+ compiler.optimization_flags.debug=-Og -g3
38
+
34
39
compiler.path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
35
40
compiler.c.cmd=arm-none-eabi-gcc
36
- compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
41
+ compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
37
42
compiler.c.elf.cmd=arm-none-eabi-g++
38
- compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
43
+ compiler.c.elf.flags={compiler.optimization_flags} -Wl,--gc-sections -save-temps
39
44
compiler.S.cmd=arm-none-eabi-gcc
40
45
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
41
46
compiler.cpp.cmd=arm-none-eabi-g++
42
- compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
47
+ compiler.cpp.flags=-mcpu={build.mcu} -mthumb -c -g {compiler.optimization_flags} {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD
43
48
compiler.ar.cmd=arm-none-eabi-ar
44
49
compiler.ar.flags=rcs
45
50
compiler.objcopy.cmd=arm-none-eabi-objcopy
0 commit comments