Skip to content

Commit 2bea587

Browse files
author
Brian Baltz
committed
JIRA-550 Retain unstripped ELF file for debugging
Signed-off-by: Brian Baltz <[email protected]>
1 parent ea7a804 commit 2bea587

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

platform.txt

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compil
7070
## Combine gc-sections, archives, and objects
7171
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}" -lnsim -lc -lm -lgcc {object_files} "{build.path}/{archive_file}"
7272

73+
## Save output with debug symbols (.debug.elf file)
74+
recipe.hooks.objcopy.preobjcopy.1.pattern=cp -f "{build.path}/{build.project_name}.elf" "{build.path}/../arduino101_sketch.debug.elf"
75+
recipe.hooks.objcopy.preobjcopy.1.pattern.windows=cmd /C copy /y "{build.path}\{build.project_name}.elf" "{build.path}\..\arduino101_sketch.debug.elf"
76+
7377
## Create output (.bin file)
7478
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"
7579

0 commit comments

Comments
 (0)