Skip to content

Commit 83c8f52

Browse files
committed
rp2: Make FLASH LENGTH match PICO_FLASH_SIZE_BYTES in .ld files.
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
1 parent 49f81d5 commit 83c8f52

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

ports/rp2/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ target_compile_options(${MICROPY_TARGET} PRIVATE
525525

526526
target_link_options(${MICROPY_TARGET} PRIVATE
527527
-Wl,--defsym=__micropy_c_heap_size__=${MICROPY_C_HEAP_SIZE}
528+
-Wl,--defsym=__micropy_flash_size__=${PICO_FLASH_SIZE_BYTES}
528529
-Wl,--wrap=dcd_event_handler
529530
-Wl,--wrap=runtime_init_clocks
530531
)

ports/rp2/memmap_mp_rp2040.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
MEMORY
2525
{
26-
FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k
26+
FLASH(rx) : ORIGIN = 0x10000000, LENGTH = __micropy_flash_size__
2727
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 256k
2828
SCRATCH_X(rwx) : ORIGIN = 0x20040000, LENGTH = 4k
2929
SCRATCH_Y(rwx) : ORIGIN = 0x20041000, LENGTH = 4k

ports/rp2/memmap_mp_rp2350.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
MEMORY
2525
{
26-
FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 4096k
26+
FLASH(rx) : ORIGIN = 0x10000000, LENGTH = __micropy_flash_size__
2727
RAM(rwx) : ORIGIN = 0x20000000, LENGTH = 512k
2828
SCRATCH_X(rwx) : ORIGIN = 0x20080000, LENGTH = 4k
2929
SCRATCH_Y(rwx) : ORIGIN = 0x20081000, LENGTH = 4k

0 commit comments

Comments
 (0)