From 88455f006a31fa6cc831d39286c2778da8d69b53 Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Tue, 22 Jul 2025 14:43:48 +0100 Subject: [PATCH 1/2] Remove second arguments from pico_package_uf2_output functions See raspberrypi/pico-sdk#2545 --- bootloaders/encrypted/CMakeLists.txt | 4 ++-- bootloaders/uart/CMakeLists.txt | 2 +- encrypted/hello_encrypted/CMakeLists.txt | 4 ++-- universal/wrapper/CMakeLists.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bootloaders/encrypted/CMakeLists.txt b/bootloaders/encrypted/CMakeLists.txt index 20fd558f1..6ad33f055 100644 --- a/bootloaders/encrypted/CMakeLists.txt +++ b/bootloaders/encrypted/CMakeLists.txt @@ -50,7 +50,7 @@ pico_embed_pt_in_binary(enc_bootloader ${CMAKE_CURRENT_LIST_DIR}/enc-pt.json) # create absolute uf2, and package in flash pico_set_uf2_family(enc_bootloader "absolute") -pico_package_uf2_output(enc_bootloader 0x10000000) +pico_package_uf2_output(enc_bootloader) # optionally enable USB output in addition to UART # pico_enable_stdio_usb(enc_bootloader 1) @@ -86,7 +86,7 @@ pico_hash_binary(hello_serial_enc) pico_encrypt_binary(hello_serial_enc ${CMAKE_CURRENT_LIST_DIR}/privateaes.bin ${CMAKE_CURRENT_LIST_DIR}/ivsalt.bin) # package uf2 in flash -pico_package_uf2_output(hello_serial_enc 0x10000000) +pico_package_uf2_output(hello_serial_enc) # optionally enable USB output in addition to UART # pico_enable_stdio_usb(hello_serial_enc 1) diff --git a/bootloaders/uart/CMakeLists.txt b/bootloaders/uart/CMakeLists.txt index d14109b57..a0470902a 100644 --- a/bootloaders/uart/CMakeLists.txt +++ b/bootloaders/uart/CMakeLists.txt @@ -29,7 +29,7 @@ target_link_libraries(uart_binary pico_stdlib) pico_set_binary_type(uart_binary no_flash) # package uf2 in flash -pico_package_uf2_output(uart_binary 0x10000000) +pico_package_uf2_output(uart_binary) # create map/bin/hex/uf2 file etc. pico_add_extra_outputs(uart_binary) diff --git a/encrypted/hello_encrypted/CMakeLists.txt b/encrypted/hello_encrypted/CMakeLists.txt index 443e5dfa4..a627c4d25 100644 --- a/encrypted/hello_encrypted/CMakeLists.txt +++ b/encrypted/hello_encrypted/CMakeLists.txt @@ -38,7 +38,7 @@ pico_encrypt_binary(hello_encrypted EMBED) # package uf2 in flash -pico_package_uf2_output(hello_encrypted 0x10000000) +pico_package_uf2_output(hello_encrypted) # create map/bin/hex/uf2 file etc. pico_add_extra_outputs(hello_encrypted) @@ -86,7 +86,7 @@ pico_encrypt_binary(hello_encrypted_mbedtls OTP_KEY_PAGE 29) # package uf2 in flash -pico_package_uf2_output(hello_encrypted_mbedtls 0x10000000) +pico_package_uf2_output(hello_encrypted_mbedtls) # create map/bin/hex/uf2 file etc. pico_add_extra_outputs(hello_encrypted_mbedtls) diff --git a/universal/wrapper/CMakeLists.txt b/universal/wrapper/CMakeLists.txt index cf6024c18..97e4281dd 100644 --- a/universal/wrapper/CMakeLists.txt +++ b/universal/wrapper/CMakeLists.txt @@ -52,7 +52,7 @@ function(pico_add_extra_outputs TARGET) get_target_property(BINARY_TYPE ${SOURCE_TARGET} PICO_TARGET_BINARY_TYPE) if (${BINARY_TYPE} STREQUAL "no_flash") message("Packaging no_flash universal binary to SRAM, so it has a load_map") - pico_package_uf2_output(${SOURCE_TARGET} 0x20000000) + pico_ensure_load_map(${SOURCE_TARGET}) endif() endif() _pico_add_extra_outputs(${SOURCE_TARGET}) From eb79f9240117275cdee4e7c06126361b927abb40 Mon Sep 17 00:00:00 2001 From: will-v-pi <108662275+will-v-pi@users.noreply.github.com> Date: Wed, 23 Jul 2025 19:52:24 +0100 Subject: [PATCH 2/2] Clarify universal binary load_map message --- universal/wrapper/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/universal/wrapper/CMakeLists.txt b/universal/wrapper/CMakeLists.txt index 97e4281dd..548f9310e 100644 --- a/universal/wrapper/CMakeLists.txt +++ b/universal/wrapper/CMakeLists.txt @@ -51,7 +51,8 @@ function(pico_add_extra_outputs TARGET) if (NOT (PICO_PLATFORM MATCHES rp2040)) get_target_property(BINARY_TYPE ${SOURCE_TARGET} PICO_TARGET_BINARY_TYPE) if (${BINARY_TYPE} STREQUAL "no_flash") - message("Packaging no_flash universal binary to SRAM, so it has a load_map") + message("Ensuring no_flash universal binary has a load_map") + # This is required so it is copied to the correct location in SRAM pico_ensure_load_map(${SOURCE_TARGET}) endif() endif()