Skip to content

Commit c1ab2b7

Browse files
Update FLASH_SIZE_BYTES to avoid assert on > 2MB
The SDK would assert if a flash write/erase happened past the end of the flash space it was built with. So, 8MB chips would crash when accessing offset 3MB, for example. Avoid this by specifying the maximum flash available so the SDK won't trip. Fixes #76
1 parent d48aafa commit c1ab2b7

File tree

2 files changed

+1
-0
lines changed

2 files changed

+1
-0
lines changed

lib/libpico.a

-8 Bytes
Binary file not shown.

pico-sdk-lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ add_library(pico STATIC)
1515

1616
target_compile_definitions(pico PUBLIC
1717
PICO_PRINTF_ALWAYS_INCLUDED=1
18+
PICO_FLASH_SIZE_BYTES=16777216
1819
)
1920

2021
target_link_libraries(pico

0 commit comments

Comments
 (0)