From 6ce02145dd0595b6ddb047cf13ff5c637a51ee63 Mon Sep 17 00:00:00 2001 From: Peter Harper Date: Mon, 24 Nov 2025 09:40:35 +0000 Subject: [PATCH] rp2: Remove build patch for Findpioasm.cmake. This patch was added in 3fa77bdc7d413a410fb85a8943d417bca3b562e7 to fix the GCC 15 build issue https://github.com/raspberrypi/pico-sdk/issues/2448. The patch is no longer needed with SDK 2.2.0. Signed-off-by: Peter Harper --- ports/rp2/CMakeLists.txt | 3 -- ports/rp2/tools_patch/Findpioasm.cmake | 58 -------------------------- 2 files changed, 61 deletions(-) delete mode 100644 ports/rp2/tools_patch/Findpioasm.cmake diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt index d34132238..f10cf1a16 100644 --- a/ports/rp2/CMakeLists.txt +++ b/ports/rp2/CMakeLists.txt @@ -84,9 +84,6 @@ endif() list(APPEND GIT_SUBMODULES lib/mbedtls) list(APPEND GIT_SUBMODULES lib/tinyusb) -# Workaround for pico-sdk host toolchain issue, see directory for details -list(APPEND CMAKE_MODULE_PATH "${MICROPY_PORT_DIR}/tools_patch") - # Include component cmake fragments include(${MICROPY_DIR}/py/py.cmake) include(${MICROPY_DIR}/extmod/extmod.cmake) diff --git a/ports/rp2/tools_patch/Findpioasm.cmake b/ports/rp2/tools_patch/Findpioasm.cmake deleted file mode 100644 index 72e6bf6fb..000000000 --- a/ports/rp2/tools_patch/Findpioasm.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# Finds (or builds) the pioasm executable -# -# This will define the following imported targets -# -# pioasm -# - -# This is a temporary patched copy of pico-sdk file Findpioasm.cmake to work around -# a host toolchain issue with GCC 15.1: -# https://github.com/raspberrypi/pico-sdk/issues/2448 - -if (NOT TARGET pioasm) - # todo we would like to use pckgconfig to look for it first - # see https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/ - - include(ExternalProject) - - set(PIOASM_SOURCE_DIR ${PICO_SDK_PATH}/tools/pioasm) - set(PIOASM_BINARY_DIR ${CMAKE_BINARY_DIR}/pioasm) - set(PIOASM_INSTALL_DIR ${CMAKE_BINARY_DIR}/pioasm-install CACHE PATH "Directory where pioasm has been installed" FORCE) - - set(pioasmBuild_TARGET pioasmBuild) - set(pioasm_TARGET pioasm) - - if (NOT TARGET ${pioasmBuild_TARGET}) - pico_message_debug("PIOASM will need to be built") -# message("Adding external project ${pioasmBuild_Target} in ${CMAKE_CURRENT_LIST_DIR}}") - ExternalProject_Add(${pioasmBuild_TARGET} - PREFIX pioasm - SOURCE_DIR ${PIOASM_SOURCE_DIR} - BINARY_DIR ${PIOASM_BINARY_DIR} - INSTALL_DIR ${PIOASM_INSTALL_DIR} - CMAKE_ARGS - "--no-warn-unused-cli" - "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}" - "-DPIOASM_FLAT_INSTALL=1" - "-DCMAKE_INSTALL_PREFIX=${PIOASM_INSTALL_DIR}" - "-DCMAKE_RULE_MESSAGES=OFF" # quieten the build - "-DCMAKE_INSTALL_MESSAGE=NEVER" # quieten the install - # Toolchain workaround follows - "-DCMAKE_CXX_FLAGS=-include cstdint" - CMAKE_CACHE_ARGS "-DPIOASM_EXTRA_SOURCE_FILES:STRING=${PIOASM_EXTRA_SOURCE_FILES}" - BUILD_ALWAYS 1 # force dependency checking - EXCLUDE_FROM_ALL TRUE - ) - endif() - - if (CMAKE_HOST_WIN32) - set(pioasm_EXECUTABLE ${PIOASM_INSTALL_DIR}/pioasm/pioasm.exe) - else() - set(pioasm_EXECUTABLE ${PIOASM_INSTALL_DIR}/pioasm/pioasm) - endif() - add_executable(${pioasm_TARGET} IMPORTED GLOBAL) - set_property(TARGET ${pioasm_TARGET} PROPERTY IMPORTED_LOCATION - ${pioasm_EXECUTABLE}) - - add_dependencies(${pioasm_TARGET} ${pioasmBuild_TARGET}) -endif()