From 9f0043e85f05659e268329f97042a615238182cb Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 30 May 2018 19:58:19 -0700 Subject: [PATCH] Jenkins archive nuttx bin file --- Jenkinsfile | 4 ++-- cmake/configs/nuttx_esc35-v1_default.cmake | 2 +- cmake/configs/nuttx_px4cannode-v1_default.cmake | 2 +- cmake/configs/nuttx_px4esc-v1_default.cmake | 2 +- cmake/configs/nuttx_s2740vc-v1_default.cmake | 2 +- platforms/nuttx/CMakeLists.txt | 9 ++++----- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 046e615ed071..f9bb6a58b2ba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -713,7 +713,7 @@ def createBuildNode(String docker_repo, String target) { sh('make ' + target) sh('ccache -s') sh('make sizes') - archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/**/*.px4, build/**/*.elf', fingerprint: true, onlyIfSuccessful: true) + archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/**/*.px4, build/**/*.elf, build/**/*.bin', fingerprint: true, onlyIfSuccessful: true) sh('make distclean') } } @@ -735,7 +735,7 @@ def createBuildNodeDockerLogin(String docker_repo, String docker_credentials, St sh('make ' + target) sh('ccache -s') sh('make sizes') - archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/**/*.px4, build/**/*.elf', fingerprint: true, onlyIfSuccessful: true) + archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/**/*.px4, build/**/*.elf, build/**/*.bin', fingerprint: true, onlyIfSuccessful: true) sh('make distclean') } } diff --git a/cmake/configs/nuttx_esc35-v1_default.cmake b/cmake/configs/nuttx_esc35-v1_default.cmake index 816feaea562d..316814eab273 100644 --- a/cmake/configs/nuttx_esc35-v1_default.cmake +++ b/cmake/configs/nuttx_esc35-v1_default.cmake @@ -27,7 +27,7 @@ add_definitions( ) px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD} - BIN ${PX4_BINARY_DIR}/platforms/nuttx/esc35-v1.bin + BIN ${PX4_BINARY_DIR}/esc35-v1.bin HWNAME ${uavcanblid_name} HW_MAJOR ${uavcanblid_hw_version_major} HW_MINOR ${uavcanblid_hw_version_minor} diff --git a/cmake/configs/nuttx_px4cannode-v1_default.cmake b/cmake/configs/nuttx_px4cannode-v1_default.cmake index 0460bf4b269c..3db9dfad6ca6 100644 --- a/cmake/configs/nuttx_px4cannode-v1_default.cmake +++ b/cmake/configs/nuttx_px4cannode-v1_default.cmake @@ -25,7 +25,7 @@ add_definitions( ) px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD} - BIN ${PX4_BINARY_DIR}/platforms/nuttx/px4cannode-v1.bin + BIN ${PX4_BINARY_DIR}/px4cannode-v1.bin HWNAME ${uavcanblid_name} HW_MAJOR ${uavcanblid_hw_version_major} HW_MINOR ${uavcanblid_hw_version_minor} diff --git a/cmake/configs/nuttx_px4esc-v1_default.cmake b/cmake/configs/nuttx_px4esc-v1_default.cmake index 2b27b7386fe9..56b187cef1f9 100644 --- a/cmake/configs/nuttx_px4esc-v1_default.cmake +++ b/cmake/configs/nuttx_px4esc-v1_default.cmake @@ -27,7 +27,7 @@ add_definitions( ) px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD} - BIN ${PX4_BINARY_DIR}/platforms/nuttx/px4esc-v1.bin + BIN ${PX4_BINARY_DIR}/px4esc-v1.bin HWNAME ${uavcanblid_name} HW_MAJOR ${uavcanblid_hw_version_major} HW_MINOR ${uavcanblid_hw_version_minor} diff --git a/cmake/configs/nuttx_s2740vc-v1_default.cmake b/cmake/configs/nuttx_s2740vc-v1_default.cmake index f9d629158e02..6413743cf33c 100644 --- a/cmake/configs/nuttx_s2740vc-v1_default.cmake +++ b/cmake/configs/nuttx_s2740vc-v1_default.cmake @@ -21,7 +21,7 @@ include(configs/uavcan_board_ident/s2740vc-v1) # N.B. this would be uncommented when there is an APP #px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD} -# BIN ${PX4_BINARY_DIR}/platforms/nuttx/s2740vc-v1.bin +# BIN ${PX4_BINARY_DIR}/s2740vc-v1.bin # HWNAME ${uavcanblid_name} # HW_MAJOR ${uavcanblid_hw_version_major} # HW_MINOR ${uavcanblid_hw_version_minor} diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index 090ff7ec2fe7..737b569c3bb0 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -52,7 +52,6 @@ list(APPEND nuttx_libs nuttx_apps nuttx_arch nuttx_binfmt - nuttx_binfmt nuttx_c nuttx_configs nuttx_cxx @@ -120,8 +119,8 @@ set(fw_file ${PX4_BINARY_DIR}/${FW_NAME}) string(REPLACE ".elf" ".px4" fw_file ${fw_file}) string(REPLACE "nuttx_" "" fw_file ${fw_file}) -add_custom_command(OUTPUT ${BOARD}.bin - COMMAND ${OBJCOPY} -O binary ${PX4_BINARY_DIR_REL}/${FW_NAME} ${BOARD}.bin +add_custom_command(OUTPUT ${PX4_BINARY_DIR_REL}/${BOARD}.bin + COMMAND ${OBJCOPY} -O binary ${PX4_BINARY_DIR_REL}/${FW_NAME} ${PX4_BINARY_DIR_REL}/${BOARD}.bin DEPENDS ${FW_NAME} ) @@ -136,8 +135,8 @@ 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 ${BOARD}.bin > ${fw_file} - DEPENDS ${BOARD}.bin parameters_xml airframes_xml + --image ${PX4_BINARY_DIR}/${BOARD}.bin > ${fw_file} + DEPENDS ${PX4_BINARY_DIR}/${BOARD}.bin parameters_xml airframes_xml COMMENT "Creating ${fw_file}" )