mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-24 01:28:29 -04:00
waf: don't generate hex files if intelhex module not installed
This commit is contained in:
parent
7dfde045f1
commit
54a6c013ed
@ -407,6 +407,15 @@ class chibios(Board):
|
|||||||
env.GIT_SUBMODULES += [
|
env.GIT_SUBMODULES += [
|
||||||
'ChibiOS',
|
'ChibiOS',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
try:
|
||||||
|
import intelhex
|
||||||
|
env.HAVE_INTEL_HEX = True
|
||||||
|
cfg.msg("Checking for intelhex module:", 'OK')
|
||||||
|
except Exception:
|
||||||
|
cfg.msg("Checking for intelhex module:", 'disabled', color='YELLOW')
|
||||||
|
env.HAVE_INTEL_HEX = False
|
||||||
|
|
||||||
cfg.load('chibios')
|
cfg.load('chibios')
|
||||||
|
|
||||||
def build(self, bld):
|
def build(self, bld):
|
||||||
|
@ -142,7 +142,7 @@ def chibios_firmware(self):
|
|||||||
abin_task.set_run_after(generate_apj_task)
|
abin_task.set_run_after(generate_apj_task)
|
||||||
|
|
||||||
bootloader_bin = self.bld.srcnode.make_node("Tools/bootloaders/%s_bl.bin" % self.env.BOARD)
|
bootloader_bin = self.bld.srcnode.make_node("Tools/bootloaders/%s_bl.bin" % self.env.BOARD)
|
||||||
if os.path.exists(bootloader_bin.abspath()):
|
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_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 = self.create_task('build_intel_hex', src=[bin_target, bootloader_bin], tgt=hex_target)
|
||||||
hex_task.set_run_after(generate_bin_task)
|
hex_task.set_run_after(generate_bin_task)
|
||||||
|
Loading…
Reference in New Issue
Block a user