summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-10-30 19:36:05 +0100
committerHiFiPhile <[email protected]>2024-10-30 19:47:03 +0100
commit85ff529a310b7e6ec2e4234e3e292fef6432882b (patch)
tree41218fce4db7c23df1073dfdd42fb017c3cf0158 /tools
parent418b8b2f133d695362c735f271c966af10b5d251 (diff)
parent8b1e40c3e2447de5b4a86bbcdcc0344946a4793d (diff)
Merge branch 'master' into dcd_notif
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build.py259
-rw-r--r--tools/build_board.py69
-rw-r--r--tools/build_cmake.py105
-rw-r--r--tools/build_esp32.py106
-rw-r--r--tools/build_make.py80
-rwxr-xr-x[-rw-r--r--]tools/build_utils.py82
-rwxr-xr-x[-rw-r--r--]tools/gen_doc.py5
-rwxr-xr-x[-rw-r--r--]tools/get_deps.py99
-rwxr-xr-x[-rw-r--r--]tools/iar_gen.py5
-rw-r--r--tools/iar_template.ipcf97
-rwxr-xr-x[-rw-r--r--]tools/make_release.py6
-rwxr-xr-x[-rw-r--r--]tools/mksunxi.py0
-rwxr-xr-xtools/pcapng_to_corpus.py2
13 files changed, 463 insertions, 452 deletions
diff --git a/tools/build.py b/tools/build.py
new file mode 100755
index 000000000..91d4ebd30
--- /dev/null
+++ b/tools/build.py
@@ -0,0 +1,259 @@
+#!/usr/bin/env python3
+import argparse
+import random
+import os
+import sys
+import time
+import subprocess
+from pathlib import Path
+from multiprocessing import Pool
+
+import build_utils
+
+STATUS_OK = "\033[32mOK\033[0m"
+STATUS_FAILED = "\033[31mFailed\033[0m"
+STATUS_SKIPPED = "\033[33mSkipped\033[0m"
+
+RET_OK = 0
+RET_FAILED = 1
+RET_SKIPPED = 2
+
+build_format = '| {:30} | {:40} | {:16} | {:5} |'
+build_separator = '-' * 95
+build_status = [STATUS_OK, STATUS_FAILED, STATUS_SKIPPED]
+
+verbose = False
+
+# -----------------------------
+# Helper
+# -----------------------------
+def run_cmd(cmd):
+ #print(cmd)
+ r = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ title = f'Command Error: {cmd}'
+ if r.returncode != 0:
+ # print build output if failed
+ if os.getenv('GITHUB_ACTIONS'):
+ print(f"::group::{title}")
+ print(r.stdout.decode("utf-8"))
+ print(f"::endgroup::")
+ else:
+ print(title)
+ print(r.stdout.decode("utf-8"))
+ elif verbose:
+ print(cmd)
+ print(r.stdout.decode("utf-8"))
+ return r
+
+
+def find_family(board):
+ bsp_dir = Path("hw/bsp")
+ for family_dir in bsp_dir.iterdir():
+ if family_dir.is_dir():
+ board_dir = family_dir / 'boards' / board
+ if board_dir.exists():
+ return family_dir.name
+ return None
+
+
+def get_examples(family):
+ all_examples = []
+ for d in os.scandir("examples"):
+ if d.is_dir() and 'cmake' not in d.name and 'build_system' not in d.name:
+ for entry in os.scandir(d.path):
+ if entry.is_dir() and 'cmake' not in entry.name:
+ if family != 'espressif' or 'freertos' in entry.name:
+ all_examples.append(d.name + '/' + entry.name)
+
+ if family == 'espressif':
+ all_examples.append('device/board_test')
+ all_examples.append('device/video_capture')
+ all_examples.sort()
+ return all_examples
+
+
+def print_build_result(board, example, status, duration):
+ if isinstance(duration, (int, float)):
+ duration = "{:.2f}s".format(duration)
+ print(build_format.format(board, example, build_status[status], duration))
+
+# -----------------------------
+# CMake
+# -----------------------------
+def cmake_board(board, toolchain, build_flags_on):
+ ret = [0, 0, 0]
+ start_time = time.monotonic()
+
+ build_dir = f'cmake-build/cmake-build-{board}'
+ build_flags = ''
+ if len(build_flags_on) > 0:
+ build_flags = ' '.join(f'-D{flag}=1' for flag in build_flags_on)
+ build_flags = f'-DCFLAGS_CLI="{build_flags}"'
+ build_dir += '-' + '-'.join(build_flags_on)
+
+ family = find_family(board)
+ if family == 'espressif':
+ # for espressif, we have to build example individually
+ all_examples = get_examples(family)
+ for example in all_examples:
+ if build_utils.skip_example(example, board):
+ ret[2] += 1
+ else:
+ rcmd = run_cmd(f'cmake examples/{example} -B {build_dir}/{example} -G "Ninja" '
+ f'-DBOARD={board} {build_flags}')
+ if rcmd.returncode == 0:
+ rcmd = run_cmd(f'cmake --build {build_dir}/{example}')
+ ret[0 if rcmd.returncode == 0 else 1] += 1
+ else:
+ rcmd = run_cmd(f'cmake examples -B {build_dir} -G "Ninja" -DBOARD={board} -DCMAKE_BUILD_TYPE=MinSizeRel '
+ f'-DTOOLCHAIN={toolchain} {build_flags}')
+ if rcmd.returncode == 0:
+ rcmd = run_cmd(f"cmake --build {build_dir}")
+ ret[0 if rcmd.returncode == 0 else 1] += 1
+
+ example = 'all'
+ print_build_result(board, example, 0 if ret[1] == 0 else 1, time.monotonic() - start_time)
+ return ret
+
+
+# -----------------------------
+# Make
+# -----------------------------
+def make_one_example(example, board, make_option):
+ # Check if board is skipped
+ if build_utils.skip_example(example, board):
+ print_build_result(board, example, 2, '-')
+ r = 2
+ else:
+ start_time = time.monotonic()
+ # skip -j for circleci
+ if not os.getenv('CIRCLECI'):
+ make_option += ' -j'
+ make_cmd = f"make -C examples/{example} BOARD={board} {make_option}"
+ # run_cmd(f"{make_cmd} clean")
+ build_result = run_cmd(f"{make_cmd} all")
+ r = 0 if build_result.returncode == 0 else 1
+ print_build_result(board, example, r, time.monotonic() - start_time)
+
+ ret = [0, 0, 0]
+ ret[r] = 1
+ return ret
+
+
+def make_board(board, toolchain):
+ print(build_separator)
+ all_examples = get_examples(find_family(board))
+ start_time = time.monotonic()
+ ret = [0, 0, 0]
+ with Pool(processes=os.cpu_count()) as pool:
+ pool_args = list((map(lambda e, b=board, o=f"TOOLCHAIN={toolchain}": [e, b, o], all_examples)))
+ r = pool.starmap(make_one_example, pool_args)
+ # sum all element of same index (column sum)
+ ret = list(map(sum, list(zip(*r))))
+ example = 'all'
+ print_build_result(board, example, 0 if ret[1] == 0 else 1, time.monotonic() - start_time)
+ return ret
+
+
+# -----------------------------
+# Build Family
+# -----------------------------
+def build_boards_list(boards, toolchain, build_system, build_flags_on):
+ ret = [0, 0, 0]
+ for b in boards:
+ r = [0, 0, 0]
+ if build_system == 'cmake':
+ r = cmake_board(b, toolchain, build_flags_on)
+ elif build_system == 'make':
+ r = make_board(b, toolchain)
+ ret[0] += r[0]
+ ret[1] += r[1]
+ ret[2] += r[2]
+ return ret
+
+
+def build_family(family, toolchain, build_system, build_flags_on, one_per_family, boards):
+ all_boards = []
+ for entry in os.scandir(f"hw/bsp/{family}/boards"):
+ if entry.is_dir() and entry.name != 'pico_sdk':
+ all_boards.append(entry.name)
+ all_boards.sort()
+
+ ret = [0, 0, 0]
+ # If only-one flag is set, select one random board
+ if one_per_family:
+ for b in boards:
+ # skip if -b already specify one in this family
+ if find_family(b) == family:
+ return ret
+ all_boards = [random.choice(all_boards)]
+
+ ret = build_boards_list(all_boards, toolchain, build_system, build_flags_on)
+ return ret
+
+
+# -----------------------------
+# Main
+# -----------------------------
+def main():
+ global verbose
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('families', nargs='*', default=[], help='Families to build')
+ parser.add_argument('-b', '--board', action='append', default=[], help='Boards to build')
+ parser.add_argument('-t', '--toolchain', default='gcc', help='Toolchain to use, default is gcc')
+ parser.add_argument('-s', '--build-system', default='cmake', help='Build system to use, default is cmake')
+ parser.add_argument('-f1', '--build-flags-on', action='append', default=[], help='Build flag to pass to build system')
+ parser.add_argument('-1', '--one-per-family', action='store_true', default=False, help='Build only one random board inside a family')
+ parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output')
+ args = parser.parse_args()
+
+ families = args.families
+ boards = args.board
+ toolchain = args.toolchain
+ build_system = args.build_system
+ build_flags_on = args.build_flags_on
+ one_per_family = args.one_per_family
+ verbose = args.verbose
+
+ if len(families) == 0 and len(boards) == 0:
+ print("Please specify families or board to build")
+ return 1
+
+ print(build_separator)
+ print(build_format.format('Board', 'Example', '\033[39mResult\033[0m', 'Time'))
+ total_time = time.monotonic()
+ result = [0, 0, 0]
+
+ # build families
+ all_families = []
+ if 'all' in families:
+ for entry in os.scandir("hw/bsp"):
+ if entry.is_dir() and entry.name != 'espressif' and os.path.isfile(entry.path + "/family.cmake"):
+ all_families.append(entry.name)
+ else:
+ all_families = list(families)
+ all_families.sort()
+
+ # succeeded, failed, skipped
+ for f in all_families:
+ r = build_family(f, toolchain, build_system, build_flags_on, one_per_family, boards)
+ result[0] += r[0]
+ result[1] += r[1]
+ result[2] += r[2]
+
+ # build boards
+ r = build_boards_list(boards, toolchain, build_system, build_flags_on)
+ result[0] += r[0]
+ result[1] += r[1]
+ result[2] += r[2]
+
+ total_time = time.monotonic() - total_time
+ print(build_separator)
+ print(f"Build Summary: {result[0]} {STATUS_OK}, {result[1]} {STATUS_FAILED} and took {total_time:.2f}s")
+ print(build_separator)
+ return result[1]
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/tools/build_board.py b/tools/build_board.py
deleted file mode 100644
index 13376d126..000000000
--- a/tools/build_board.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import os
-import sys
-import time
-import subprocess
-from multiprocessing import Pool
-
-import build_utils
-
-SUCCEEDED = "\033[32msucceeded\033[0m"
-FAILED = "\033[31mfailed\033[0m"
-SKIPPED = "\033[33mskipped\033[0m"
-
-build_separator = '-' * 106
-
-
-def filter_with_input(mylist):
- if len(sys.argv) > 1:
- input_args = list(set(mylist).intersection(sys.argv))
- if len(input_args) > 0:
- mylist[:] = input_args
-
-
-if __name__ == '__main__':
- # If examples are not specified in arguments, build all
- all_examples = []
- for dir1 in os.scandir("examples"):
- if dir1.is_dir():
- for entry in os.scandir(dir1.path):
- if entry.is_dir():
- all_examples.append(dir1.name + '/' + entry.name)
- filter_with_input(all_examples)
- all_examples.sort()
-
- # If boards are not specified in arguments, build all
- all_boards = []
- for entry in os.scandir("hw/bsp"):
- if entry.is_dir() and os.path.exists(entry.path + "/board.mk"):
- all_boards.append(entry.name)
- filter_with_input(all_boards)
- all_boards.sort()
-
- # Get dependencies
- for b in all_boards:
- subprocess.run("make -C examples/device/board_test BOARD={} get-deps".format(b), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-
- print(build_separator)
- print(build_utils.build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
- total_time = time.monotonic()
-
- # succeeded, failed, skipped
- total_result = [0, 0, 0]
- for example in all_examples:
- print(build_separator)
- with Pool(processes=os.cpu_count()) as pool:
- pool_args = list((map(lambda b, e=example, o='': [e, b, o], all_boards)))
- result = pool.starmap(build_utils.build_example, pool_args)
- # sum all element of same index (column sum)
- result = list(map(sum, list(zip(*result))))
-
- # add to total result
- total_result = list(map(lambda x, y: x + y, total_result, result))
-
- total_time = time.monotonic() - total_time
- print(build_separator)
- print("Build Summary: {} {}, {} {}, {} {} and took {:.2f}s".format(total_result[0], SUCCEEDED, total_result[1],
- FAILED, total_result[2], SKIPPED, total_time))
- print(build_separator)
-
- sys.exit(total_result[1])
diff --git a/tools/build_cmake.py b/tools/build_cmake.py
deleted file mode 100644
index e539b9f94..000000000
--- a/tools/build_cmake.py
+++ /dev/null
@@ -1,105 +0,0 @@
-import os
-import sys
-import time
-import subprocess
-import pathlib
-from multiprocessing import Pool
-
-import build_utils
-
-SUCCEEDED = "\033[32msucceeded\033[0m"
-FAILED = "\033[31mfailed\033[0m"
-SKIPPED = "\033[33mskipped\033[0m"
-
-build_separator = '-' * 106
-
-def filter_with_input(mylist):
- if len(sys.argv) > 1:
- input_args = list(set(mylist).intersection(sys.argv))
- if len(input_args) > 0:
- mylist[:] = input_args
-
-
-def build_family(family, cmake_option):
- all_boards = []
- for entry in os.scandir("hw/bsp/{}/boards".format(family)):
- if entry.is_dir() and entry.name != 'pico_sdk':
- all_boards.append(entry.name)
- all_boards.sort()
-
- # success, failed, skipped
- ret = [0, 0, 0]
- for board in all_boards:
- start_time = time.monotonic()
-
- build_dir = f"cmake-build/cmake-build-{board}"
-
- # Generate build
- r = subprocess.run(f"cmake examples -B {build_dir} -G \"Ninja\" -DFAMILY={family} -DBOARD"
- f"={board} {cmake_option}", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-
- # Build
- if r.returncode == 0:
- r = subprocess.run(f"cmake --build {build_dir}", shell=True, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
-
- duration = time.monotonic() - start_time
-
- if r.returncode == 0:
- status = SUCCEEDED
- ret[0] += 1
- else:
- status = FAILED
- ret[1] += 1
-
- flash_size = "-"
- sram_size = "-"
- example = 'all'
- title = build_utils.build_format.format(example, board, status, "{:.2f}s".format(duration), flash_size, sram_size)
-
- if os.getenv('CI'):
- # always print build output if in CI
- print(f"::group::{title}")
- print(r.stdout.decode("utf-8"))
- print(f"::endgroup::")
- else:
- # print build output if failed
- print(title)
- if r.returncode != 0:
- print(r.stdout.decode("utf-8"))
-
- return ret
-
-
-if __name__ == '__main__':
- cmake_options = ''
- for a in sys.argv[1:]:
- if a.startswith('-'):
- cmake_options += ' ' + a
-
- # If family are not specified in arguments, build all supported
- all_families = []
- for entry in os.scandir("hw/bsp"):
- if entry.is_dir() and entry.name != 'espressif' and os.path.isfile(entry.path + "/family.cmake"):
- all_families.append(entry.name)
- filter_with_input(all_families)
- all_families.sort()
-
- print(build_separator)
- print(build_utils.build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
- total_time = time.monotonic()
-
- # succeeded, failed, skipped
- total_result = [0, 0, 0]
- for family in all_families:
- fret = build_family(family, cmake_options)
- if len(fret) == len(total_result):
- total_result = [total_result[i] + fret[i] for i in range(len(fret))]
-
- total_time = time.monotonic() - total_time
- print(build_separator)
- print("Build Summary: {} {}, {} {}, {} {} and took {:.2f}s".format(total_result[0], SUCCEEDED, total_result[1],
- FAILED, total_result[2], SKIPPED, total_time))
- print(build_separator)
-
- sys.exit(total_result[1])
diff --git a/tools/build_esp32.py b/tools/build_esp32.py
deleted file mode 100644
index 951467c23..000000000
--- a/tools/build_esp32.py
+++ /dev/null
@@ -1,106 +0,0 @@
-import os
-import glob
-import sys
-import subprocess
-import time
-
-import build_utils
-
-SUCCEEDED = "\033[32msucceeded\033[0m"
-FAILED = "\033[31mfailed\033[0m"
-SKIPPED = "\033[33mskipped\033[0m"
-
-success_count = 0
-fail_count = 0
-skip_count = 0
-exit_status = 0
-
-total_time = time.monotonic()
-
-build_format = '| {:30} | {:30} | {:18} | {:7} | {:6} | {:6} |'
-build_separator = '-' * 107
-
-def filter_with_input(mylist):
- if len(sys.argv) > 1:
- input_args = list(set(mylist).intersection(sys.argv))
- if len(input_args) > 0:
- mylist[:] = input_args
-
-
-# Build all examples if not specified
-all_examples = [entry.replace('examples/', '') for entry in glob.glob("examples/*/*_freertos")]
-filter_with_input(all_examples)
-all_examples.append('device/board_test')
-all_examples.sort()
-
-# Build all boards if not specified
-all_boards = []
-for entry in os.scandir("hw/bsp/espressif/boards"):
- if entry.is_dir():
- all_boards.append(entry.name)
-filter_with_input(all_boards)
-all_boards.sort()
-
-def build_board(example, board):
- global success_count, fail_count, skip_count, exit_status
- start_time = time.monotonic()
-
- # Check if board is skipped
- build_dir = f"cmake-build/cmake-build-{board}/{example}"
-
- # Generate and build
- r = subprocess.run(f"cmake examples/{example} -B {build_dir} -G \"Ninja\" -DBOARD={board} -DMAX3421_HOST=1",
- shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- if r.returncode == 0:
- r = subprocess.run(f"cmake --build {build_dir}", shell=True, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- build_duration = time.monotonic() - start_time
- flash_size = "-"
- sram_size = "-"
-
- if r.returncode == 0:
- success = SUCCEEDED
- success_count += 1
- #(flash_size, sram_size) = build_size(example, board)
- else:
- exit_status = r.returncode
- success = FAILED
- fail_count += 1
-
- title = build_format.format(example, board, success, "{:.2f}s".format(build_duration), flash_size, sram_size)
- if os.getenv('CI'):
- # always print build output if in CI
- print(f"::group::{title}")
- print(r.stdout.decode("utf-8"))
- print(f"::endgroup::")
- else:
- # print build output if failed
- print(title)
- if r.returncode != 0:
- print(r.stdout.decode("utf-8"))
-
-
-def build_size(example, board):
- #elf_file = 'examples/device/{}/_build/{}/{}-firmware.elf'.format(example, board, board)
- elf_file = 'examples/device/{}/_build/{}/*.elf'.format(example, board)
- size_output = subprocess.run('size {}'.format(elf_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8")
- size_list = size_output.split('\n')[1].split('\t')
- flash_size = int(size_list[0])
- sram_size = int(size_list[1]) + int(size_list[2])
- return (flash_size, sram_size)
-
-
-print(build_separator)
-print(build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
-print(build_separator)
-
-for example in all_examples:
- for board in all_boards:
- build_board(example, board)
-
-total_time = time.monotonic() - total_time
-print(build_separator)
-print("Build Summary: {} {}, {} {}, {} {} and took {:.2f}s".format(success_count, SUCCEEDED, fail_count, FAILED, skip_count, SKIPPED, total_time))
-print(build_separator)
-
-sys.exit(exit_status)
diff --git a/tools/build_make.py b/tools/build_make.py
deleted file mode 100644
index 240fc8d64..000000000
--- a/tools/build_make.py
+++ /dev/null
@@ -1,80 +0,0 @@
-import os
-import sys
-import time
-from multiprocessing import Pool
-
-import build_utils
-
-SUCCEEDED = "\033[32msucceeded\033[0m"
-FAILED = "\033[31mfailed\033[0m"
-SKIPPED = "\033[33mskipped\033[0m"
-
-build_separator = '-' * 106
-
-
-def filter_with_input(mylist):
- if len(sys.argv) > 1:
- input_args = list(set(mylist).intersection(sys.argv))
- if len(input_args) > 0:
- mylist[:] = input_args
-
-
-def build_family(example, family, make_option):
- all_boards = []
- for entry in os.scandir("hw/bsp/{}/boards".format(family)):
- if entry.is_dir() and entry.name != 'pico_sdk':
- all_boards.append(entry.name)
- filter_with_input(all_boards)
- all_boards.sort()
-
- with Pool(processes=os.cpu_count()) as pool:
- pool_args = list((map(lambda b, e=example, o=make_option: [e, b, o], all_boards)))
- result = pool.starmap(build_utils.build_example, pool_args)
- # sum all element of same index (column sum)
- return list(map(sum, list(zip(*result))))
-
-
-if __name__ == '__main__':
- make_option = ''
- for a in sys.argv:
- if 'TOOLCHAIN=' in sys.argv:
- make_option += ' ' + a
-
- # If examples are not specified in arguments, build all
- all_examples = []
- for d in os.scandir("examples"):
- if d.is_dir() and 'cmake' not in d.name and 'build_system' not in d.name:
- for entry in os.scandir(d.path):
- if entry.is_dir() and 'cmake' not in entry.name:
- all_examples.append(d.name + '/' + entry.name)
- filter_with_input(all_examples)
- all_examples.sort()
-
- # If family are not specified in arguments, build all
- all_families = []
- for entry in os.scandir("hw/bsp"):
- if entry.is_dir() and os.path.isdir(entry.path + "/boards") and entry.name != 'espressif':
- all_families.append(entry.name)
- filter_with_input(all_families)
- all_families.sort()
-
- print(build_separator)
- print(build_utils.build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
- total_time = time.monotonic()
-
- # succeeded, failed, skipped
- total_result = [0, 0, 0]
- for example in all_examples:
- print(build_separator)
- for family in all_families:
- fret = build_family(example, family, make_option)
- if len(fret) == len(total_result):
- total_result = [total_result[i] + fret[i] for i in range(len(fret))]
-
- total_time = time.monotonic() - total_time
- print(build_separator)
- print("Build Summary: {} {}, {} {}, {} {} and took {:.2f}s".format(total_result[0], SUCCEEDED, total_result[1],
- FAILED, total_result[2], SKIPPED, total_time))
- print(build_separator)
-
- sys.exit(total_result[1])
diff --git a/tools/build_utils.py b/tools/build_utils.py
index b66b64b97..5462829e2 100644..100755
--- a/tools/build_utils.py
+++ b/tools/build_utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import subprocess
import pathlib
import time
@@ -13,33 +14,25 @@ def skip_example(example, board):
ex_dir = pathlib.Path('examples/') / example
bsp = pathlib.Path("hw/bsp")
- if (bsp / board / "board.mk").exists():
- # board without family
- board_dir = bsp / board
- family = ""
- mk_contents = ""
- else:
- # board within family
- board_dir = list(bsp.glob("*/boards/" + board))
- if not board_dir:
- # Skip unknown boards
- return True
-
- board_dir = list(board_dir)[0]
+ # board within family
+ board_dir = list(bsp.glob("*/boards/" + board))
+ if not board_dir:
+ # Skip unknown boards
+ return True
- family_dir = board_dir.parent.parent
- family = family_dir.name
+ board_dir = list(board_dir)[0]
+ family_dir = board_dir.parent.parent
+ family = family_dir.name
- # family.mk
- family_mk = family_dir / "family.mk"
- mk_contents = family_mk.read_text()
+ # family.mk
+ family_mk = family_dir / "family.mk"
+ mk_contents = family_mk.read_text()
# Find the mcu, first in family mk then board mk
if "CFG_TUSB_MCU=OPT_MCU_" not in mk_contents:
- board_mk = board_dir / "board.cmake"
+ board_mk = board_dir / "board.mk"
if not board_mk.exists():
- board_mk = board_dir / "board.mk"
-
+ board_mk = board_dir / "board.cmake"
mk_contents = board_mk.read_text()
mcu = "NONE"
@@ -49,18 +42,23 @@ def skip_example(example, board):
token = token.strip("\"")
_, opt_mcu = token.split("=")
mcu = opt_mcu[len("OPT_MCU_"):]
- break
if "esp32s2" in token:
mcu = "ESP32S2"
- break
if "esp32s3" in token:
mcu = "ESP32S3"
+ if mcu != "NONE":
break
# Skip all OPT_MCU_NONE these are WIP port
if mcu == "NONE":
return True
+ max3421_enabled = False
+ for line in mk_contents.splitlines():
+ if "MAX3421_HOST=1" in line or 'MAX3421_HOST 1' in line:
+ max3421_enabled = True
+ break
+
skip_file = ex_dir / "skip.txt"
only_file = ex_dir / "only.txt"
@@ -74,6 +72,7 @@ def skip_example(example, board):
if only_file.exists():
onlys = only_file.read_text().split()
if not ("mcu:" + mcu in onlys or
+ ("mcu:MAX3421" in onlys and max3421_enabled) or
"board:" + board in onlys or
"family:" + family in onlys):
return True
@@ -81,43 +80,6 @@ def skip_example(example, board):
return False
-def build_example(example, board, make_option):
- start_time = time.monotonic()
- flash_size = "-"
- sram_size = "-"
-
- # succeeded, failed, skipped
- ret = [0, 0, 0]
-
- make_cmd = "make -j -C examples/{} BOARD={} {}".format(example, board, make_option)
-
- # Check if board is skipped
- if skip_example(example, board):
- status = SKIPPED
- ret[2] = 1
- print(build_format.format(example, board, status, '-', flash_size, sram_size))
- else:
- #subprocess.run(make_cmd + " clean", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- build_result = subprocess.run(make_cmd + " all", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-
- if build_result.returncode == 0:
- status = SUCCEEDED
- ret[0] = 1
- (flash_size, sram_size) = build_size(make_cmd)
- #subprocess.run(make_cmd + " copy-artifact", shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- else:
- status = FAILED
- ret[1] = 1
-
- build_duration = time.monotonic() - start_time
- print(build_format.format(example, board, status, "{:.2f}s".format(build_duration), flash_size, sram_size))
-
- if build_result.returncode != 0:
- print(build_result.stdout.decode("utf-8"))
-
- return ret
-
-
def build_size(make_cmd):
size_output = subprocess.run(make_cmd + ' size', shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8").splitlines()
for i, l in enumerate(size_output):
diff --git a/tools/gen_doc.py b/tools/gen_doc.py
index c63294588..c69f3ff29 100644..100755
--- a/tools/gen_doc.py
+++ b/tools/gen_doc.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import pandas as pd
from tabulate import tabulate
from pathlib import Path
@@ -7,9 +8,9 @@ from get_deps import deps_all
TOP = Path(__file__).parent.parent.resolve()
-###########################################
+# -----------------------------------------
# Dependencies
-###########################################
+# -----------------------------------------
def gen_deps_doc():
deps_rst = Path(TOP) / "docs/reference/dependencies.rst"
diff --git a/tools/get_deps.py b/tools/get_deps.py
index bf6ef8c00..519cb1d53 100644..100755
--- a/tools/get_deps.py
+++ b/tools/get_deps.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+import argparse
import sys
import subprocess
from pathlib import Path
@@ -13,7 +15,7 @@ deps_mandatory = {
'159e31b689577dbf69cf0683bbaffbd71fa5ee10',
'all'],
'tools/uf2': ['https://github.com/microsoft/uf2.git',
- '19615407727073e36d81bf239c52108ba92e7660',
+ 'c594542b2faa01cc33a2b97c9fbebc38549df80a',
'all'],
}
@@ -23,6 +25,9 @@ deps_optional = {
'hw/mcu/allwinner': ['https://github.com/hathach/allwinner_driver.git',
'8e5e89e8e132c0fd90e72d5422e5d3d68232b756',
'fc100s'],
+ 'hw/mcu/analog/max32' : ['https://github.com/analogdevicesinc/msdk.git',
+ 'b20b398d3e5e2007594e54a74ba3d2a2e50ddd75',
+ 'max32650 max32666 max32690 max78002'],
'hw/mcu/bridgetek/ft9xx/ft90x-sdk': ['https://github.com/BRTSG-FOSS/ft90x-sdk.git',
'91060164afe239fcb394122e8bf9eb24d3194eb1',
'brtmm90x'],
@@ -37,9 +42,9 @@ deps_optional = {
'xmc4000'],
'hw/mcu/microchip': ['https://github.com/hathach/microchip_driver.git',
'9e8b37e307d8404033bb881623a113931e1edf27',
- 'sam3x samd11 samd21 samd51 same5x same7x saml2x samg'],
+ 'sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg'],
'hw/mcu/mindmotion/mm32sdk': ['https://github.com/hathach/mm32sdk.git',
- '0b79559eb411149d36e073c1635c620e576308d4',
+ 'b93e856211060ae825216c6a1d6aa347ec758843',
'mm32'],
'hw/mcu/nordic/nrfx': ['https://github.com/NordicSemiconductor/nrfx.git',
'7c47cc0a56ce44658e6da2458e86cd8783ccc4a2',
@@ -48,13 +53,13 @@ deps_optional = {
'2204191ec76283371419fbcec207da02e1bc22fa',
'nuc'],
'hw/mcu/nxp/lpcopen': ['https://github.com/hathach/nxp_lpcopen.git',
- '04bfe7a5f6ee74a89a28ad618d3367dcfcfb7d83',
+ 'b41cf930e65c734d8ec6de04f1d57d46787c76ae',
'lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43'],
'hw/mcu/nxp/mcux-sdk': ['https://github.com/hathach/mcux-sdk.git',
'144f1eb7ea8c06512e12f12b27383601c0272410',
'kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'],
'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git',
- '0f747aaa0c16f750bdfa2ba37ec25d6c8e1bc117',
+ 'fe9133fc513b82cc3dc62c67cb51f2339cf29ef7',
'rp2040'],
'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git',
'd52e5a6a59b7c638da860c2bb309b6e78e752ff8',
@@ -166,9 +171,15 @@ deps_optional = {
'stm32wb'],
'hw/mcu/ti': ['https://github.com/hathach/ti_driver.git',
'143ed6cc20a7615d042b03b21e070197d473e6e5',
- 'msp430 msp432e4 tm4c123'],
+ 'msp430 msp432e4 tm4c'],
+ 'hw/mcu/wch/ch32v103': ['https://github.com/openwch/ch32v103.git',
+ '7578cae0b21f86dd053a1f781b2fc6ab99d0ec17',
+ 'ch32v10x'],
+ 'hw/mcu/wch/ch32v20x': ['https://github.com/openwch/ch32v20x.git',
+ 'c4c38f507e258a4e69b059ccc2dc27dde33cea1b',
+ 'ch32v20x'],
'hw/mcu/wch/ch32v307': ['https://github.com/openwch/ch32v307.git',
- '17761f5cf9dbbf2dcf665b7c04934188add20082',
+ '184f21b852cb95eed58e86e901837bc9fff68775',
'ch32v307'],
'hw/mcu/wch/ch32f20x': ['https://github.com/openwch/ch32f20x.git',
'77c4095087e5ed2c548ec9058e655d0b8757663b',
@@ -179,7 +190,8 @@ deps_optional = {
'lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43'
'stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32g0 stm32g4 stm32h5'
'stm32h7 stm32l0 stm32l1 stm32l4 stm32l5 stm32u5 stm32wb'
- 'sam3x samd11 samd21 samd51 same5x same7x saml2x samg'],
+ 'sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg'
+ 'tm4c'],
'lib/sct_neopixel': ['https://github.com/gsteiert/sct_neopixel.git',
'e73e04ca63495672d955f9268e003cffe168fcd8',
'lpc55'],
@@ -226,27 +238,60 @@ def get_a_dep(d):
return 0
-# Arguments can be
-# - family name
-# - specific deps path
-# - all
-if __name__ == "__main__":
+def find_family(board):
+ bsp_dir = Path(TOP / "hw/bsp")
+ for family_dir in bsp_dir.iterdir():
+ if family_dir.is_dir():
+ board_dir = family_dir / 'boards' / board
+ if board_dir.exists():
+ return family_dir.name
+ return None
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('families', nargs='*', default=[], help='Families to fetch')
+ parser.add_argument('-b', '--board', action='append', default=[], help='Boards to fetch')
+ parser.add_argument('-f1', '--build-flags-on', action='append', default=[], help='Have no effect')
+ parser.add_argument('--print', action='store_true', help='Print commit hash only')
+ args = parser.parse_args()
+
+ families = args.families
+ boards = args.board
+ print_only = args.print
+
status = 0
deps = list(deps_mandatory.keys())
- # get all if 'all' is argument
- if len(sys.argv) == 2 and sys.argv[1] == 'all':
+
+ if 'all' in families:
deps += deps_optional.keys()
else:
- for arg in sys.argv[1:]:
- if arg in deps_all.keys():
- # if arg is a dep, add it
- deps.append(arg)
- else:
- # arg is a family name, add all deps of that family
- for d in deps_optional:
- if arg in deps_optional[d][2]:
- deps.append(d)
+ families = list(families)
+ if boards is not None:
+ for b in boards:
+ f = find_family(b)
+ if f is not None:
+ families.append(f)
- with Pool() as pool:
- status = sum(pool.map(get_a_dep, deps))
- sys.exit(status)
+ for f in families:
+ for d in deps_optional:
+ if d not in deps and f in deps_optional[d][2]:
+ deps.append(d)
+
+ if print_only:
+ pvalue = {}
+ # print only without arguments, always add CMSIS_5
+ if len(families) == 0 and len(boards) == 0:
+ deps.append('lib/CMSIS_5')
+ for d in deps:
+ commit = deps_all[d][1]
+ pvalue[d] = commit
+ print(pvalue)
+ else:
+ with Pool() as pool:
+ status = sum(pool.map(get_a_dep, deps))
+ return status
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/tools/iar_gen.py b/tools/iar_gen.py
index 264dd9a58..8d45659db 100644..100755
--- a/tools/iar_gen.py
+++ b/tools/iar_gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
import os
import sys
@@ -56,6 +56,7 @@ def Main():
def ListPath(path, blacklist=[]):
# Get all .c files
files = glob.glob(f'../{path}/**/*.c', recursive=True)
+ files.extend(glob.glob(f'../{path}/**/*.h', recursive=True))
# Filter
files = [x for x in files if all(y not in x for y in blacklist)]
# Get common dir list
@@ -77,6 +78,8 @@ def List():
ListPath('lib/SEGGER_RTT')
if __name__ == "__main__":
+ if os.path.dirname(os.getcwd()) != 'tools':
+ os.chdir('tools')
if (len(sys.argv) > 1):
if (sys.argv[1] == 'l'):
List()
diff --git a/tools/iar_template.ipcf b/tools/iar_template.ipcf
index c3683c3d7..33a6ef045 100644
--- a/tools/iar_template.ipcf
+++ b/tools/iar_template.ipcf
@@ -10,57 +10,101 @@
<files>
<group name="src">
<path>$TUSB_DIR$/src/tusb.c</path>
+ <path>$TUSB_DIR$/src/tusb.h</path>
+ <path>$TUSB_DIR$/src/tusb_option.h</path>
</group>
<group name="src/class/audio">
<path>$TUSB_DIR$/src/class/audio/audio_device.c</path>
+ <path>$TUSB_DIR$/src/class/audio/audio.h</path>
+ <path>$TUSB_DIR$/src/class/audio/audio_device.h</path>
</group>
<group name="src/class/bth">
<path>$TUSB_DIR$/src/class/bth/bth_device.c</path>
+ <path>$TUSB_DIR$/src/class/bth/bth_device.h</path>
</group>
<group name="src/class/cdc">
<path>$TUSB_DIR$/src/class/cdc/cdc_device.c</path>
<path>$TUSB_DIR$/src/class/cdc/cdc_host.c</path>
<path>$TUSB_DIR$/src/class/cdc/cdc_rndis_host.c</path>
+ <path>$TUSB_DIR$/src/class/cdc/cdc.h</path>
+ <path>$TUSB_DIR$/src/class/cdc/cdc_device.h</path>
+ <path>$TUSB_DIR$/src/class/cdc/cdc_host.h</path>
+ <path>$TUSB_DIR$/src/class/cdc/cdc_rndis.h</path>
+ <path>$TUSB_DIR$/src/class/cdc/cdc_rndis_host.h</path>
</group>
<group name="src/class/dfu">
<path>$TUSB_DIR$/src/class/dfu/dfu_device.c</path>
<path>$TUSB_DIR$/src/class/dfu/dfu_rt_device.c</path>
+ <path>$TUSB_DIR$/src/class/dfu/dfu.h</path>
+ <path>$TUSB_DIR$/src/class/dfu/dfu_device.h</path>
+ <path>$TUSB_DIR$/src/class/dfu/dfu_rt_device.h</path>
</group>
<group name="src/class/hid">
<path>$TUSB_DIR$/src/class/hid/hid_device.c</path>
<path>$TUSB_DIR$/src/class/hid/hid_host.c</path>
+ <path>$TUSB_DIR$/src/class/hid/hid.h</path>
+ <path>$TUSB_DIR$/src/class/hid/hid_device.h</path>
+ <path>$TUSB_DIR$/src/class/hid/hid_host.h</path>
</group>
<group name="src/class/midi">
<path>$TUSB_DIR$/src/class/midi/midi_device.c</path>
+ <path>$TUSB_DIR$/src/class/midi/midi.h</path>
+ <path>$TUSB_DIR$/src/class/midi/midi_device.h</path>
</group>
<group name="src/class/msc">
<path>$TUSB_DIR$/src/class/msc/msc_device.c</path>
<path>$TUSB_DIR$/src/class/msc/msc_host.c</path>
+ <path>$TUSB_DIR$/src/class/msc/msc.h</path>
+ <path>$TUSB_DIR$/src/class/msc/msc_device.h</path>
+ <path>$TUSB_DIR$/src/class/msc/msc_host.h</path>
</group>
<group name="src/class/net">
<path>$TUSB_DIR$/src/class/net/ecm_rndis_device.c</path>
<path>$TUSB_DIR$/src/class/net/ncm_device.c</path>
+ <path>$TUSB_DIR$/src/class/net/ncm.h</path>
+ <path>$TUSB_DIR$/src/class/net/net_device.h</path>
</group>
<group name="src/class/usbtmc">
<path>$TUSB_DIR$/src/class/usbtmc/usbtmc_device.c</path>
+ <path>$TUSB_DIR$/src/class/usbtmc/usbtmc.h</path>
+ <path>$TUSB_DIR$/src/class/usbtmc/usbtmc_device.h</path>
</group>
<group name="src/class/vendor">
<path>$TUSB_DIR$/src/class/vendor/vendor_device.c</path>
<path>$TUSB_DIR$/src/class/vendor/vendor_host.c</path>
+ <path>$TUSB_DIR$/src/class/vendor/vendor_device.h</path>
+ <path>$TUSB_DIR$/src/class/vendor/vendor_host.h</path>
</group>
<group name="src/class/video">
<path>$TUSB_DIR$/src/class/video/video_device.c</path>
+ <path>$TUSB_DIR$/src/class/video/video.h</path>
+ <path>$TUSB_DIR$/src/class/video/video_device.h</path>
</group>
<group name="src/common">
<path>$TUSB_DIR$/src/common/tusb_fifo.c</path>
+ <path>$TUSB_DIR$/src/common/tusb_common.h</path>
+ <path>$TUSB_DIR$/src/common/tusb_compiler.h</path>
+ <path>$TUSB_DIR$/src/common/tusb_debug.h</path>
+ <path>$TUSB_DIR$/src/common/tusb_fifo.h</path>
+ <path>$TUSB_DIR$/src/common/tusb_mcu.h</path>
+ <path>$TUSB_DIR$/src/common/tusb_private.h</path>
+ <path>$TUSB_DIR$/src/common/tusb_types.h</path>
+ <path>$TUSB_DIR$/src/common/tusb_verify.h</path>
</group>
<group name="src/device">
<path>$TUSB_DIR$/src/device/usbd.c</path>
<path>$TUSB_DIR$/src/device/usbd_control.c</path>
+ <path>$TUSB_DIR$/src/device/dcd.h</path>
+ <path>$TUSB_DIR$/src/device/usbd.h</path>
+ <path>$TUSB_DIR$/src/device/usbd_pvt.h</path>
</group>
<group name="src/host">
<path>$TUSB_DIR$/src/host/hub.c</path>
<path>$TUSB_DIR$/src/host/usbh.c</path>
+ <path>$TUSB_DIR$/src/host/hcd.h</path>
+ <path>$TUSB_DIR$/src/host/hub.h</path>
+ <path>$TUSB_DIR$/src/host/usbh.h</path>
+ <path>$TUSB_DIR$/src/host/usbh_pvt.h</path>
</group>
<group name="src/portable/analog/max3421">
<path>$TUSB_DIR$/src/portable/analog/max3421/hcd_max3421.c</path>
@@ -70,26 +114,39 @@
</group>
<group name="src/portable/chipidea/ci_fs">
<path>$TUSB_DIR$/src/portable/chipidea/ci_fs/dcd_ci_fs.c</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_fs/ci_fs_kinetis.h</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_fs/ci_fs_mcx.h</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_fs/ci_fs_type.h</path>
</group>
<group name="src/portable/chipidea/ci_hs">
<path>$TUSB_DIR$/src/portable/chipidea/ci_hs/dcd_ci_hs.c</path>
<path>$TUSB_DIR$/src/portable/chipidea/ci_hs/hcd_ci_hs.c</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_hs/ci_hs_imxrt.h</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_hs/ci_hs_lpc18_43.h</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_hs/ci_hs_mcx.h</path>
+ <path>$TUSB_DIR$/src/portable/chipidea/ci_hs/ci_hs_type.h</path>
</group>
<group name="src/portable/dialog/da146xx">
<path>$TUSB_DIR$/src/portable/dialog/da146xx/dcd_da146xx.c</path>
</group>
<group name="src/portable/ehci">
<path>$TUSB_DIR$/src/portable/ehci/ehci.c</path>
+ <path>$TUSB_DIR$/src/portable/ehci/ehci.h</path>
+ <path>$TUSB_DIR$/src/portable/ehci/ehci_api.h</path>
</group>
<group name="src/portable/mentor/musb">
<path>$TUSB_DIR$/src/portable/mentor/musb/dcd_musb.c</path>
<path>$TUSB_DIR$/src/portable/mentor/musb/hcd_musb.c</path>
+ <path>$TUSB_DIR$/src/portable/mentor/musb/musb_msp432e.h</path>
+ <path>$TUSB_DIR$/src/portable/mentor/musb/musb_tm4c.h</path>
+ <path>$TUSB_DIR$/src/portable/mentor/musb/musb_type.h</path>
</group>
<group name="src/portable/microchip/pic">
<path>$TUSB_DIR$/src/portable/microchip/pic/dcd_pic.c</path>
</group>
<group name="src/portable/microchip/pic32mz">
<path>$TUSB_DIR$/src/portable/microchip/pic32mz/dcd_pic32mz.c</path>
+ <path>$TUSB_DIR$/src/portable/microchip/pic32mz/usbhs_registers.h</path>
</group>
<group name="src/portable/microchip/samd">
<path>$TUSB_DIR$/src/portable/microchip/samd/dcd_samd.c</path>
@@ -99,6 +156,7 @@
</group>
<group name="src/portable/microchip/samx7x">
<path>$TUSB_DIR$/src/portable/microchip/samx7x/dcd_samx7x.c</path>
+ <path>$TUSB_DIR$/src/portable/microchip/samx7x/common_usb_regs.h</path>
</group>
<group name="src/portable/mindmotion/mm32">
<path>$TUSB_DIR$/src/portable/mindmotion/mm32/dcd_mm32f327x_otg.c</path>
@@ -122,12 +180,14 @@
<group name="src/portable/nxp/lpc17_40">
<path>$TUSB_DIR$/src/portable/nxp/lpc17_40/dcd_lpc17_40.c</path>
<path>$TUSB_DIR$/src/portable/nxp/lpc17_40/hcd_lpc17_40.c</path>
+ <path>$TUSB_DIR$/src/portable/nxp/lpc17_40/dcd_lpc17_40.h</path>
</group>
<group name="src/portable/nxp/lpc_ip3511">
<path>$TUSB_DIR$/src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c</path>
</group>
<group name="src/portable/ohci">
<path>$TUSB_DIR$/src/portable/ohci/ohci.c</path>
+ <path>$TUSB_DIR$/src/portable/ohci/ohci.h</path>
</group>
<group name="src/portable/raspberrypi/pio_usb">
<path>$TUSB_DIR$/src/portable/raspberrypi/pio_usb/dcd_pio_usb.c</path>
@@ -137,42 +197,79 @@
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/dcd_rp2040.c</path>
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/hcd_rp2040.c</path>
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/rp2040_usb.c</path>
+ <path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/rp2040_usb.h</path>
</group>
<group name="src/portable/renesas/rusb2">
<path>$TUSB_DIR$/src/portable/renesas/rusb2/dcd_rusb2.c</path>
<path>$TUSB_DIR$/src/portable/renesas/rusb2/hcd_rusb2.c</path>
<path>$TUSB_DIR$/src/portable/renesas/rusb2/rusb2_common.c</path>
+ <path>$TUSB_DIR$/src/portable/renesas/rusb2/rusb2_ra.h</path>
+ <path>$TUSB_DIR$/src/portable/renesas/rusb2/rusb2_rx.h</path>
+ <path>$TUSB_DIR$/src/portable/renesas/rusb2/rusb2_type.h</path>
</group>
<group name="src/portable/sony/cxd56">
<path>$TUSB_DIR$/src/portable/sony/cxd56/dcd_cxd56.c</path>
</group>
<group name="src/portable/st/stm32_fsdev">
<path>$TUSB_DIR$/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c</path>
+ <path>$TUSB_DIR$/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.h</path>
</group>
<group name="src/portable/st/typec">
<path>$TUSB_DIR$/src/portable/st/typec/typec_stm32.c</path>
</group>
<group name="src/portable/sunxi">
<path>$TUSB_DIR$/src/portable/sunxi/dcd_sunxi_musb.c</path>
+ <path>$TUSB_DIR$/src/portable/sunxi/musb_def.h</path>
</group>
<group name="src/portable/synopsys/dwc2">
<path>$TUSB_DIR$/src/portable/synopsys/dwc2/dcd_dwc2.c</path>
+ <path>$TUSB_DIR$/src/portable/synopsys/dwc2/dwc2_bcm.h</path>
+ <path>$TUSB_DIR$/src/portable/synopsys/dwc2/dwc2_efm32.h</path>
+ <path>$TUSB_DIR$/src/portable/synopsys/dwc2/dwc2_esp32.h</path>
+ <path>$TUSB_DIR$/src/portable/synopsys/dwc2/dwc2_gd32.h</path>
+ <path>$TUSB_DIR$/src/portable/synopsys/dwc2/dwc2_stm32.h</path>
+ <path>$TUSB_DIR$/src/portable/synopsys/dwc2/dwc2_type.h</path>
+ <path>$TUSB_DIR$/src/portable/synopsys/dwc2/dwc2_xmc.h</path>
</group>
<group name="src/portable/ti/msp430x5xx">
<path>$TUSB_DIR$/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c</path>
</group>
<group name="src/portable/valentyusb/eptri">
<path>$TUSB_DIR$/src/portable/valentyusb/eptri/dcd_eptri.c</path>
+ <path>$TUSB_DIR$/src/portable/valentyusb/eptri/dcd_eptri.h</path>
</group>
<group name="src/portable/wch">
+ <path>$TUSB_DIR$/src/portable/wch/dcd_ch32_usbfs.c</path>
<path>$TUSB_DIR$/src/portable/wch/dcd_ch32_usbhs.c</path>
+ <path>$TUSB_DIR$/src/portable/wch/ch32_usbhs_reg.h</path>
</group>
<group name="src/typec">
<path>$TUSB_DIR$/src/typec/usbc.c</path>
+ <path>$TUSB_DIR$/src/typec/pd_types.h</path>
+ <path>$TUSB_DIR$/src/typec/tcd.h</path>
+ <path>$TUSB_DIR$/src/typec/usbc.h</path>
+ </group>
+ <group name="src/class/cdc/serial">
+ <path>$TUSB_DIR$/src/class/cdc/serial/ch34x.h</path>
+ <path>$TUSB_DIR$/src/class/cdc/serial/cp210x.h</path>
+ <path>$TUSB_DIR$/src/class/cdc/serial/ftdi_sio.h</path>
+ </group>
+ <group name="src/osal">
+ <path>$TUSB_DIR$/src/osal/osal.h</path>
+ <path>$TUSB_DIR$/src/osal/osal_freertos.h</path>
+ <path>$TUSB_DIR$/src/osal/osal_mynewt.h</path>
+ <path>$TUSB_DIR$/src/osal/osal_none.h</path>
+ <path>$TUSB_DIR$/src/osal/osal_pico.h</path>
+ <path>$TUSB_DIR$/src/osal/osal_rtthread.h</path>
+ <path>$TUSB_DIR$/src/osal/osal_rtx4.h</path>
</group>
<group name="lib/SEGGER_RTT/RTT">
<path>$TUSB_DIR$/lib/SEGGER_RTT/RTT/SEGGER_RTT.c</path>
<path>$TUSB_DIR$/lib/SEGGER_RTT/RTT/SEGGER_RTT_printf.c</path>
+ <path>$TUSB_DIR$/lib/SEGGER_RTT/RTT/SEGGER_RTT.h</path>
+ </group>
+ <group name="lib/SEGGER_RTT/Config">
+ <path>$TUSB_DIR$/lib/SEGGER_RTT/Config/SEGGER_RTT_Conf.h</path>
</group>
</files>
diff --git a/tools/make_release.py b/tools/make_release.py
index 256ca8f21..92c75baf9 100644..100755
--- a/tools/make_release.py
+++ b/tools/make_release.py
@@ -1,6 +1,8 @@
+#!/usr/bin/env python3
import re
+import gen_doc
-version = '0.16.0'
+version = '0.17.0'
print('version {}'.format(version))
ver_id = version.split('.')
@@ -46,4 +48,6 @@ with open(f_library_json, 'w') as f:
# docs/info/changelog.rst
###################
+gen_doc.gen_deps_doc()
+
print("Update docs/info/changelog.rst")
diff --git a/tools/mksunxi.py b/tools/mksunxi.py
index fd8557cfc..fd8557cfc 100644..100755
--- a/tools/mksunxi.py
+++ b/tools/mksunxi.py
diff --git a/tools/pcapng_to_corpus.py b/tools/pcapng_to_corpus.py
index 9c31365eb..3089f0bb6 100755
--- a/tools/pcapng_to_corpus.py
+++ b/tools/pcapng_to_corpus.py
@@ -1,4 +1,4 @@
-#!/bin/python3
+#!/usr/bin/env python3
import argparse
import pcapng
import zipfile