From 7badf645b30a9b93655dde7788fdcf70bbc1bf47 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 20 May 2016 21:17:54 -0400 Subject: [PATCH] fix missing stack check instrument_flags (#4593) --- cmake/nuttx/px4_impl_nuttx.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/nuttx/px4_impl_nuttx.cmake b/cmake/nuttx/px4_impl_nuttx.cmake index b9112a4c949f..8ceddfe44af5 100644 --- a/cmake/nuttx/px4_impl_nuttx.cmake +++ b/cmake/nuttx/px4_impl_nuttx.cmake @@ -439,6 +439,16 @@ function(px4_os_add_flags) set(added_exe_linker_flags) # none currently + set(instrument_flags) + if ("${config_nuttx_hw_stack_check_${BOARD}}" STREQUAL "y") + set(instrument_flags + -finstrument-functions + -ffixed-r10 + ) + list(APPEND c_flags ${instrument_flags}) + list(APPEND cxx_flags ${instrument_flags}) + endif() + set(cpu_flags) if (${BOARD} STREQUAL "px4fmu-v1") set(cpu_flags