summaryrefslogtreecommitdiff
path: root/tools/build.py
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-07-02 16:34:17 +0700
committerhathach <[email protected]>2025-07-02 16:34:17 +0700
commit52f0427096a9e20b62dc3055a153a60e50317297 (patch)
treef73d6823a6f5532afc963455edd536fd3d036bbf /tools/build.py
parent014d6b2f2647b5135e22d219b61b727cb9a20ae6 (diff)
remove make wrapper for rp2040/espressif
Diffstat (limited to 'tools/build.py')
-rwxr-xr-xtools/build.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/build.py b/tools/build.py
index eaa383d73..f639fba81 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -154,16 +154,21 @@ def make_one_example(example, board, make_option):
def make_board(board, toolchain):
print(build_separator)
- all_examples = get_examples(find_family(board))
+ family = find_family(board);
+ all_examples = get_examples(family)
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)
+ if family == 'espressif' or family == 'rp2040':
+ # espressif and rp2040 do not support make, use cmake instead
+ final_status = 2
+ else:
+ 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))))
+ final_status = 0 if ret[1] == 0 else 1
+ print_build_result(board, 'all', final_status, time.monotonic() - start_time)
return ret