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
525525
526526target_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}
529528 -Wl,--wrap=dcd_event_handler
530529 -Wl,--wrap=runtime_init_clocks
531530)
532531
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+
533546if (PICO_RP2350)
534547 target_link_options (${MICROPY_TARGET} PRIVATE
535548 -Wl,--defsym=__micropy_extra_stack__=4096
You can’t perform that action at this time.
0 commit comments