diff --git a/Sming/Arch/Rp2040/Components/picotool/picotool b/Sming/Arch/Rp2040/Components/picotool/picotool index 54454bb02b..af47f2ddb3 160000 --- a/Sming/Arch/Rp2040/Components/picotool/picotool +++ b/Sming/Arch/Rp2040/Components/picotool/picotool @@ -1 +1 @@ -Subproject commit 54454bb02b1bb7d4c7bf5c6b13922ce34b0bdab4 +Subproject commit af47f2ddb341dc8851aaf24501b3a214a810e23c diff --git a/Sming/Arch/Rp2040/Components/picotool/picotool.patch b/Sming/Arch/Rp2040/Components/picotool/picotool.patch index dbfcf4c51d..583a801101 100644 --- a/Sming/Arch/Rp2040/Components/picotool/picotool.patch +++ b/Sming/Arch/Rp2040/Components/picotool/picotool.patch @@ -1,28 +1,31 @@ -diff --git a/lib/whereami/whereami.c b/lib/whereami/whereami.c -index d052e14..940736e 100644 ---- a/lib/whereami/whereami.c -+++ b/lib/whereami/whereami.c -@@ -60,8 +60,9 @@ extern "C" { - #if defined(_MSC_VER) - #pragma warning(push, 3) - #endif -+#undef _WIN32_WINNT -+#define _WIN32_WINNT _WIN32_WINNT_WINXP - #include --#include - #if defined(_MSC_VER) - #pragma warning(pop) - #endif -diff --git a/picoboot_connection/picoboot_connection.c b/picoboot_connection/picoboot_connection.c -index 265608c..e487714 100644 ---- a/picoboot_connection/picoboot_connection.c -+++ b/picoboot_connection/picoboot_connection.c -@@ -9,6 +9,8 @@ - #include - #include +diff --git a/model/model.h b/model/model.h +index 17bf824..318b0d2 100644 +--- a/model/model.h ++++ b/model/model.h +@@ -4,9 +4,16 @@ + * SPDX-License-Identifier: BSD-3-Clause + */ + #pragma once ++ ++/* 2026-05-20 Temporary fix for https://github.com/raspberrypi/picotool/issues/300 */ ++#undef __unused ++#define __unused __glibc_unused ++ + #include "boot/uf2.h" + #include "boot/picoboot.h" + ++#undef __unused ++ + // Unreadable ROM data + #include "rp2350_a2_rom_end.h" + #include "rp2350_a3_rom_end.h" +@@ -418,4 +425,7 @@ static bool contains_unreadable_rom(uint32_t addr, uint32_t size, const model_t& + (addr < model->unreadable_rom_start() && addr + size > model->unreadable_rom_end()); + } -+#define static_assert _Static_assert +-#endif +\ No newline at end of file ++#endif + - #include "picoboot_connection.h" - #include "boot/bootrom_constants.h" - #include "pico/stdio_usb/reset_interface.h" ++/* 2026-05-20 Temporary fix for https://github.com/raspberrypi/picotool/issues/300 */ ++#define __unused __attribute__((__unused__)) diff --git a/Sming/Arch/Rp2040/Components/rp2040/component.mk b/Sming/Arch/Rp2040/Components/rp2040/component.mk index baa9dab914..1d4702f1a7 100644 --- a/Sming/Arch/Rp2040/Components/rp2040/component.mk +++ b/Sming/Arch/Rp2040/Components/rp2040/component.mk @@ -49,6 +49,7 @@ $(foreach c,$(wildcard $(COMPONENT_PATH)/sdk/*.mk),$(eval include $c)) EXTRA_LDFLAGS := \ $(call Wrap,$(WRAPPED_FUNCTIONS)) \ -Wl,--whole-archive -lpico -Wl,--no-whole-archive \ + -T default_locations.ld \ -T memmap_default.ld SDK_INTERFACES := \ @@ -123,9 +124,12 @@ PICO_LIB := $(PICO_BUILD_DIR)/libpico.a COMPONENT_INCDIRS += $(PICO_BASE_DIR) LIBDIRS += \ - $(PICO_SDK_PATH)/src/rp2_common/pico_standard_link \ - $(PICO_SDK_PATH)/src/rp2_common/pico_crt0/$(RP_VARIANT) \ - $(PICO_BUILD_DIR) + $(RP2040_COMPONENT_DIR)/sdk/script_include \ + $(PICO_SDK_PATH)/src/$(RP_VARIANT)/pico_platform \ + $(PICO_SDK_PATH)/src/$(RP_VARIANT)/pico_platform/script_include \ + $(PICO_SDK_PATH)/src/rp2_common/pico_standard_link/script_include \ + $(PICO_BUILD_DIR) \ + $(PICO_BUILD_DIR)/pico-sdk/src/rp2_common/pico_standard_link EXTRA_LIBS += \ m \ diff --git a/Sming/Arch/Rp2040/Components/rp2040/cyw43-driver.patch b/Sming/Arch/Rp2040/Components/rp2040/cyw43-driver.patch index cbaa5d18fa..03ea4b8138 100644 --- a/Sming/Arch/Rp2040/Components/rp2040/cyw43-driver.patch +++ b/Sming/Arch/Rp2040/Components/rp2040/cyw43-driver.patch @@ -1,5 +1,5 @@ diff --git a/src/cyw43_ctrl.c b/src/cyw43_ctrl.c -index 8cfcc77..000ea91 100644 +index 8d7f0b8..1fab463 100644 --- a/src/cyw43_ctrl.c +++ b/src/cyw43_ctrl.c @@ -300,13 +300,17 @@ static const char *const cyw43_async_event_name_table[89] = { diff --git a/Sming/Arch/Rp2040/Components/rp2040/pico-sdk b/Sming/Arch/Rp2040/Components/rp2040/pico-sdk index be549183e8..d02b2e45a9 160000 --- a/Sming/Arch/Rp2040/Components/rp2040/pico-sdk +++ b/Sming/Arch/Rp2040/Components/rp2040/pico-sdk @@ -1 +1 @@ -Subproject commit be549183e86e3947368e4a69031afc84375d73e9 +Subproject commit d02b2e45a9c1cb0523421884ea0dd453adc4919c diff --git a/Sming/Arch/Rp2040/Components/rp2040/pico-sdk.patch b/Sming/Arch/Rp2040/Components/rp2040/pico-sdk.patch deleted file mode 100644 index c9373bb0ad..0000000000 --- a/Sming/Arch/Rp2040/Components/rp2040/pico-sdk.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/rp2_common/pico_crt0/rp2040/memmap_default.ld b/src/rp2_common/pico_crt0/rp2040/memmap_default.ld -index 5125401..6ba0d2f 100644 ---- a/src/rp2_common/pico_crt0/rp2040/memmap_default.ld -+++ b/src/rp2_common/pico_crt0/rp2040/memmap_default.ld -@@ -255,7 +255,7 @@ SECTIONS - - .flash_end : { - KEEP(*(.embedded_end_block*)) -- PROVIDE(__flash_binary_end = .); -+ __flash_binary_end = .; - } > FLASH - - /* stack limit is poorly named, but historically is maximum heap ptr */ -diff --git a/src/rp2_common/pico_crt0/rp2350/memmap_default.ld b/src/rp2_common/pico_crt0/rp2350/memmap_default.ld -index bce316d..05c1beb 100644 ---- a/src/rp2_common/pico_crt0/rp2350/memmap_default.ld -+++ b/src/rp2_common/pico_crt0/rp2350/memmap_default.ld -@@ -269,7 +269,7 @@ SECTIONS - - .flash_end : { - KEEP(*(.embedded_end_block*)) -- PROVIDE(__flash_binary_end = .); -+ __flash_binary_end = .; - } > FLASH =0xaa - - /* stack limit is poorly named, but historically is maximum heap ptr */ diff --git a/Sming/Arch/Rp2040/Components/rp2040/sdk/script_include/README.md b/Sming/Arch/Rp2040/Components/rp2040/sdk/script_include/README.md new file mode 100644 index 0000000000..a9cf8867e4 --- /dev/null +++ b/Sming/Arch/Rp2040/Components/rp2040/sdk/script_include/README.md @@ -0,0 +1,5 @@ +# sdk/script_include + +Since linker scripts have been split up into many `.incl` files. + +Scripts in this directory override those from pico_sdk. diff --git a/Sming/Arch/Rp2040/Components/rp2040/sdk/script_include/default_text_excludes.incl b/Sming/Arch/Rp2040/Components/rp2040/sdk/script_include/default_text_excludes.incl new file mode 100644 index 0000000000..2b207dd34c --- /dev/null +++ b/Sming/Arch/Rp2040/Components/rp2040/sdk/script_include/default_text_excludes.incl @@ -0,0 +1,8 @@ +/* + See https://github.com/raspberrypi/pico-sdk/issues/2340. + + This reverts the indicated change and gets back 5K of RAM. + Mostly this is due to `malloc_r` and `realloc_r`, which arguably do not need to be in RAM. +*/ + +*(EXCLUDE_FILE(*libgcc.a: *libc.a:lib*_a-mem*.o *libm.a:) .text*) diff --git a/Sming/Arch/Rp2040/Components/uf2/uf2families.json b/Sming/Arch/Rp2040/Components/uf2/uf2families.json index 26812b97b8..3e516b5ca3 100644 --- a/Sming/Arch/Rp2040/Components/uf2/uf2families.json +++ b/Sming/Arch/Rp2040/Components/uf2/uf2families.json @@ -239,6 +239,21 @@ "short_name": "ESP32C61", "description": "ESP32-C61" }, + { + "id": "0xb6dd00af", + "short_name": "ESP32H21", + "description": "ESP32-H21" + }, + { + "id": "0x9e0baa8a", + "short_name": "ESP32H4", + "description": "ESP32-H4" + }, + { + "id": "0x3101f7c1", + "short_name": "ESP32S31", + "description": "ESP32-S31" + }, { "id": "0xde1270b7", "short_name": "BL602", @@ -348,5 +363,30 @@ "id": "0x7be8976d", "short_name": "RA4M1", "description": "Renesas RA4M1" + }, + { + "id": "0x7410520a", + "short_name": "MAX32690", + "description": "Analog Devices MAX32690" + }, + { + "id": "0xd63f8632", + "short_name": "MAX32650", + "description": "Analog Devices MAX32650/1/2" + }, + { + "id": "0xf0c30d71", + "short_name": "MAX32666", + "description": "Analog Devices MAX32665/6" + }, + { + "id": "0x91d3fd18", + "short_name": "MAX78002", + "description": "Analog Devices MAX78002" + }, + { + "id": "0x7d7a66ef", + "short_name": "PY32F071-UVK5-V3", + "description": "Quansheng UV-K5 V3 amateur radio based on Puya Semiconductor PY32F071" } ]