From 813694894d0bbd34baf6a133fc30d91fef58d3ac Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 16 Jul 2019 11:41:05 +1000 Subject: [PATCH] Tools: waf: add warning if bootloader not found --- Tools/ardupilotwaf/chibios.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Tools/ardupilotwaf/chibios.py b/Tools/ardupilotwaf/chibios.py index 0c1e4196c0..8aeda21417 100644 --- a/Tools/ardupilotwaf/chibios.py +++ b/Tools/ardupilotwaf/chibios.py @@ -157,10 +157,13 @@ def chibios_firmware(self): abin_task.set_run_after(generate_apj_task) bootloader_bin = self.bld.srcnode.make_node("Tools/bootloaders/%s_bl.bin" % self.env.BOARD) - if os.path.exists(bootloader_bin.abspath()) and self.bld.env.HAVE_INTEL_HEX: - hex_target = self.bld.bldnode.find_or_declare('bin/' + link_output.change_ext('.hex').name) - hex_task = self.create_task('build_intel_hex', src=[bin_target, bootloader_bin], tgt=hex_target) - hex_task.set_run_after(generate_bin_task) + if self.bld.env.HAVE_INTEL_HEX: + if os.path.exists(bootloader_bin.abspath()): + hex_target = self.bld.bldnode.find_or_declare('bin/' + link_output.change_ext('.hex').name) + hex_task = self.create_task('build_intel_hex', src=[bin_target, bootloader_bin], tgt=hex_target) + hex_task.set_run_after(generate_bin_task) + else: + print("Not embedding bootloader; %s does not exist" % bootloader_bin) if self.env.DEFAULT_PARAMETERS: default_params_task = self.create_task('set_default_parameters',