Skip to content

Commit 52f0427

Browse files
committed
remove make wrapper for rp2040/espressif
1 parent 014d6b2 commit 52f0427

File tree

3 files changed

+14
-25
lines changed

3 files changed

+14
-25
lines changed

docs/reference/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ You only need to do this once per family. Check out `complete list of dependenci
8282
Build Examples
8383
^^^^^^^^^^^^^^
8484

85-
Examples support make and cmake build system, though some MCU family such as espressif/rp2040 only support cmake. First change directory to an example folder.
85+
Examples support make and cmake build system for most MCUs, however some MCU families such as espressif or rp2040 only support cmake. First change directory to an example folder.
8686

8787
.. code-block:: bash
8888

hw/bsp/rp2040/family.mk

Lines changed: 0 additions & 16 deletions
This file was deleted.

tools/build.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,21 @@ def make_one_example(example, board, make_option):
154154

155155
def make_board(board, toolchain):
156156
print(build_separator)
157-
all_examples = get_examples(find_family(board))
157+
family = find_family(board);
158+
all_examples = get_examples(family)
158159
start_time = time.monotonic()
159160
ret = [0, 0, 0]
160-
with Pool(processes=os.cpu_count()) as pool:
161-
pool_args = list((map(lambda e, b=board, o=f"TOOLCHAIN={toolchain}": [e, b, o], all_examples)))
162-
r = pool.starmap(make_one_example, pool_args)
163-
# sum all element of same index (column sum)
164-
ret = list(map(sum, list(zip(*r))))
165-
example = 'all'
166-
print_build_result(board, example, 0 if ret[1] == 0 else 1, time.monotonic() - start_time)
161+
if family == 'espressif' or family == 'rp2040':
162+
# espressif and rp2040 do not support make, use cmake instead
163+
final_status = 2
164+
else:
165+
with Pool(processes=os.cpu_count()) as pool:
166+
pool_args = list((map(lambda e, b=board, o=f"TOOLCHAIN={toolchain}": [e, b, o], all_examples)))
167+
r = pool.starmap(make_one_example, pool_args)
168+
# sum all element of same index (column sum)
169+
ret = list(map(sum, list(zip(*r))))
170+
final_status = 0 if ret[1] == 0 else 1
171+
print_build_result(board, 'all', final_status, time.monotonic() - start_time)
167172
return ret
168173

169174

0 commit comments

Comments
 (0)