@@ -12,21 +12,22 @@ version=1.5.6
1212
1313compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
1414compiler.c.cmd=arm-none-eabi-gcc
15- compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf
15+ compiler.c.flags=-mcpu={build.mcu} -mthumb - c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf
1616#-std=gnu99
17- compiler.c.elf.cmd=arm-none-eabi-g++
18- compiler.c.elf.flags=-Os -Wl,--gc-sections
17+ #compiler.c.elf.cmd=arm-none-eabi-g++
18+ compiler.c.elf.cmd=arm-none-eabi-gcc
19+ compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
1920compiler.S.flags=-c -g -x assembler-with-cpp
2021compiler.cpp.cmd=arm-none-eabi-g++
21- compiler.cpp.flags=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf
22+ compiler.cpp.flags=-mcpu={build.mcu} -mthumb - c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf
2223#-std=gnu++11
2324compiler.ar.cmd=arm-none-eabi-ar
2425compiler.ar.flags=rcs
2526compiler.objcopy.cmd=arm-none-eabi-objcopy
2627compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
2728compiler.elf2hex.flags=-O binary
2829compiler.elf2hex.cmd=arm-none-eabi-objcopy
29- compiler.ldflags=
30+ compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols
3031compiler.size.cmd=arm-none-eabi-size
3132compiler.define=-DARDUINO=
3233
@@ -36,6 +37,7 @@ build.extra_flags=
3637# These can be overridden in platform.local.txt
3738compiler.c.extra_flags=
3839compiler.c.elf.extra_flags=
40+ #compiler.c.elf.extra_flags=-v
3941compiler.cpp.extra_flags=
4042compiler.ar.extra_flags=
4143compiler.elf2hex.extra_flags=
@@ -55,16 +57,19 @@ build.usb_manufacturer="Unknown"
5557# ---------------------
5658
5759## Compile c files
58- recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} - DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path} {includes} "{source_file}" -o "{object_file}"
60+ recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path} {includes} "{source_file}" -o "{object_file}"
5961
6062## Compile c++ files
61- recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} - DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path} {includes} "{source_file}" -o "{object_file}"
63+ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path} {includes} "{source_file}" -o "{object_file}"
6264
6365## Create archives
64- recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
66+ #recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/lib{archive_file}" "{object_file}"
67+ recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/libarduino_core.a" "{object_file}"
6568
6669## Combine gc-sections, archives, and objects
67- recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -save-temps -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" --specs=nano.specs "-L{build.path}" -Wl,--start-group -lm -lgcc -Wl,--end-group -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} "{build.path}/{archive_file}" -Wl,--end-group
70+ #recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -save-temps -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" --specs=nano.specs "-L{build.path}" -mthumb {compiler.ldflags} {object_files} -Wl,--start-group -lm -lgcc "{build.path}/{archive_file}" -Wl,--end-group
71+ #recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" --specs=nano.specs {compiler.ldflags} {object_files} -Wl,--start-group -lm -lgcc -l{archive_file} -Wl,--end-group
72+ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm -larduino_core -Wl,--end-group
6873
6974## Create eeprom
7075recipe.objcopy.eep.pattern=
@@ -105,16 +110,16 @@ tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{{{path}/share/
105110
106111tools.openocd.program.params.verbose=-d3
107112tools.openocd.program.params.quiet=-d0
108- tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -v
113+ tools.openocd.program.pattern=
109114
110115tools.openocd.erase.params.verbose=-d3
111116tools.openocd.erase.params.quiet=-d0
112- tools.openocd.erase.pattern="{path}/{cmd}" {erase.verbose} -v
117+ tools.openocd.erase.pattern=
113118
114- tools.openocd.bootloader.params.verbose=-d3
119+ tools.openocd.bootloader.params.verbose=-d2
115120tools.openocd.bootloader.params.quiet=-d0
116- # tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{{path}/share/openocd/scripts/}" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset"
117- tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "../../../../../arduino/samd/variants/{build.variant}/{build.openocdscript}" -c "program {{{runtime.platform.path}/bootloaders/{bootloader.file}}} verify reset"
121+ tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{{path}/share/openocd/scripts/}" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset"
122+ # tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "../../../../../arduino/samd/variants/{build.variant}/{build.openocdscript}" -c "program {{{runtime.platform.path}/bootloaders/{bootloader.file}}} verify reset"
118123
119124#
120125# OpenOCD burn bootloader
0 commit comments