summaryrefslogtreecommitdiff
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
parent014d6b2f2647b5135e22d219b61b727cb9a20ae6 (diff)
remove make wrapper for rp2040/espressif
-rw-r--r--docs/reference/getting_started.rst2
-rw-r--r--hw/bsp/rp2040/family.mk16
-rwxr-xr-xtools/build.py21
3 files changed, 14 insertions, 25 deletions
diff --git a/docs/reference/getting_started.rst b/docs/reference/getting_started.rst
index ee68f6386..5b009f21e 100644
--- a/docs/reference/getting_started.rst
+++ b/docs/reference/getting_started.rst
@@ -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
diff --git a/hw/bsp/rp2040/family.mk b/hw/bsp/rp2040/family.mk
deleted file mode 100644
index 813683c54..000000000
--- a/hw/bsp/rp2040/family.mk
+++ /dev/null
@@ -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
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