Skip to content

Commit a916695

Browse files
authored
Add PICO_FLASH_SIZE_BYTES to PIO (#1416)
1 parent 611547e commit a916695

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/platformio-build.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ def is_pio_build():
126126
("BOARD_NAME", '\\"%s\\"' % env.subst("$BOARD")),
127127
"ARM_MATH_CM0_FAMILY",
128128
"ARM_MATH_CM0_PLUS",
129-
"TARGET_RP2040"
129+
"TARGET_RP2040",
130+
# at this point, the main.py builder script hasn't updated upload.maximum_size yet,
131+
# so it's the original value for the full flash.
132+
("PICO_FLASH_SIZE_BYTES", board.get("upload.maximum_size"))
130133
],
131134

132135
CPPPATH=[

0 commit comments

Comments
 (0)