Skip to content

Commit

Permalink
Tools:waf: add option to build IOMCU firmware with profiled support
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator authored and tridge committed Nov 20, 2024
1 parent ec1dc7c commit 93d99ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ def srcpath(path):

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.
Expand Down
12 changes: 12 additions & 0 deletions Tools/scripts/build_iofirmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,24 @@ def run_program(cmd_list):
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"])
Expand Down
5 changes: 5 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 93d99ec

Please sign in to comment.