Skip to content

Commit c9b52b2

Browse files
sfe-SparkFrodpgeorge
authored andcommitted
rp2/CMakeLists.txt: Fix flash size check logic.
Follow up to 6bfb83e, if the variable `PICO_FLASH_SIZE_BYTES` is not a numeric constant, eg "(2 * 1024 * 1024)", then it won't pass the GREATER check. So change the if logic to just test if it's defined. Signed-off-by: Dryw Wade <[email protected]>
1 parent a9a606b commit c9b52b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/rp2/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ target_link_options(${MICROPY_TARGET} PRIVATE
528528
-Wl,--wrap=runtime_init_clocks
529529
)
530530

531-
if(PICO_FLASH_SIZE_BYTES GREATER 0)
531+
if(DEFINED PICO_FLASH_SIZE_BYTES)
532532
target_link_options(${MICROPY_TARGET} PRIVATE
533533
-Wl,--defsym=__micropy_flash_size__=${PICO_FLASH_SIZE_BYTES}
534534
)

0 commit comments

Comments
 (0)