From 50da085d93de55719198fb4fb1272f467e7a16a7 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 11 Mar 2025 17:34:24 +1100 Subject: [PATCH] rp2: Print an error message if pico-sdk submodule is missing. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton --- ports/rp2/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/rp2/Makefile b/ports/rp2/Makefile index bfc85f371..8cba521b2 100644 --- a/ports/rp2/Makefile +++ b/ports/rp2/Makefile @@ -56,9 +56,11 @@ ifdef MICROPY_PREVIEW_VERSION_2 CMAKE_ARGS += -DMICROPY_PREVIEW_VERSION_2=1 endif +HELP_PICO_SDK_SUBMODULE ?= "\033[1;31mError: pico-sdk submodule is not initialized.\033[0m Run 'make submodules'" HELP_BUILD_ERROR ?= "See \033[1;31mhttps://github.com/micropython/micropython/wiki/Build-Troubleshooting\033[0m" all: + [ -f ../../lib/pico-sdk/README.md ] || (echo -e $(HELP_PICO_SDK_SUBMODULE); false) [ -e $(BUILD)/Makefile ] || cmake -S . -B $(BUILD) -DPICO_BUILD_DOCS=0 ${CMAKE_ARGS} $(MAKE) $(MAKE_ARGS) -C $(BUILD) || (echo -e $(HELP_BUILD_ERROR); false)