From 3b6b1ee0662d6a657296f585089d6def7b124d3a Mon Sep 17 00:00:00 2001 From: Joshua Whitehead Date: Wed, 23 May 2018 12:20:39 -0700 Subject: [PATCH] Use Nuttx defconfig defines to determine arch (#9516) These hard coded paths assume all Nuttx targets are ARMv7-M targets. Updating them to use ${CONFIG_ARCH} and ${CONFIG_ARCH_FAMILY} instead allows for the architecture defined by the incoming Nuttx defconfig to be correctly targeted. --- platforms/nuttx/cmake/px4_impl_os.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platforms/nuttx/cmake/px4_impl_os.cmake b/platforms/nuttx/cmake/px4_impl_os.cmake index b26ae5f6874..216138d38fd 100644 --- a/platforms/nuttx/cmake/px4_impl_os.cmake +++ b/platforms/nuttx/cmake/px4_impl_os.cmake @@ -182,9 +182,9 @@ function(px4_os_add_flags) ) include_directories( - ${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/armv7-m - ${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/chip - ${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/common + ${PX4_BINARY_DIR}/NuttX/nuttx/arch/${CONFIG_ARCH}/src/${CONFIG_ARCH_FAMILY} + ${PX4_BINARY_DIR}/NuttX/nuttx/arch/${CONFIG_ARCH}/src/chip + ${PX4_BINARY_DIR}/NuttX/nuttx/arch/${CONFIG_ARCH}/src/common ${PX4_BINARY_DIR}/NuttX/apps/include )