From b183764dc7b06d7d5e773abfa196e4277604c748 Mon Sep 17 00:00:00 2001
From: Daniel Agar <daniel@agar.ca>
Date: Tue, 12 Jun 2018 15:39:42 -0400
Subject: [PATCH] cmake nuttx fix upload target

---
 platforms/nuttx/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt
index 60cc96bfff..e7bfe9ba5e 100644
--- a/platforms/nuttx/CMakeLists.txt
+++ b/platforms/nuttx/CMakeLists.txt
@@ -119,7 +119,7 @@ endif()
 set(fw_name_short)
 string(REPLACE "nuttx_" "" fw_name_short ${FW_NAME})
 
-set(fw_file ${PX4_BINARY_DIR}/${FW_NAME})
+set(fw_file ${PX4_BINARY_DIR}/${fw_name_short})
 string(REPLACE ".elf" ".px4" fw_file ${fw_file})
 
 add_custom_command(OUTPUT ${PX4_BINARY_DIR_REL}/${BOARD}.bin
@@ -138,7 +138,7 @@ if (TARGET parameters_xml AND TARGET airframes_xml)
 			--git_identity ${PX4_SOURCE_DIR}
 			--parameter_xml ${PX4_BINARY_DIR}/parameters.xml
 			--airframe_xml ${PX4_BINARY_DIR}/airframes.xml
-			--image ${PX4_BINARY_DIR}/${BOARD}.bin > ${fw_name_short}
+			--image ${PX4_BINARY_DIR}/${BOARD}.bin > ${fw_file}
 		DEPENDS ${PX4_BINARY_DIR}/${BOARD}.bin parameters_xml airframes_xml
 		COMMENT "Creating ${fw_file}"
 		)
-- 
GitLab