Fix GD77 build, add windows tools
GD77 build was broken because of missing binary tools, Windows had no dedicated option for wrapping the GD77 firmware. TG-303
This commit is contained in:
parent
5ffd6e5c43
commit
ce10edfb47
|
|
@ -56,9 +56,12 @@ subprojects/radio_tool
|
||||||
subprojects/codec2
|
subprojects/codec2
|
||||||
subprojects/tinyusb
|
subprojects/tinyusb
|
||||||
|
|
||||||
#ignore log files
|
# ignore log files
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
#ignore linux openrtx emulator history file
|
# ignore linux openrtx emulator history file
|
||||||
.emulatorsh_history
|
.emulatorsh_history
|
||||||
|
|
||||||
|
# ignore bin2sgl
|
||||||
|
!scripts/bin2sgl.Linux.bin
|
||||||
|
!scripts/bin2sgl.exe
|
||||||
|
|
|
||||||
19
meson.build
19
meson.build
|
|
@ -523,7 +523,11 @@ targets = [
|
||||||
|
|
||||||
radio_tool = find_program('radio_tool')
|
radio_tool = find_program('radio_tool')
|
||||||
objcopy = find_program('objcopy', required:false, disabler:true)
|
objcopy = find_program('objcopy', required:false, disabler:true)
|
||||||
bin2sgl = find_program('scripts/bin2sgl.Linux', required:false, disabler:true)
|
if build_machine.system() == 'linux'
|
||||||
|
bin2sgl = find_program('scripts/bin2sgl.Linux', required:false, disabler:true)
|
||||||
|
elif build_machine.system() == 'windows'
|
||||||
|
bin2sgl = find_program('scripts/bin2sgl.exe', required:false, disabler:true)
|
||||||
|
endif
|
||||||
gd77_loader = find_program('scripts/gd-77_firmware_loader.py', 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)
|
dfu_util = find_program('dfu-util', required:false, disabler:true)
|
||||||
|
|
||||||
|
|
@ -542,17 +546,24 @@ foreach t : targets
|
||||||
# Handle GD77 custom wrapping and flashing tools
|
# Handle GD77 custom wrapping and flashing tools
|
||||||
if name == 'openrtx_gd77'
|
if name == 'openrtx_gd77'
|
||||||
|
|
||||||
|
if build_machine.system() == 'linux'
|
||||||
wrap = custom_target(name+'_wrap',
|
wrap = custom_target(name+'_wrap',
|
||||||
output : name+'_wrap',
|
output : name+'_wrap.sgl',
|
||||||
input : bin,
|
input : bin,
|
||||||
command : [bin2sgl,
|
command : [bin2sgl,
|
||||||
'-f', '@INPUT@',
|
'-f', '@INPUT@',
|
||||||
'&&', 'mv', '@INPUT@.sgl', '@OUTPUT@.sgl'])
|
'&&', 'mv', '@INPUT@.sgl', '@OUTPUT@'])
|
||||||
|
elif build_machine.system() == 'windows'
|
||||||
|
wrap = custom_target(name+'_wrap',
|
||||||
|
output : name+'_bin.sgl',
|
||||||
|
input : bin,
|
||||||
|
command : [bin2sgl, '@INPUT@'])
|
||||||
|
endif
|
||||||
|
|
||||||
custom_target(name+'_flash',
|
custom_target(name+'_flash',
|
||||||
input : wrap,
|
input : wrap,
|
||||||
output : name+'_flash',
|
output : name+'_flash',
|
||||||
command : [gd77_loader, '-f', '@INPUT@.sgl'])
|
command : [gd77_loader, '-f', '@INPUT@'])
|
||||||
|
|
||||||
# Module17 also uses dfu-tool for flashing
|
# Module17 also uses dfu-tool for flashing
|
||||||
elif name == 'openrtx_mod17'
|
elif name == 'openrtx_mod17'
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue