From f7e2250c964d746960f19b91ecb2e98ed55beb78 Mon Sep 17 00:00:00 2001 From: David Dyck Date: Fri, 28 Feb 2025 06:50:22 -0800 Subject: [PATCH 1/2] Fix #2253 cybt_printf by wrapping with NDEBUG Observe that src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus_driver.c wraps the definition of cybt_printf with #ifndef NDEBUG Apply this to src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c --- .../pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c b/src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c index b464b3f78..9b454b6d5 100644 --- a/src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c +++ b/src/rp2_common/pico_cyw43_driver/cybt_shared_bus/cybt_shared_bus.c @@ -39,7 +39,11 @@ extern const int brcm_patch_ram_length; #else #define cybt_debug(format, ...) ((void)0) #endif +#ifndef NDEBUG #define cybt_printf(format, args...) printf("%d.%d: " format, (int)cyw43_hal_ticks_ms() / 1000, (int)cyw43_hal_ticks_ms() % 1000, ## args) +#else +#define cybt_printf(...) +#endif #define ROUNDUP(x, a) ((((x) + ((a) - 1)) / (a)) * (a)) #define ROUNDDN(x, a) ((x) & ~((a) - 1)) From 4eb3edf80fd71e7ed99b0bc34265981bea2d6bfc Mon Sep 17 00:00:00 2001 From: David Dyck Date: Fri, 11 Apr 2025 08:56:05 -0700 Subject: [PATCH 2/2] Update memmap_copy_to_ram.ld Fix #2413 --- src/rp2_common/pico_crt0/rp2350/memmap_copy_to_ram.ld | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rp2_common/pico_crt0/rp2350/memmap_copy_to_ram.ld b/src/rp2_common/pico_crt0/rp2350/memmap_copy_to_ram.ld index 89d63a9f0..145faf817 100644 --- a/src/rp2_common/pico_crt0/rp2350/memmap_copy_to_ram.ld +++ b/src/rp2_common/pico_crt0/rp2350/memmap_copy_to_ram.ld @@ -33,10 +33,10 @@ ENTRY(_entry_point) SECTIONS { - /* Second stage bootloader is prepended to the image. It must be 256 bytes big - and checksummed. It is usually built by the boot_stage2 target - in the Raspberry Pi Pico SDK - */ + /* On Arm, the bootrom expects a VT at the start of the + image by default; on RISC-V, the default is to enter the image at its + lowest address, so an IMAGEDEF item is required to specify the + nondefault entry point. */ .flash_begin : { __flash_binary_start = .;