From 98d6180c7b5f6d2d95e8b7fd4bc68b754e632f37 Mon Sep 17 00:00:00 2001 From: Dan Collins Date: Mon, 2 Jun 2025 22:42:41 +1200 Subject: [PATCH] hal_rpi_pico: require GNU extensions for pico SDK The pico SDK uses typeof() and the current approach, in CMakeLists.txt, wasn't enough. This commit adds a dependency on GNU extensions to ensure the builds pass. Signed-off-by: Dan Collins --- modules/hal_rpi_pico/CMakeLists.txt | 1 - modules/hal_rpi_pico/Kconfig | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/hal_rpi_pico/CMakeLists.txt b/modules/hal_rpi_pico/CMakeLists.txt index 42f0bdfd3ef0..31ead3d58e54 100644 --- a/modules/hal_rpi_pico/CMakeLists.txt +++ b/modules/hal_rpi_pico/CMakeLists.txt @@ -4,7 +4,6 @@ include(ExternalProject) if(CONFIG_HAS_RPI_PICO) zephyr_library() - set_property(TARGET ${ZEPHYR_CURRENT_LIBRARY} PROPERTY C_STANDARD 11) set(rp2_common_dir ${ZEPHYR_HAL_RPI_PICO_MODULE_DIR}/src/rp2_common) set(rp2xxx_dir ${ZEPHYR_HAL_RPI_PICO_MODULE_DIR}/src/${CONFIG_SOC_SERIES}) diff --git a/modules/hal_rpi_pico/Kconfig b/modules/hal_rpi_pico/Kconfig index 3c37c84f4c01..dd64ed33cbab 100644 --- a/modules/hal_rpi_pico/Kconfig +++ b/modules/hal_rpi_pico/Kconfig @@ -3,6 +3,8 @@ config HAS_RPI_PICO bool + # pico-sdk makes use of typeof - and for that we need GNU extensions! + select GNU_C_EXTENSIONS config PICOSDK_USE_UART bool