diff --git a/cmake/nuttx/px4_impl_nuttx.cmake b/cmake/nuttx/px4_impl_nuttx.cmake index 35b6c0b8bf..b9112a4c94 100644 --- a/cmake/nuttx/px4_impl_nuttx.cmake +++ b/cmake/nuttx/px4_impl_nuttx.cmake @@ -213,11 +213,11 @@ function(px4_nuttx_add_export) endif() # copy and export + file(RELATIVE_PATH nuttx_cp_src ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/NuttX) file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*) add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export COMMAND ${MKDIR} -p ${nuttx_src} - COMMAND ${CP} -a ${CMAKE_SOURCE_DIR}/NuttX/. ${nuttx_src}/ - COMMAND ${RM} -rf ${nuttx_src}/.git + COMMAND rsync -a --delete --exclude=.git ${nuttx_cp_src}/ ${CONFIG}/NuttX/ #COMMAND ${ECHO} Configuring NuttX for ${CONFIG} COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/ @@ -227,6 +227,7 @@ function(px4_nuttx_add_export) COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > nuttx_build.log COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export DEPENDS ${config_files} ${DEPENDS} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMENT "Building NuttX for ${CONFIG}") # extract @@ -438,16 +439,6 @@ 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