File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -525,11 +525,24 @@ target_compile_options(${MICROPY_TARGET} PRIVATE
525
525
526
526
target_link_options (${MICROPY_TARGET} PRIVATE
527
527
-Wl,--defsym=__micropy_c_heap_size__=${MICROPY_C_HEAP_SIZE}
528
- -Wl,--defsym=__micropy_flash_size__=${PICO_FLASH_SIZE_BYTES}
529
528
-Wl,--wrap=dcd_event_handler
530
529
-Wl,--wrap=runtime_init_clocks
531
530
)
532
531
532
+ if (PICO_FLASH_SIZE_BYTES GREATER 0 )
533
+ target_link_options (${MICROPY_TARGET} PRIVATE
534
+ -Wl,--defsym=__micropy_flash_size__=${PICO_FLASH_SIZE_BYTES}
535
+ )
536
+ elseif (PICO_RP2040 )
537
+ target_link_options (${MICROPY_TARGET} PRIVATE
538
+ -Wl,--defsym=__micropy_flash_size__=2048k # Default to 2MB
539
+ )
540
+ elseif (PICO_RP2350 )
541
+ target_link_options (${MICROPY_TARGET} PRIVATE
542
+ -Wl,--defsym=__micropy_flash_size__=4096k # Default to 4MB
543
+ )
544
+ endif ()
545
+
533
546
if (PICO_RP2350 )
534
547
target_link_options (${MICROPY_TARGET} PRIVATE
535
548
-Wl,--defsym=__micropy_extra_stack__=4096
You can’t perform that action at this time.
0 commit comments