mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
More config cleanup.
This commit is contained in:
@@ -132,7 +132,7 @@ set(px4_required_config
|
|||||||
config_module_list
|
config_module_list
|
||||||
)
|
)
|
||||||
foreach(conf ${px4_required_config})
|
foreach(conf ${px4_required_config})
|
||||||
if(NOT DEFINED ${conf})
|
if(NOT DEFINED conf)
|
||||||
message(FATAL_ERROR "cmake/${config_module} must define ${conf}")
|
message(FATAL_ERROR "cmake/${config_module} must define ${conf}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
@@ -159,16 +159,16 @@ list(GET config_args 2 LABEL)
|
|||||||
|
|
||||||
message(STATUS "TARGET: OS(${OS})-BOARD(${BOARD})-LABEL(${LABEL})")
|
message(STATUS "TARGET: OS(${OS})-BOARD(${BOARD})-LABEL(${LABEL})")
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
# cmake modules
|
|
||||||
#
|
|
||||||
enable_testing()
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# programs
|
# programs
|
||||||
#
|
#
|
||||||
find_package(PythonInterp REQUIRED)
|
find_package(PythonInterp REQUIRED)
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# cmake modules
|
||||||
|
#
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# check required toolchain variables
|
# check required toolchain variables
|
||||||
#
|
#
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -91,4 +91,8 @@ all: px4fmu-v2_default
|
|||||||
clean:
|
clean:
|
||||||
rm -rf build_*/
|
rm -rf build_*/
|
||||||
|
|
||||||
.PHONY: clean
|
# targets handled by cmake
|
||||||
|
test: ;
|
||||||
|
upload: ;
|
||||||
|
|
||||||
|
.PHONY: clean test upload
|
||||||
|
|||||||
@@ -86,10 +86,10 @@ function(px4_nuttx_add_firmware)
|
|||||||
#TODO handle param_xml
|
#TODO handle param_xml
|
||||||
if(PARAM_XML)
|
if(PARAM_XML)
|
||||||
add_custom_command(OUTPUT ${OUT}
|
add_custom_command(OUTPUT ${OUT}
|
||||||
COMMAND ${process_params}
|
COMMAND ${PYTHON_EXECUTABLE} ${process_params}
|
||||||
--src-path ${CMAKE_SOURCE_DIR}/src
|
--src-path ${CMAKE_SOURCE_DIR}/src
|
||||||
--board CONFIG_ARCH_BOARD_${BOARD} --xml
|
--board CONFIG_ARCH_BOARD_${BOARD} --xml
|
||||||
COMMAND ${process_airframes}
|
COMMAND ${PYTHON_EXECUTABLE} ${process_airframes}
|
||||||
-a ${CMAKE_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
-a ${CMAKE_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
||||||
--board CONFIG_ARCH_BOARD_${BOARD} --xml
|
--board CONFIG_ARCH_BOARD_${BOARD} --xml
|
||||||
COMMAND ${OBJCOPY} -O binary ${EXE} ${EXE}.bin
|
COMMAND ${OBJCOPY} -O binary ${EXE} ${EXE}.bin
|
||||||
@@ -97,10 +97,9 @@ function(px4_nuttx_add_firmware)
|
|||||||
--prototype ${CMAKE_SOURCE_DIR}/Images/${BOARD}.prototype
|
--prototype ${CMAKE_SOURCE_DIR}/Images/${BOARD}.prototype
|
||||||
--git_identity ${CMAKE_SOURCE_DIR}
|
--git_identity ${CMAKE_SOURCE_DIR}
|
||||||
--parameter_xml parameters.xml
|
--parameter_xml parameters.xml
|
||||||
--airframe_xml airframe.xml
|
--airframe_xml airframes.xml
|
||||||
--image ${EXE}.bin > ${OUT}
|
--image ${EXE}.bin > ${OUT}
|
||||||
DEPENDS ${EXE}
|
DEPENDS ${EXE}
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
add_custom_command(OUTPUT ${OUT}
|
add_custom_command(OUTPUT ${OUT}
|
||||||
@@ -110,7 +109,6 @@ function(px4_nuttx_add_firmware)
|
|||||||
--git_identity ${CMAKE_SOURCE_DIR}
|
--git_identity ${CMAKE_SOURCE_DIR}
|
||||||
--image ${EXE}.bin > ${OUT}
|
--image ${EXE}.bin > ${OUT}
|
||||||
DEPENDS ${EXE}
|
DEPENDS ${EXE}
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
Reference in New Issue
Block a user