Tools:waf: add option to build IOMCU firmware with profiled support

This commit is contained in:
bugobliterator 2024-09-17 15:25:10 +10:00 committed by Andrew Tridgell
parent ec1dc7cbc5
commit 93d99ece0a
3 changed files with 21 additions and 1 deletions

View File

@ -177,7 +177,10 @@ class Board:
if cfg.options.enable_networking_tests:
env.CXXFLAGS += ['-DAP_NETWORKING_TESTS_ENABLED=1']
if cfg.options.enable_iomcu_profiled_support:
env.CXXFLAGS += ['-DAP_IOMCU_PROFILED_SUPPORT_ENABLED=1']
d = env.get_merged_dict()
# Always prepend so that arguments passed in the command line get
# the priority.

View File

@ -29,12 +29,24 @@ run_program(["./waf", "iofirmware"])
shutil.copy('build/iomcu/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_lowpolh.bin')
shutil.copy('build/iomcu/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_highpolh.bin')
run_program(["./waf", "configure", "--board", 'iomcu', '--enable-iomcu-profiled-support'])
run_program(["./waf", "clean"])
run_program(["./waf", "iofirmware"])
shutil.copy('build/iomcu/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_lowpolh.bin')
shutil.copy('build/iomcu/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_highpolh.bin')
run_program(["./waf", "configure", "--board", 'iomcu-dshot'])
run_program(["./waf", "clean"])
run_program(["./waf", "iofirmware"])
shutil.copy('build/iomcu-dshot/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_dshot_lowpolh.bin')
shutil.copy('build/iomcu-dshot/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_dshot_highpolh.bin')
run_program(["./waf", "configure", "--board", 'iomcu-dshot', '--enable-iomcu-profiled-support'])
run_program(["./waf", "clean"])
run_program(["./waf", "iofirmware"])
shutil.copy('build/iomcu-dshot/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_dshot_lowpolh.bin')
shutil.copy('build/iomcu-dshot/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_dshot_highpolh.bin')
run_program(["./waf", "configure", "--board", 'iomcu-f103'])
run_program(["./waf", "clean"])
run_program(["./waf", "iofirmware"])

View File

@ -429,6 +429,11 @@ configuration in order to save typing.
default=0,
help='zero time on boot in microseconds')
g.add_option('--enable-iomcu-profiled-support',
action='store_true',
default=False,
help='enable iomcu profiled support')
g.add_option('--enable-new-checking',
action='store_true',
default=False,