Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/Tools/scripts/build_iofirmware.py
Views: 1798
#!/usr/bin/env python312"""3script to build iofirmware and copy to Tools/IO_Firmware45AP_FLAKE8_CLEAN6"""78import os9import shutil10import subprocess11import sys1213os.environ['PYTHONUNBUFFERED'] = '1'141516def run_program(cmd_list):17print("Running (%s)" % " ".join(cmd_list))18retcode = subprocess.call(cmd_list)19if retcode != 0:20print("Build failed: %s" % ' '.join(cmd_list))21sys.exit(1)222324print("Building iofirmware")25run_program(["./waf", "configure", "--board", 'iomcu'])26run_program(["./waf", "clean"])27run_program(["./waf", "iofirmware"])28shutil.copy('build/iomcu/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_lowpolh.bin')29shutil.copy('build/iomcu/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_highpolh.bin')3031run_program(["./waf", "configure", "--board", 'iomcu', '--enable-iomcu-profiled-support'])32run_program(["./waf", "clean"])33run_program(["./waf", "iofirmware"])34shutil.copy('build/iomcu/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_lowpolh.bin')35shutil.copy('build/iomcu/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_highpolh.bin')3637run_program(["./waf", "configure", "--board", 'iomcu-dshot'])38run_program(["./waf", "clean"])39run_program(["./waf", "iofirmware"])40shutil.copy('build/iomcu-dshot/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_dshot_lowpolh.bin')41shutil.copy('build/iomcu-dshot/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_dshot_highpolh.bin')4243run_program(["./waf", "configure", "--board", 'iomcu-dshot', '--enable-iomcu-profiled-support'])44run_program(["./waf", "clean"])45run_program(["./waf", "iofirmware"])46shutil.copy('build/iomcu-dshot/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_dshot_lowpolh.bin')47shutil.copy('build/iomcu-dshot/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_cube_dshot_highpolh.bin')4849run_program(["./waf", "configure", "--board", 'iomcu-f103'])50run_program(["./waf", "clean"])51run_program(["./waf", "iofirmware"])52shutil.copy('build/iomcu-f103/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_f103_lowpolh.bin')53shutil.copy('build/iomcu-f103/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_f103_highpolh.bin')5455run_program(["./waf", "configure", "--board", 'iomcu-f103-dshot'])56run_program(["./waf", "clean"])57run_program(["./waf", "iofirmware"])58shutil.copy('build/iomcu-f103-dshot/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_f103_dshot_lowpolh.bin')59shutil.copy('build/iomcu-f103-dshot/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_f103_dshot_highpolh.bin')6061run_program(["./waf", "configure", "--board", 'iomcu_f103_8MHz'])62run_program(["./waf", "clean"])63run_program(["./waf", "iofirmware"])64shutil.copy('build/iomcu_f103_8MHz/bin/iofirmware_lowpolh.bin', 'Tools/IO_Firmware/iofirmware_f103_8MHz_lowpolh.bin')65shutil.copy('build/iomcu_f103_8MHz/bin/iofirmware_highpolh.bin', 'Tools/IO_Firmware/iofirmware_f103_8MHz_highpolh.bin')6667run_program(["./waf", "configure", "--board", 'iomcu-f103-8MHz-dshot'])68run_program(["./waf", "clean"])69run_program(["./waf", "iofirmware"])70shutil.copy('build/iomcu-f103-8MHz-dshot/bin/iofirmware_lowpolh.bin',71'Tools/IO_Firmware/iofirmware_f103_8MHz_dshot_lowpolh.bin')72shutil.copy('build/iomcu-f103-8MHz-dshot/bin/iofirmware_highpolh.bin',73'Tools/IO_Firmware/iofirmware_f103_8MHz_dshot_highpolh.bin')747576