diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index a2c73c904f..0e692be45a 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -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. diff --git a/Tools/scripts/build_iofirmware.py b/Tools/scripts/build_iofirmware.py index c2169d3ed9..c2f67096a8 100755 --- a/Tools/scripts/build_iofirmware.py +++ b/Tools/scripts/build_iofirmware.py @@ -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"]) diff --git a/wscript b/wscript index f400c74cdb..fff0a563f2 100644 --- a/wscript +++ b/wscript @@ -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,