Skip to content

Commit bca4512

Browse files
committed
ATLEDGE-423 Export compiled binary
Make changes to platform.txt to allow exporting compiled binary as a .hex
1 parent 3c833b2 commit bca4512

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

platform.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
66

77
name=Intel Curie (32-bit) Boards
8-
version=1.6.4
8+
version=1.0.3
99

10-
# SAM3 compile variables
10+
# Arduino 101 compile variables
1111
# ----------------------
1212

1313
compiler.prefix=arc-elf32
@@ -24,8 +24,10 @@ compiler.ar.cmd=arc-elf32-ar
2424
compiler.ar.flags=rcs
2525
compiler.objcopy.cmd=arc-elf32-objcopy
2626
compiler.objcopy.eep.flags=-O ihex
27-
compiler.elf2hex.flags=-S -O binary -R .note -R .comment -R COMMON -R .eh_frame
27+
compiler.elf2hex.flags=-S -O ihex -R .note -R .comment -R COMMON -R .eh_frame
2828
compiler.elf2hex.cmd=arc-elf32-objcopy
29+
compiler.elf2bin.flags=-S -O binary -R .note -R .comment -R COMMON -R .eh_frame
30+
compiler.elf2bin.cmd=arc-elf32-objcopy
2931
compiler.ldflags=
3032
compiler.size.cmd=arc-elf32-size
3133
compiler.define=-DARDUINO=
@@ -69,11 +71,18 @@ recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compil
6971
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {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}" "-L{build.variant.path}" -Wl,--whole-archive "-l{build.variant_system_lib}" -Wl,--no-whole-archive -Wl,--start-group "-l{build.variant_system_lib}" -lc -lm -lgcc {object_files} "{build.path}/{archive_file}"
7072

7173
## Create output (.bin file)
72-
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"
74+
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
7375

7476
## Create output (.elf file)
7577
recipe.objcopy.eep.pattern="{compiler.path}{compiler.strip.cmd}" "{build.path}/{build.project_name}.elf"
7678

79+
## Create output (.hex file)
80+
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
81+
82+
## Save hex
83+
recipe.output.tmp_file={build.project_name}.hex
84+
recipe.output.save_file={build.project_name}.{build.variant}.hex
85+
7786
## Compute size
7887
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
7988
recipe.size.regex=Total\s+([0-9]+).*

0 commit comments

Comments
 (0)