Skip to content

Commit

Permalink
Update FLASH_SIZE_BYTES to avoid assert on > 2MB
Browse files Browse the repository at this point in the history
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
  • Loading branch information
earlephilhower committed Apr 3, 2021
1 parent d48aafa commit c1ab2b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 0 deletions.
Binary file modified lib/libpico.a
Binary file not shown.
1 change: 1 addition & 0 deletions pico-sdk-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ add_library(pico STATIC)

target_compile_definitions(pico PUBLIC
PICO_PRINTF_ALWAYS_INCLUDED=1
PICO_FLASH_SIZE_BYTES=16777216
)

target_link_libraries(pico
Expand Down

0 comments on commit c1ab2b7

Please sign in to comment.