Skip to content

Commit efe46b5

Browse files
authored
Merge pull request #13011 from alzix/alzix/both-artifacts
Always build both .hex and .bin files
2 parents aa605bb + 136897f commit efe46b5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tools/toolchains/mbed_toolchain.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -778,14 +778,15 @@ def link_program(self, r, tmp_path, name):
778778
self.link(elf, objects, libraries, lib_dirs, linker_script)
779779

780780
if self.config.has_regions:
781-
filename = "{}_application.{}".format(tail, ext)
781+
stem = join(new_path, "{}_application".format(tail))
782782
else:
783-
filename = "{}.{}".format(tail, ext)
784-
full_path = join(new_path, filename)
783+
stem = join(new_path, tail)
784+
full_path = "{}.{}".format(stem, ext)
785785
if ext != 'elf':
786786
if full_path and self.need_update(full_path, [elf]):
787787
self.progress("elf2bin", tail)
788-
self.binary(r, elf, full_path)
788+
self.binary(r, elf, "{}.{}".format(stem, 'bin'))
789+
self.binary(r, elf, "{}.{}".format(stem, 'hex'))
789790
if self.config.has_regions:
790791
full_path, updatable = self._do_region_merge(
791792
tail, full_path, ext

0 commit comments

Comments
 (0)