Improve handling of missing radio_tool dependency
This commit is contained in:
parent
838490574e
commit
190548a0d0
|
|
@ -170,8 +170,8 @@ targets = [
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
objcopy = find_program('objcopy', required:false)
|
objcopy = find_program('objcopy', required:false, disabler:true)
|
||||||
radio_tool = find_program('radio_tool', required:false)
|
radio_tool = find_program('radio_tool', required:false, disabler:true)
|
||||||
|
|
||||||
foreach t : targets
|
foreach t : targets
|
||||||
|
|
||||||
|
|
@ -180,13 +180,11 @@ foreach t : targets
|
||||||
|
|
||||||
if t['flashable']
|
if t['flashable']
|
||||||
|
|
||||||
if objcopy.found()
|
|
||||||
bin = custom_target(name+'_bin',
|
bin = custom_target(name+'_bin',
|
||||||
output : name+'_bin',
|
output : name+'_bin',
|
||||||
input : exe,
|
input : exe,
|
||||||
command : [objcopy, '-O', 'binary', '@INPUT@', '@OUTPUT@'])
|
command : [objcopy, '-O', 'binary', '@INPUT@', '@OUTPUT@'])
|
||||||
|
|
||||||
if radio_tool.found()
|
|
||||||
wrap = custom_target(name+'_wrap',
|
wrap = custom_target(name+'_wrap',
|
||||||
output : name+'_wrap',
|
output : name+'_wrap',
|
||||||
input : bin,
|
input : bin,
|
||||||
|
|
@ -201,6 +199,4 @@ foreach t : targets
|
||||||
output : name+'_flash',
|
output : name+'_flash',
|
||||||
command : [radio_tool, '-d', '0', '-f', '-i', '@INPUT@'])
|
command : [radio_tool, '-d', '0', '-f', '-i', '@INPUT@'])
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue