Skip to content

Commit a7ea710

Browse files
committed
Fix save binary recipes
Issue raised here arduino/arduino-cli#355 Following the documentation https://arduino.github.io/arduino-cli/platform-specification/#recipes-to-export-compiled-binary Only one recipe.output.tmp_file and recipe.output.save_file should be defined. The ".bin" only should be copied. Now upload with arduino-cli works as "Export compiled Binary" Signed-off-by: Frederic Pillon <[email protected]>
1 parent 0afb8dd commit a7ea710

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

platform.txt

+5-7
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,14 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.f
133133
## Create output (.bin file)
134134
recipe.objcopy.bin.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
135135

136-
## Save bin
137-
recipe.output.tmp_file={build.project_name}.bin
138-
recipe.output.save_file={build.project_name}.{build.variant}.bin
139-
140136
## Create output (.hex file)
141137
recipe.objcopy.hex.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
142138

143-
## Save hex
144-
recipe.output.tmp_file={build.project_name}.hex
145-
recipe.output.save_file={build.project_name}.{build.variant}.hex
139+
build.preferred_out_format=bin
140+
141+
## Save binary
142+
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
143+
recipe.output.save_file={build.project_name}.{build.variant}.{build.preferred_out_format}
146144

147145
## Compute size
148146
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"

0 commit comments

Comments
 (0)