Skip to content

Commit 52d3ae7

Browse files
kilograhamdpgeorge
authored andcommitted
rp2/memmap_mp.ld: Update for latest SDK.
1 parent c9210a6 commit 52d3ae7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ports/rp2/memmap_mp.ld

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SECTIONS
3535
{
3636
/* Second stage bootloader is prepended to the image. It must be 256 bytes big
3737
and checksummed. It is usually built by the boot_stage2 target
38-
in the Pico SDK
38+
in the Raspberry Pi Pico SDK
3939
*/
4040

4141
.flash_begin : {
@@ -59,12 +59,11 @@ SECTIONS
5959
*/
6060

6161
.text : {
62-
__reset_start = .;
63-
KEEP (*(.reset))
64-
. = ALIGN(256);
65-
__reset_end = .;
66-
ASSERT(__reset_end - __reset_start == 256, "ERROR: reset section should only be 256 bytes");
62+
__logical_binary_start = .;
6763
KEEP (*(.vectors))
64+
KEEP (*(.binary_info_header))
65+
__binary_info_header_end = .;
66+
KEEP (*(.reset))
6867
/* TODO revisit this now memset/memcpy/float in ROM */
6968
/* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from
7069
* FLASH ... we will include any thing excluded here in .data below by default */
@@ -247,6 +246,8 @@ SECTIONS
247246

248247
/* Check if data + heap + stack exceeds RAM limit */
249248
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed")
249+
250+
ASSERT( __binary_info_header_end - __logical_binary_start <= 256, "Binary info must be in first 256 bytes of the binary")
250251
/* todo assert on extra code */
251252
}
252253

0 commit comments

Comments
 (0)