Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sming/Arch/Rp2040/Components/picotool/picotool
Submodule picotool updated 65 files
+0 −1 .github/workflows/check_help_text.yml
+45 −0 .github/workflows/check_precompiled.sh
+52 −0 .github/workflows/check_precompiled.yml
+0 −6 .github/workflows/choco_packages.config
+28 −0 .github/workflows/pr-check.yml
+81 −8 .github/workflows/test.yml
+24 −12 BUILD.bazel
+1 −1 BUILDING.md
+34 −25 CMakeLists.txt
+1 −1 MODULE.bazel
+129 −17 README.md
+1 −0 bazel/BUILD.bazel
+2 −0 bazel/mbedtls.BUILD
+2 −4 bintool/BUILD.bazel
+0 −2 bintool/CMakeLists.txt
+74 −23 bintool/bintool.cpp
+7 −6 bintool/bintool.h
+7 −0 bintool/metadata.h
+5 −3 cmake/FindLIBUSB.cmake
+6 −2 elf/BUILD.bazel
+1 −1 elf/CMakeLists.txt
+49 −1 elf/elf_file.cpp
+2 −0 elf/elf_file.h
+2 −0 elf2uf2/BUILD.bazel
+1 −1 elf2uf2/CMakeLists.txt
+12 −17 elf2uf2/elf2uf2.cpp
+3 −2 elf2uf2/elf2uf2.h
+3 −1 enc_bootloader/BUILD.bazel
+8 −2 enc_bootloader/CMakeLists.txt
+26 −0 enc_bootloader/enc_bootloader.c
+ enc_bootloader/enc_bootloader.elf
+ enc_bootloader/enc_bootloader_mbedtls.elf
+1 −0 enc_bootloader/hard_entry_point.S
+1 −1 enc_bootloader/memmap_mbedtls.ld
+2 −0 errors/BUILD.bazel
+1 −1 errors/errors.cpp
+2 −2 errors/errors.h
+1 −1 json/default-pt.json
+1 −1 json/sample-permissions.json
+1 −1 json/sample-wl.json
+3 −2 json/schemas/partition-table-schema.json
+6 −1 lib/BUILD.bazel
+2 −0 lib/nlohmann_json/BUILD.bazel
+2 −0 lib/whereami/BUILD.bazel
+1,157 −781 main.cpp
+38 −0 model/BUILD.bazel
+35 −0 model/CMakeLists.txt
+0 −26 model/addresses.h
+4 −0 model/model.cpp
+421 −0 model/model.h
+ model/rp2350_a2_rom_end.bin
+ model/rp2350_a3_rom_end.bin
+ model/rp2350_a4_rom_end.bin
+4 −1 otp_header_parser/BUILD.bazel
+3 −1 picoboot_connection/BUILD.bazel
+31 −38 picoboot_connection/picoboot_connection.c
+2 −65 picoboot_connection/picoboot_connection.h
+7 −4 picoboot_connection/picoboot_connection_cxx.cpp
+1 −5 picoboot_connection/picoboot_connection_cxx.h
+2 −0 picoboot_flash_id/CMakeLists.txt
+ picoboot_flash_id/flash_id.bin
+19 −4 udev/60-picotool.rules
+2 −0 xip_ram_perms/BUILD.bazel
+2 −0 xip_ram_perms/CMakeLists.txt
+ xip_ram_perms/xip_ram_perms.elf
55 changes: 29 additions & 26 deletions Sming/Arch/Rp2040/Components/picotool/picotool.patch
Original file line number Diff line number Diff line change
@@ -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 <windows.h>
-#include <intrin.h>
#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 <stdbool.h>
#include <inttypes.h>
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__))
10 changes: 7 additions & 3 deletions Sming/Arch/Rp2040/Components/rp2040/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 := \
Expand Down Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion Sming/Arch/Rp2040/Components/rp2040/cyw43-driver.patch
Original file line number Diff line number Diff line change
@@ -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] = {
Expand Down
2 changes: 1 addition & 1 deletion Sming/Arch/Rp2040/Components/rp2040/pico-sdk
Submodule pico-sdk updated 666 files
26 changes: 0 additions & 26 deletions Sming/Arch/Rp2040/Components/rp2040/pico-sdk.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# sdk/script_include

Since <https://github.com/raspberrypi/pico-sdk/pull/2841> linker scripts have been split up into many `.incl` files.

Scripts in this directory override those from pico_sdk.
Original file line number Diff line number Diff line change
@@ -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*)
40 changes: 40 additions & 0 deletions Sming/Arch/Rp2040/Components/uf2/uf2families.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
]
Loading