MEMORY { FLASH_TEXT (rx) : ORIGIN = 0x10000000, LENGTH = 2048k } 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 */ .boot2 : { __boot2_start__ = .; KEEP (*(.boot2)) __boot2_end__ = .; } > FLASH_TEXT ASSERT(__boot2_end__ - __boot2_start__ == 256, "ERROR: Pico second stage bootloader must be 256 bytes in size") /* The second stage will always enter the image at the start of .text. The debugger will use the ELF entry point, which is the _entry_point symbol if present, otherwise defaults to start of .text. This can be used to transfer control back to the bootrom on debugger launches only, to perform proper flash setup. */ } INCLUDE "targets/rp2040.ld"