diff options
| author | hathach <[email protected]> | 2024-08-14 06:33:42 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-08-14 06:33:42 +0700 |
| commit | 761399b5e09fd682d7be5ad7570c039922eb18bb (patch) | |
| tree | 6f06f5d974fbbd74cdd83f328ca4e94175a38e80 /tools | |
| parent | 5122d6d109f8c4b31b6cbe29c685fad30a8961fe (diff) | |
| parent | b8d3c0c4a8e005bcfcc4ed04556e6da54f235ccc (diff) | |
Merge branch 'refs/heads/master' into fork/BrentK-ADI/max32_port
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build_utils.py | 32 | ||||
| -rw-r--r-- | tools/get_deps.py | 11 |
2 files changed, 22 insertions, 21 deletions
diff --git a/tools/build_utils.py b/tools/build_utils.py index b66b64b97..32aca95dd 100644 --- a/tools/build_utils.py +++ b/tools/build_utils.py @@ -81,6 +81,19 @@ def skip_example(example, board): return False +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): + text_title = 'text data bss dec' + if text_title in l: + size_list = size_output[i+1].split('\t') + flash_size = int(size_list[0]) + sram_size = int(size_list[1]) + int(size_list[2]) + return (flash_size, sram_size) + + return (0, 0) + + def build_example(example, board, make_option): start_time = time.monotonic() flash_size = "-" @@ -89,7 +102,7 @@ def build_example(example, board, make_option): # succeeded, failed, skipped ret = [0, 0, 0] - make_cmd = "make -j -C examples/{} BOARD={} {}".format(example, board, make_option) + make_cmd = f"make -j -C examples/{example} BOARD={board} {make_option}" # Check if board is skipped if skip_example(example, board): @@ -97,14 +110,12 @@ def build_example(example, board, make_option): 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) + build_result = subprocess.run(f"{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 @@ -116,16 +127,3 @@ def build_example(example, board, make_option): 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): - text_title = 'text data bss dec' - if text_title in l: - size_list = size_output[i+1].split('\t') - flash_size = int(size_list[0]) - sram_size = int(size_list[1]) + int(size_list[2]) - return (flash_size, sram_size) - - return (0, 0) diff --git a/tools/get_deps.py b/tools/get_deps.py index fe548f4ab..51d6304ae 100644 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -52,13 +52,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', + '7902e9fa8ed4a271d8d1d5e7e50516c2292b7bc2', 'rp2040'], 'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git', 'd52e5a6a59b7c638da860c2bb309b6e78e752ff8', @@ -171,11 +171,14 @@ deps_optional = { 'hw/mcu/ti': ['https://github.com/hathach/ti_driver.git', '143ed6cc20a7615d042b03b21e070197d473e6e5', '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', - 'de6d68c654340d7f27b00cebbfc9aa2740a1abc2', + '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', |
