mirror of https://github.com/ARMmbed/mbed-os.git
always build both .hex and .bin files
- This change will cause build-system to produce both .bin and .hex files. - Files are small and their creation is fast, thus there are no negative impact on build time and storage requirements. - .bin files are required for updating the device - .hex files are very handy for post build (external to build system) custom scripts (e.g. image signing) - Configuration still allows selecting either .bin or .hex files, this settings is still relevant as it specifies what file is flashed to a device for tests or by `--flash` argument.pull/13011/head
parent
9a8c9e2c29
commit
136897f829
|
@ -778,14 +778,15 @@ class mbedToolchain(with_metaclass(ABCMeta, object)):
|
|||
self.link(elf, objects, libraries, lib_dirs, linker_script)
|
||||
|
||||
if self.config.has_regions:
|
||||
filename = "{}_application.{}".format(tail, ext)
|
||||
stem = join(new_path, "{}_application".format(tail))
|
||||
else:
|
||||
filename = "{}.{}".format(tail, ext)
|
||||
full_path = join(new_path, filename)
|
||||
stem = join(new_path, tail)
|
||||
full_path = "{}.{}".format(stem, ext)
|
||||
if ext != 'elf':
|
||||
if full_path and self.need_update(full_path, [elf]):
|
||||
self.progress("elf2bin", tail)
|
||||
self.binary(r, elf, full_path)
|
||||
self.binary(r, elf, "{}.{}".format(stem, 'bin'))
|
||||
self.binary(r, elf, "{}.{}".format(stem, 'hex'))
|
||||
if self.config.has_regions:
|
||||
full_path, updatable = self._do_region_merge(
|
||||
tail, full_path, ext
|
||||
|
|
Loading…
Reference in New Issue