From 73020f3567b7ef7ed3bdbb6383d7b1cadeeb72d3 Mon Sep 17 00:00:00 2001 From: Andreas Kurz Date: Fri, 9 May 2025 08:15:14 +0000 Subject: [PATCH] fix: add size optimization This flag is also present in the Makefile and optimises the resulting binary for the size of the binary. Without that flag the flash consumption would be too high to fit inside the allocated space. Signed-off-by: Andreas Kurz --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 567a815..d621647 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,6 +170,7 @@ target_compile_options(bootloader PUBLIC -Wmissing-format-attribute -Wno-endif-labels -Wunreachable-code + -Os # Suppress warning caused by SDK -Wno-unused-parameter -Wno-expansion-to-defined -Wno-array-bounds ) @@ -333,4 +334,4 @@ add_custom_target(flash-mbr add_custom_target(flash-erase COMMAND ${NRFJPROG} -f nrf52 --eraseall - ) \ No newline at end of file + )