From d208cb7669cb975ac9eb8f99fa59a70fda62514c Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 19 Jan 2017 14:21:39 -0800 Subject: [PATCH] Add output recipes These recipes are required to support **Sketch > Export compiled Binary**. See: https://github.com/arduino/Arduino/blob/1.8.1/hardware/arduino/avr/platform.txt#L74-L76 https://github.com/arduino/Arduino/blob/1.8.1/hardware/arduino/sam/platform.txt#L86-L88 --- digistump-avr/platform.txt | 4 ++++ digistump-sam/platform.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/digistump-avr/platform.txt b/digistump-avr/platform.txt index 2477f12..9367d66 100644 --- a/digistump-avr/platform.txt +++ b/digistump-avr/platform.txt @@ -55,6 +55,10 @@ recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.obj ## Create hex recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" +## Save hex +recipe.output.tmp_file={build.project_name}.hex +recipe.output.save_file={build.project_name}.{build.variant}.hex + ## Compute size recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).* diff --git a/digistump-sam/platform.txt b/digistump-sam/platform.txt index 3e3150c..0b02252 100644 --- a/digistump-sam/platform.txt +++ b/digistump-sam/platform.txt @@ -74,6 +74,10 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.f ## 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" +## Save hex +recipe.output.tmp_file={build.project_name}.bin +recipe.output.save_file={build.project_name}.{build.variant}.bin + ## Compute size recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" recipe.size.regex=\.text\s+([0-9]+).*