From 8541f4b0cff25c3e6857e88b130bb2c1c329b446 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 3 Apr 2019 16:27:13 -0400 Subject: [PATCH] cmake nuttx use defconfig matching config label if available - otherwise use default nsh --- platforms/nuttx/cmake/px4_impl_os.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platforms/nuttx/cmake/px4_impl_os.cmake b/platforms/nuttx/cmake/px4_impl_os.cmake index 85464bdcfb..11955e09cc 100644 --- a/platforms/nuttx/cmake/px4_impl_os.cmake +++ b/platforms/nuttx/cmake/px4_impl_os.cmake @@ -115,8 +115,8 @@ function(px4_os_prebuild_targets) REQUIRED OUT ARGN ${ARGN}) - if(PX4_BOARD_LABEL MATCHES "stackcheck") - set(NUTTX_CONFIG "stackcheck" CACHE INTERNAL "NuttX config" FORCE) + if(EXISTS ${PX4_BOARD_DIR}/nuttx-config/${PX4_BOARD_LABEL}) + set(NUTTX_CONFIG "${PX4_BOARD_LABEL}" CACHE INTERNAL "NuttX config" FORCE) else() set(NUTTX_CONFIG "nsh" CACHE INTERNAL "NuttX config" FORCE) endif()