remove make wrapper for rp2040/espressif
This commit is contained in:
@@ -82,7 +82,7 @@ You only need to do this once per family. Check out `complete list of dependenci
|
|||||||
Build Examples
|
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
|
.. code-block:: bash
|
||||||
|
|
||||||
|
@@ -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
|
|
@@ -154,16 +154,21 @@ def make_one_example(example, board, make_option):
|
|||||||
|
|
||||||
def make_board(board, toolchain):
|
def make_board(board, toolchain):
|
||||||
print(build_separator)
|
print(build_separator)
|
||||||
all_examples = get_examples(find_family(board))
|
family = find_family(board);
|
||||||
|
all_examples = get_examples(family)
|
||||||
start_time = time.monotonic()
|
start_time = time.monotonic()
|
||||||
ret = [0, 0, 0]
|
ret = [0, 0, 0]
|
||||||
|
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:
|
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)))
|
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)
|
r = pool.starmap(make_one_example, pool_args)
|
||||||
# sum all element of same index (column sum)
|
# sum all element of same index (column sum)
|
||||||
ret = list(map(sum, list(zip(*r))))
|
ret = list(map(sum, list(zip(*r))))
|
||||||
example = 'all'
|
final_status = 0 if ret[1] == 0 else 1
|
||||||
print_build_result(board, example, 0 if ret[1] == 0 else 1, time.monotonic() - start_time)
|
print_build_result(board, 'all', final_status, time.monotonic() - start_time)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user