diff options
| author | dp111 <[email protected]> | 2024-08-15 21:05:41 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-15 21:05:41 +0100 |
| commit | 802713523ed97b3a5190d778d19a9814efe0cab9 (patch) | |
| tree | 5b72c2a68a74f56c53e88c542f5596e589db1fc0 /tools | |
| parent | 18b5affce9afb26141c58f59ed89ad34385a0f8f (diff) | |
| parent | b8d3c0c4a8e005bcfcc4ed04556e6da54f235ccc (diff) | |
Merge pull request #1 from hathach/master
Sync
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build_utils.py | 32 | ||||
| -rw-r--r-- | tools/get_deps.py | 2 |
2 files changed, 16 insertions, 18 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 7fbde0e02..b639ed6d6 100644 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -55,7 +55,7 @@ deps_optional = { '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', |
