From 3aa66da20f131f8be4e9144d44282cdb157b1e86 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 4 Sep 2016 21:44:30 +0200 Subject: [PATCH] Build serdis / sercon with size optimization --- cmake/configs/nuttx_px4fmu-v2_default.cmake | 6 ++++-- cmake/configs/nuttx_px4fmu-v4_default.cmake | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/configs/nuttx_px4fmu-v2_default.cmake b/cmake/configs/nuttx_px4fmu-v2_default.cmake index a5cee0ba13..5f495cdf7d 100644 --- a/cmake/configs/nuttx_px4fmu-v2_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v2_default.cmake @@ -201,9 +201,11 @@ set(config_io_extra_libs add_custom_target(sercon) set_target_properties(sercon PROPERTIES PRIORITY "SCHED_PRIORITY_DEFAULT" - MAIN "sercon" STACK_MAIN "2048") + MAIN "sercon" STACK_MAIN "2048" + COMPILE_FLAGS "-Os") add_custom_target(serdis) set_target_properties(serdis PROPERTIES PRIORITY "SCHED_PRIORITY_DEFAULT" - MAIN "serdis" STACK_MAIN "2048") + MAIN "serdis" STACK_MAIN "2048" + COMPILE_FLAGS "-Os") diff --git a/cmake/configs/nuttx_px4fmu-v4_default.cmake b/cmake/configs/nuttx_px4fmu-v4_default.cmake index 452929a7ce..6dd6833119 100644 --- a/cmake/configs/nuttx_px4fmu-v4_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v4_default.cmake @@ -204,10 +204,12 @@ add_custom_target(sercon) set_target_properties(sercon PROPERTIES PRIORITY "SCHED_PRIORITY_DEFAULT" MAIN "sercon" - STACK_MAIN "2048") + STACK_MAIN "2048" + COMPILE_FLAGS "-Os") add_custom_target(serdis) set_target_properties(serdis PROPERTIES PRIORITY "SCHED_PRIORITY_DEFAULT" MAIN "serdis" - STACK_MAIN "2048") + STACK_MAIN "2048" + COMPILE_FLAGS "-Os")