aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorFelipe Martínez <felipe@pipe01.net>2024-12-09 01:10:09 +0100
committerGitHub <noreply@github.com>2024-12-09 00:10:09 +0000
commitb8c51abe691a2d0f6770f4bfef3574541f49d744 (patch)
tree0e501734fed33451789943e30aad9be23d8eb3c6 /src/CMakeLists.txt
parent2105a7b63da8d4065ebfc62e0057f225358eedfc (diff)
Use all free RAM for FreeRTOS heap
* Use all free RAM for FreeRTOS heap * Wrap newlib malloc and related functions * Implement calloc
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0a97a015..e2b69b8b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -788,6 +788,10 @@ add_definitions(-DFREERTOS)
add_definitions(-D__STACK_SIZE=1024)
add_definitions(-D__HEAP_SIZE=0)
add_definitions(-DMYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME=1500)
+add_definitions(-DLFS_CONFIG=libs/lfs_config.h)
+
+# _sbrk is purposefully not implemented so that builds fail when it is used
+add_link_options(-Wl,-wrap=malloc -Wl,-wrap=free -Wl,-wrap=calloc -Wl,-wrap=realloc -Wl,-wrap=_malloc_r -Wl,-wrap=_sbrk)
# Note: Only use this for debugging
# Derive the low frequency clock from the main clock (SYNT)