remove make wrapper for rp2040/espressif

This commit is contained in:
hathach
2025-07-02 16:34:17 +07:00
parent 014d6b2f26
commit 52f0427096
3 changed files with 14 additions and 25 deletions

View File

@@ -82,7 +82,7 @@ You only need to do this once per family. Check out `complete list of dependenci
Build Examples
^^^^^^^^^^^^^^
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.
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.
.. code-block:: bash

View File

@@ -1,16 +0,0 @@
JLINK_DEVICE = rp2040_m0_0
PYOCD_TARGET = rp2040
ifeq ($(DEBUG), 1)
CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug
endif
$(BUILD):
cmake -S . -B $(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) -DPICO_BUILD_DOCS=0 $(CMAKE_DEFSYM)
all: $(BUILD)
$(MAKE) -C $(BUILD)
flash: flash-pyocd
flash-uf2:
@$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2

View File

@@ -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