diff --git a/soc/raspberrypi/rpi_pico/rp2350/Kconfig b/soc/raspberrypi/rpi_pico/rp2350/Kconfig index 28553021e2cb..afef9f0d0587 100644 --- a/soc/raspberrypi/rpi_pico/rp2350/Kconfig +++ b/soc/raspberrypi/rpi_pico/rp2350/Kconfig @@ -29,7 +29,7 @@ config SOC_RP2350B_M33 config RP2_REQUIRES_IMAGE_DEFINITION_BLOCK bool - default y + default y if FLASH_LOAD_OFFSET = 0x100 # Currently the IDF only supports using the Cortex-M33 cores. Enforce # this at build configuration time. depends on SOC_SERIES_RP2350 && CPU_CORTEX_M33 diff --git a/soc/raspberrypi/rpi_pico/rp2350/Kconfig.defconfig b/soc/raspberrypi/rpi_pico/rp2350/Kconfig.defconfig index 46b057490459..6e5cfe93e449 100644 --- a/soc/raspberrypi/rpi_pico/rp2350/Kconfig.defconfig +++ b/soc/raspberrypi/rpi_pico/rp2350/Kconfig.defconfig @@ -6,7 +6,10 @@ if SOC_SERIES_RP2350 config BUILD_OUTPUT_UF2_USE_FLASH_BASE - default y if BUILD_OUTPUT_UF2 + default y if RP2_REQUIRES_IMAGE_DEFINITION_BLOCK + +config BUILD_OUTPUT_UF2_USE_FLASH_OFFSET + default y if !RP2_REQUIRES_IMAGE_DEFINITION_BLOCK config NUM_IRQS default 52 diff --git a/soc/raspberrypi/rpi_pico/rp2350/linker.ld b/soc/raspberrypi/rpi_pico/rp2350/linker.ld index 6368409c9e27..8775ef32e361 100644 --- a/soc/raspberrypi/rpi_pico/rp2350/linker.ld +++ b/soc/raspberrypi/rpi_pico/rp2350/linker.ld @@ -6,6 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +#if CONFIG_RP2_REQUIRES_IMAGE_DEFINITION_BLOCK MEMORY { IMAGE_DEF_FLASH (r) : ORIGIN = 0x10000000, LENGTH = 128 @@ -23,5 +24,6 @@ SECTIONS LONG(0xab123579) /* PICOBIN_BLOCK_MARKER_END */ } > IMAGE_DEF_FLASH } +#endif /* CONFIG_RP2_REQUIRES_IMAGE_DEFINITION_BLOCK */ #include