Add Module17 flashing target

Add target openrt_mod17_flash that will invoke dfu-util to flash
Module17.

TG-398
pull/63/head
Niccolò Izzo 2021-12-28 21:41:24 +01:00
rodzic 78a2b02c91
commit cc2677f8f9
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -511,6 +511,7 @@ radio_tool = find_program('radio_tool')
objcopy = find_program('objcopy', required:false, disabler:true)
bin2sgl = find_program('scripts/bin2sgl.Linux', required:false, disabler:true)
gd77_loader = find_program('scripts/gd-77_firmware_loader.py', required:false, disabler:true)
dfu_util = find_program('dfu-util', required:false, disabler:true)
foreach t : targets
@ -539,6 +540,14 @@ foreach t : targets
output : name+'_flash',
command : [gd77_loader, '-f', '@INPUT@.sgl'])
# Module17 also uses dfu-tool for flashing
elif name == 'openrtx_mod17'
custom_target(name+'_flash',
input : bin,
output : name+'_flash',
command : [dfu_util, '-d', '0483:df11', '-a', '0', '-D', '@INPUT@', '-s', '0x08000000'])
else
wrap = custom_target(name+'_wrap',