diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt index 9185c7d649..198512f885 100644 --- a/ports/rp2/CMakeLists.txt +++ b/ports/rp2/CMakeLists.txt @@ -206,6 +206,11 @@ if(MICROPY_PY_BLUETOOTH) endif() if(MICROPY_BLUETOOTH_NIMBLE) + string(CONCAT GIT_SUBMODULES "${GIT_SUBMODULES} " lib/mynewt-nimble) + if(NOT (${ECHO_SUBMODULES}) AND NOT EXISTS ${MICROPY_DIR}/lib/mynewt-nimble/nimble/host/include/host/ble_hs.h) + message(FATAL_ERROR " mynewt-nimble not initialized.\n Run 'make BOARD=${MICROPY_BOARD} submodules'") + endif() + list(APPEND MICROPY_SOURCE_PORT mpnimbleport.c) target_compile_definitions(${MICROPY_TARGET} PRIVATE MICROPY_BLUETOOTH_NIMBLE=1 @@ -223,6 +228,9 @@ endif() if (MICROPY_PY_NETWORK_CYW43) string(CONCAT GIT_SUBMODULES "${GIT_SUBMODULES} " lib/cyw43-driver) + if((NOT (${ECHO_SUBMODULES})) AND NOT EXISTS ${MICROPY_DIR}/lib/cyw43-driver/src/cyw43.h) + message(FATAL_ERROR " cyw43-driver not initialized.\n Run 'make BOARD=${MICROPY_BOARD} submodules'") + endif() target_compile_definitions(${MICROPY_TARGET} PRIVATE MICROPY_PY_NETWORK_CYW43=1