diff --git a/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/CMakeLists.txt b/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/CMakeLists.txt index 6a764b6d..170e0ce9 100644 --- a/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/CMakeLists.txt +++ b/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/CMakeLists.txt @@ -27,6 +27,9 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc. pico_enable_stdio_usb(firmware 1) # Route stdio pico_enable_stdio_uart(firmware 0) # to USB +# Prevent extreme optimization from breaking OTA +target_compile_options(firmware PRIVATE -fno-tree-loop-distribute-patterns) + # Mongoose build flags in mongoose_config.h # Example build options diff --git a/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/Makefile b/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/Makefile index c9dda46b..149bb210 100644 --- a/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/Makefile +++ b/examples/pico-sdk/pico-2-w-picosdk-freertos-lwip/Makefile @@ -15,8 +15,11 @@ build/firmware.uf2: cd build && cmake -DPICO_BOARD="pico2_w" -G "Unix Makefiles" .. && make pico-sdk: - git clone --depth 1 -b 2.1.0 https://github.com/raspberrypi/pico-sdk $@ - cd $@ && git submodule update --init + #git clone --depth 1 -b 2.1.1 https://github.com/raspberrypi/pico-sdk $@ + #cd $@ && git submodule update --init + # Temporary fix until 2.1.1 is released, see #3027 + git clone -b develop https://github.com/raspberrypi/pico-sdk $@ + cd $@ && git reset --hard --quiet b51fa1b && git submodule update --quiet --init FreeRTOS-Kernel: # FreeRTOS sources git clone --depth 1 -b main https://github.com/raspberrypi/FreeRTOS-Kernel $@ diff --git a/examples/pico-sdk/pico-rmii/CMakeLists.txt b/examples/pico-sdk/pico-rmii/CMakeLists.txt index 443ba2e3..90265dc2 100644 --- a/examples/pico-sdk/pico-rmii/CMakeLists.txt +++ b/examples/pico-sdk/pico-rmii/CMakeLists.txt @@ -17,3 +17,6 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc. pico_enable_stdio_usb(firmware 1) # Route stdio pico_enable_stdio_uart(firmware 0) # to USB + +# Prevent extreme optimization from breaking OTA +target_compile_options(firmware PRIVATE -fno-tree-loop-distribute-patterns) diff --git a/examples/pico-sdk/pico-rndis-dashboard/CMakeLists.txt b/examples/pico-sdk/pico-rndis-dashboard/CMakeLists.txt index 32ca308d..46654d68 100644 --- a/examples/pico-sdk/pico-rndis-dashboard/CMakeLists.txt +++ b/examples/pico-sdk/pico-rndis-dashboard/CMakeLists.txt @@ -30,3 +30,6 @@ add_definitions(-DHTTP_URL="http://0.0.0.0/") # Extra build flags (enable if needed) add_definitions(-DDUAL_CONFIG=0) + +# Prevent extreme optimization from breaking OTA +target_compile_options(firmware PRIVATE -fno-tree-loop-distribute-patterns) diff --git a/examples/pico-sdk/pico-rndis-device/CMakeLists.txt b/examples/pico-sdk/pico-rndis-device/CMakeLists.txt index 7d7138b2..2c8ca9a0 100644 --- a/examples/pico-sdk/pico-rndis-device/CMakeLists.txt +++ b/examples/pico-sdk/pico-rndis-device/CMakeLists.txt @@ -21,6 +21,9 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc. pico_enable_stdio_usb(firmware 0) # Route stdio pico_enable_stdio_uart(firmware 1) # to the UART +# Prevent extreme optimization from breaking OTA +target_compile_options(firmware PRIVATE -fno-tree-loop-distribute-patterns) + # Mongoose build flags in mongoose_config.h # Example build options diff --git a/examples/pico-sdk/pico-w-picosdk-freertos-lwip/CMakeLists.txt b/examples/pico-sdk/pico-w-picosdk-freertos-lwip/CMakeLists.txt index 6a764b6d..170e0ce9 100644 --- a/examples/pico-sdk/pico-w-picosdk-freertos-lwip/CMakeLists.txt +++ b/examples/pico-sdk/pico-w-picosdk-freertos-lwip/CMakeLists.txt @@ -27,6 +27,9 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc. pico_enable_stdio_usb(firmware 1) # Route stdio pico_enable_stdio_uart(firmware 0) # to USB +# Prevent extreme optimization from breaking OTA +target_compile_options(firmware PRIVATE -fno-tree-loop-distribute-patterns) + # Mongoose build flags in mongoose_config.h # Example build options