diff options
author | ConfuSomu | 2021-04-08 14:36:32 -0400 |
---|---|---|
committer | ConfuSomu | 2021-04-08 14:36:32 -0400 |
commit | a713df0e42481d66513e42d85a88ea8dcf4f0619 (patch) | |
tree | 8cb0dcd9c747abb4f28461a08aa146d3c2418e2e | |
parent | fcdea445cb8b4d331d07dc1d1af25fdc1852ab05 (diff) | |
download | pico-watch-a713df0e42481d66513e42d85a88ea8dcf4f0619.tar pico-watch-a713df0e42481d66513e42d85a88ea8dcf4f0619.tar.gz pico-watch-a713df0e42481d66513e42d85a88ea8dcf4f0619.zip |
Update comments in CMakeLists.txt with findings
This should probably be moved to a textfile in a doc directory.
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a921604..8ec8115 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,15 +11,19 @@ set(PICO_SDK_PATH "/home/pi/pico/pico-sdk") include(pico_sdk_import.cmake) project(pico-watch C CXX) -add_compile_definitions(PICO_DEBUG_MALLOC PICO_DEBUG_MALLOC_LOW_WATER=1)# PICO_MALLOC_PANIC) + +# PICO_USE_STACK_GUARDS=1 for testing, might leave as is. +add_compile_definitions(PICO_DEBUG_MALLOC PICO_DEBUG_MALLOC_LOW_WATER=0 PICO_USE_STACK_GUARDS=1)# PICO_MALLOC_PANIC) # Increase heap size, this should leave: # sram_size = SRAM_END(=0x20042000) - SRAM_BASE(=0x20000000) = 0x42000 # stack_size = 0x800 (default) # heap_size = 0x5000 (changed) # mem_left = sram_size - (stack_size + heap_size) = 0x3c800 -# If still having problems: see __malloc_current_mallinfo.arena variable in debugger. See also https://stackoverflow.com/a/12825223 for arena definition. -add_compile_definitions(PICO_HEAP_SIZE=0x5000) +# We still have to factor in global variables, so this is not precise. The best place for information seems to be the pico-wath.elf.map file. + +# Small size used for testing, seems to work fine. +add_compile_definitions(PICO_HEAP_SIZE=0x200) # Initialise the Pico SDK pico_sdk_init() |