Skip to content

Commit

Permalink
rp2: Pass V=1 or BUILD_VERBOSE to rp2 build.
Browse files Browse the repository at this point in the history
Similar to esp32. Previously rp2 could build verbose by passing VERBOSE=1,
which is picked up by Makefiles generated from CMake.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
  • Loading branch information
projectgus authored and dpgeorge committed Dec 10, 2024
1 parent 160a481 commit 31a1e2b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ports/rp2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This is a simple wrapper around cmake

include ../../py/verbose.mk

# Select the board to build for:
ifdef BOARD_DIR
# Custom board path - remove trailing slash and get the final component of
Expand All @@ -28,7 +30,9 @@ else
BUILD ?= build-$(BOARD)
endif

$(VERBOSE)MAKESILENT = -s
ifeq ($(BUILD_VERBOSE),1)
MAKE_ARGS += VERBOSE=1 # Picked up in Makefile generated by CMake
endif

CMAKE_ARGS += -DMICROPY_BOARD=$(BOARD) -DMICROPY_BOARD_DIR="$(abspath $(BOARD_DIR))"

Expand Down Expand Up @@ -56,7 +60,7 @@ HELP_BUILD_ERROR ?= "See \033[1;31mhttps://github.com/micropython/micropython/wi

all:
[ -e $(BUILD)/Makefile ] || cmake -S . -B $(BUILD) -DPICO_BUILD_DOCS=0 ${CMAKE_ARGS}
$(MAKE) $(MAKESILENT) -C $(BUILD) || (echo -e $(HELP_BUILD_ERROR); false)
$(MAKE) $(MAKE_ARGS) -C $(BUILD) || (echo -e $(HELP_BUILD_ERROR); false)

clean:
$(RM) -rf $(BUILD)
Expand Down

0 comments on commit 31a1e2b

Please sign in to comment.