diff -r -u /usr/ports/devel/arduino-core.orig/files/patch-hardware_arduino_sam_platform.txt /usr/ports/devel/arduino-core/files/patch-hardware_arduino_sam_platform.txt --- /usr/ports/devel/arduino-core.orig/files/patch-hardware_arduino_sam_platform.txt 2017-04-20 04:28:05.000000000 +0800 +++ /usr/ports/devel/arduino-core/files/patch-hardware_arduino_sam_platform.txt 2019-05-18 14:47:34.162497000 +0800 @@ -1,5 +1,14 @@ ---- hardware/arduino/sam/platform.txt.orig 2017-03-31 15:39:17 UTC +--- hardware/arduino/sam/platform.txt.orig 2017-02-08 14:36:20 UTC +++ hardware/arduino/sam/platform.txt +@@ -78,7 +78,7 @@ archive_file_path={build.path}/{archive_file} + recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" + + ## Combine gc-sections, archives, and objects +-recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mcpu={build.mcu} -mthumb {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" "-L{build.path}" -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,--start-group {compiler.combine.flags} {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc ++recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mcpu={build.mcu} -mthumb {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" "-L{build.path}" -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,--start-group {compiler.combine.flags} {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm + + ## Create output (.bin file) + recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" @@ -96,13 +96,13 @@ recipe.size.regex=\.text\s+([0-9]+).* # ------------------- Only in /usr/ports/devel/arduino-core: p.diff