mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
NuttX upgrade cmake wrapper (#7873)
* NuttX cmake * px4_macros:Pass the stringified predicate as second arg to static assert CC_ASSERT mapes to the c++ static_assert or provides the same funtionality for c via the other macros. The c++ static assert takes 2 argumants the prdicate and a message. This fixes the lacking second argument. * Updated nuttx and apps submodule to upstream nuttx 7.21+==master This is the latest uptake of upstream nuttx and apps. * ROMFS generate with xxd instead of objcopy * delete nuttx-patches * NuttX update submodules to latest px4_nuttx-master * fix nuttx apps and board dependency * docker_run update to latest container 2017-08-29 * cmake ROMFS portable sed usage * NuttX update submodules to latest px4_nuttx-master
This commit is contained in:
+6
-3
@@ -4,9 +4,6 @@
|
|||||||
[submodule "mavlink/include/mavlink/v2.0"]
|
[submodule "mavlink/include/mavlink/v2.0"]
|
||||||
path = mavlink/include/mavlink/v2.0
|
path = mavlink/include/mavlink/v2.0
|
||||||
url = https://github.com/mavlink/c_library_v2.git
|
url = https://github.com/mavlink/c_library_v2.git
|
||||||
[submodule "NuttX"]
|
|
||||||
path = NuttX
|
|
||||||
url = https://github.com/PX4/PX4NuttX.git
|
|
||||||
[submodule "src/modules/uavcan/libuavcan"]
|
[submodule "src/modules/uavcan/libuavcan"]
|
||||||
path = src/modules/uavcan/libuavcan
|
path = src/modules/uavcan/libuavcan
|
||||||
url = https://github.com/UAVCAN/libuavcan.git
|
url = https://github.com/UAVCAN/libuavcan.git
|
||||||
@@ -40,3 +37,9 @@
|
|||||||
[submodule "src/lib/micro-CDR"]
|
[submodule "src/lib/micro-CDR"]
|
||||||
path = src/lib/micro-CDR
|
path = src/lib/micro-CDR
|
||||||
url = https://github.com/eProsima/micro-CDR.git
|
url = https://github.com/eProsima/micro-CDR.git
|
||||||
|
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||||
|
path = platforms/nuttx/NuttX/nuttx
|
||||||
|
url = git@github.com:PX4-NuttX/nuttx.git
|
||||||
|
[submodule "platforms/nuttx/NuttX/apps"]
|
||||||
|
path = platforms/nuttx/NuttX/apps
|
||||||
|
url = git@github.com:PX4-NuttX/apps.git
|
||||||
|
|||||||
+23
-47
@@ -99,14 +99,8 @@
|
|||||||
#
|
#
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
if (${CMAKE_VERSION} VERSION_LESS 3.1.0)
|
# check submodules before we do anything
|
||||||
message("Not a valid CMake version")
|
execute_process(COMMAND Tools/check_submodules.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
message("On Ubuntu >= 16.04, install or upgrade via:")
|
|
||||||
message(" sudo apt-get install cmake")
|
|
||||||
message("")
|
|
||||||
message("Official website: https://cmake.org/download/")
|
|
||||||
message(FATAL_ERROR "Update CMake and try again" )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Warning: Changing this modifies CMake's internal workings
|
# Warning: Changing this modifies CMake's internal workings
|
||||||
# and leads to wrong toolchain detection
|
# and leads to wrong toolchain detection
|
||||||
@@ -115,15 +109,18 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
|||||||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
execute_process(
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
|
||||||
COMMAND Tools/check_submodules.sh
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
|
||||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
|
||||||
)
|
|
||||||
|
define_property(GLOBAL PROPERTY PX4_LIBRARIES
|
||||||
|
BRIEF_DOCS "PX4 libs"
|
||||||
|
FULL_DOCS "List of all PX4 module libraries"
|
||||||
|
)
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# configuration
|
# configuration
|
||||||
#
|
#
|
||||||
# must come before project to set toolchain
|
|
||||||
|
|
||||||
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
|
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
|
||||||
|
|
||||||
@@ -145,7 +142,6 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
|
||||||
message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
|
|
||||||
set(config_module "configs/${CONFIG}")
|
set(config_module "configs/${CONFIG}")
|
||||||
include(${config_module})
|
include(${config_module})
|
||||||
|
|
||||||
@@ -176,16 +172,17 @@ message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
|
|||||||
#
|
#
|
||||||
include(common/px4_git)
|
include(common/px4_git)
|
||||||
|
|
||||||
|
# version info from git
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND git describe --always --tags
|
COMMAND Tools/tag_to_version.py --root ${PX4_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE git_tag
|
OUTPUT_VARIABLE version
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND Tools/tag_to_version.py --root ${PX4_SOURCE_DIR}
|
COMMAND git describe --always --tags
|
||||||
OUTPUT_VARIABLE git_version
|
OUTPUT_VARIABLE git_tag
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -202,12 +199,10 @@ px4_add_git_submodule(TARGET git_jmavsim PATH "Tools/jMAVSim")
|
|||||||
px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
|
px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
|
||||||
px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
|
px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
|
||||||
px4_add_git_submodule(TARGET git_mavlink2 PATH "mavlink/include/mavlink/v2.0")
|
px4_add_git_submodule(TARGET git_mavlink2 PATH "mavlink/include/mavlink/v2.0")
|
||||||
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
|
px4_add_git_submodule(TARGET git_nuttx PATH "platforms/nuttx/NuttX")
|
||||||
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
|
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
|
||||||
px4_add_git_submodule(TARGET git_micro_cdr PATH "src/lib/micro-CDR")
|
px4_add_git_submodule(TARGET git_micro_cdr PATH "src/lib/micro-CDR")
|
||||||
|
|
||||||
px4_create_git_hash_header()
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
message(STATUS "PX4 VERSION: ${git_tag}")
|
message(STATUS "PX4 VERSION: ${git_tag}")
|
||||||
@@ -225,18 +220,12 @@ add_definitions(-DBUILD_URI=${BUILD_URI})
|
|||||||
# Define GNU standard installation directories
|
# Define GNU standard installation directories
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# Add support for external project building
|
|
||||||
include(ExternalProject)
|
|
||||||
|
|
||||||
# Setup install paths
|
# Setup install paths
|
||||||
if (NOT CMAKE_INSTALL_PREFIX)
|
if (${OS} STREQUAL "posix")
|
||||||
if (${OS} STREQUAL "posix")
|
if (NOT CMAKE_INSTALL_PREFIX)
|
||||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
|
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if (CMAKE_INSTALL_PREFIX)
|
|
||||||
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# require px4 module interface
|
# require px4 module interface
|
||||||
@@ -361,12 +350,11 @@ px4_os_add_flags(
|
|||||||
LINK_DIRS link_dirs
|
LINK_DIRS link_dirs
|
||||||
DEFINITIONS definitions)
|
DEFINITIONS definitions)
|
||||||
|
|
||||||
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${exe_linker_flags}" GLUE " ")
|
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${CMAKE_EXE_LINKER_FLAGS};${exe_linker_flags}" GLUE " ")
|
||||||
px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags};${optimization_flags}" GLUE " ")
|
px4_join(OUT CMAKE_C_FLAGS LIST "${CMAKE_C_FLAGS};${c_flags};${optimization_flags}" GLUE " ")
|
||||||
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags};${optimization_flags}" GLUE " ")
|
px4_join(OUT CMAKE_CXX_FLAGS LIST "${CMAKE_CXX_FLAGS};${cxx_flags};${optimization_flags}" GLUE " ")
|
||||||
|
|
||||||
include_directories(${include_dirs})
|
include_directories(${include_dirs})
|
||||||
#message("INCLUDE_DIRS=${include_dirs}")
|
|
||||||
link_directories(${link_dirs})
|
link_directories(${link_dirs})
|
||||||
add_definitions(${definitions})
|
add_definitions(${definitions})
|
||||||
|
|
||||||
@@ -381,10 +369,8 @@ px4_generate_messages(TARGET msg_gen
|
|||||||
MSG_FILES ${msg_files}
|
MSG_FILES ${msg_files}
|
||||||
OS ${OS}
|
OS ${OS}
|
||||||
INCLUDES ${msg_include_paths}
|
INCLUDES ${msg_include_paths}
|
||||||
DEPENDS git_genmsg git_gencpp git_micro_cdr prebuild_targets
|
DEPENDS prebuild_targets
|
||||||
)
|
)
|
||||||
include_directories("${PX4_SOURCE_DIR}/src/lib/micro-CDR/include"
|
|
||||||
"${PX4_BINARY_DIR}/src/lib/micro-CDR/include/microcdr")
|
|
||||||
|
|
||||||
px4_generate_airframes_xml(BOARD ${BOARD})
|
px4_generate_airframes_xml(BOARD ${BOARD})
|
||||||
|
|
||||||
@@ -439,7 +425,6 @@ endif()
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
# subdirectories
|
# subdirectories
|
||||||
#
|
#
|
||||||
set(module_libraries)
|
|
||||||
foreach(module ${config_module_list})
|
foreach(module ${config_module_list})
|
||||||
string(REGEX MATCH "^[./]" external_module ${module})
|
string(REGEX MATCH "^[./]" external_module ${module})
|
||||||
if (external_module)
|
if (external_module)
|
||||||
@@ -449,19 +434,10 @@ foreach(module ${config_module_list})
|
|||||||
else()
|
else()
|
||||||
add_subdirectory(src/${module})
|
add_subdirectory(src/${module})
|
||||||
endif()
|
endif()
|
||||||
px4_mangle_name(${module} mangled_name)
|
|
||||||
list(APPEND module_libraries ${mangled_name})
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Keep track of external shared libs required for modules
|
|
||||||
set(module_external_libraries "${module_external_libraries}" CACHE INTERNAL "module_external_libraries")
|
|
||||||
|
|
||||||
add_subdirectory(src/firmware/${OS})
|
add_subdirectory(src/firmware/${OS})
|
||||||
|
|
||||||
if (config_io_board)
|
|
||||||
add_subdirectory(src/modules/px4iofirmware)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# generate custom target to print for all executable and module cmake targets
|
# generate custom target to print for all executable and module cmake targets
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[[ -z "$elf" ]] && die "Please specify the ELF file location, e.g.: build_px4fmu-v4_default/src/firmware/nuttx/firmware_nuttx"
|
[[ -z "$elf" ]] && die "Please specify the ELF file location, e.g.: build/px4fmu-v4_default/src/firmware/nuttx/firmware_nuttx"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Temporary files
|
# Temporary files
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ endif
|
|||||||
# make px4fmu-v2_default test (builds and tests)
|
# make px4fmu-v2_default test (builds and tests)
|
||||||
#
|
#
|
||||||
# This tells cmake to build the nuttx px4fmu-v2 default config in the
|
# This tells cmake to build the nuttx px4fmu-v2 default config in the
|
||||||
# directory build_nuttx_px4fmu-v2_default and then call make
|
# directory build/nuttx_px4fmu-v2_default and then call make
|
||||||
# in that directory with the target upload.
|
# in that directory with the target upload.
|
||||||
|
|
||||||
# explicity set default build target
|
# explicity set default build target
|
||||||
@@ -132,7 +132,7 @@ endif
|
|||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
# describe how to build a cmake config
|
# describe how to build a cmake config
|
||||||
define cmake-build
|
define cmake-build
|
||||||
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX))
|
+@$(eval BUILD_DIR = $(SRC_DIR)/build/$@$(BUILD_DIR_SUFFIX))
|
||||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
|
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
|
||||||
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(2) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=$(1) $(CMAKE_ARGS) || (rm -rf $(BUILD_DIR)); fi
|
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(2) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=$(1) $(CMAKE_ARGS) || (rm -rf $(BUILD_DIR)); fi
|
||||||
+@(cd $(BUILD_DIR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
+@(cd $(BUILD_DIR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||||
@@ -191,6 +191,7 @@ qgc_firmware: px4fmu_firmware misc_qgc_extra_firmware sizes
|
|||||||
|
|
||||||
# px4fmu NuttX firmware
|
# px4fmu NuttX firmware
|
||||||
px4fmu_firmware: \
|
px4fmu_firmware: \
|
||||||
|
check_px4io-v2_default \
|
||||||
check_px4fmu-v2_default \
|
check_px4fmu-v2_default \
|
||||||
check_px4fmu-v3_default \
|
check_px4fmu-v3_default \
|
||||||
check_px4fmu-v4_default \
|
check_px4fmu-v4_default \
|
||||||
@@ -229,7 +230,7 @@ checks_bootloaders: \
|
|||||||
sizes
|
sizes
|
||||||
|
|
||||||
sizes:
|
sizes:
|
||||||
@-find build_* -name firmware_nuttx -type f | xargs size 2> /dev/null || :
|
@-find build -name *.elf -type f | xargs size 2> /dev/null || :
|
||||||
|
|
||||||
# All default targets that don't require a special build environment
|
# All default targets that don't require a special build environment
|
||||||
check: check_posix_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware checks_bootloaders tests check_format
|
check: check_posix_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware checks_bootloaders tests check_format
|
||||||
@@ -277,25 +278,25 @@ s3put_firmware: Firmware.zip
|
|||||||
s3put_qgc_firmware: s3put_px4fmu_firmware s3put_misc_qgc_extra_firmware
|
s3put_qgc_firmware: s3put_px4fmu_firmware s3put_misc_qgc_extra_firmware
|
||||||
|
|
||||||
s3put_px4fmu_firmware: px4fmu_firmware
|
s3put_px4fmu_firmware: px4fmu_firmware
|
||||||
@find $(SRC_DIR)/build_* -name "*.px4" -exec $(SRC_DIR)/Tools/s3put.sh "{}" \;
|
@find $(SRC_DIR)/build -name "*.px4" -exec $(SRC_DIR)/Tools/s3put.sh "{}" \;
|
||||||
|
|
||||||
s3put_misc_qgc_extra_firmware: misc_qgc_extra_firmware
|
s3put_misc_qgc_extra_firmware: misc_qgc_extra_firmware
|
||||||
@find $(SRC_DIR)/build_* -name "*.px4" -exec $(SRC_DIR)/Tools/s3put.sh "{}" \;
|
@find $(SRC_DIR)/build -name "*.px4" -exec $(SRC_DIR)/Tools/s3put.sh "{}" \;
|
||||||
|
|
||||||
s3put_metadata: px4_metadata
|
s3put_metadata: px4_metadata
|
||||||
@$(SRC_DIR)/Tools/s3put.sh airframes.md
|
@$(SRC_DIR)/Tools/s3put.sh airframes.md
|
||||||
@$(SRC_DIR)/Tools/s3put.sh airframes.xml
|
@$(SRC_DIR)/Tools/s3put.sh airframes.xml
|
||||||
@$(SRC_DIR)/Tools/s3put.sh build_posix_sitl_default/parameters.xml
|
@$(SRC_DIR)/Tools/s3put.sh build/posix_sitl_default/parameters.xml
|
||||||
@$(SRC_DIR)/Tools/s3put.sh parameters.md
|
@$(SRC_DIR)/Tools/s3put.sh parameters.md
|
||||||
|
|
||||||
s3put_scan-build: scan-build
|
s3put_scan-build: scan-build
|
||||||
@cd $(SRC_DIR) && ./Tools/s3put.sh `find build_scan-build -mindepth 1 -maxdepth 1 -type d`/
|
@cd $(SRC_DIR) && ./Tools/s3put.sh `find build/scan-build -mindepth 1 -maxdepth 1 -type d`/
|
||||||
|
|
||||||
s3put_cppcheck: cppcheck
|
s3put_cppcheck: cppcheck
|
||||||
@cd $(SRC_DIR) && ./Tools/s3put.sh cppcheck/
|
@cd $(SRC_DIR) && ./Tools/s3put.sh cppcheck/
|
||||||
|
|
||||||
s3put_coverage: tests_coverage
|
s3put_coverage: tests_coverage
|
||||||
@cd $(SRC_DIR) && ./Tools/s3put.sh build_posix_sitl_default/coverage-html/
|
@cd $(SRC_DIR) && ./Tools/s3put.sh build/posix_sitl_default/coverage-html/
|
||||||
|
|
||||||
# Astyle
|
# Astyle
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
@@ -326,7 +327,7 @@ coveralls_upload:
|
|||||||
--exclude=src/lib/ecl \
|
--exclude=src/lib/ecl \
|
||||||
--exclude=src/lib/Matrix \
|
--exclude=src/lib/Matrix \
|
||||||
--exclude=src/modules/uavcan/libuavcan \
|
--exclude=src/modules/uavcan/libuavcan \
|
||||||
--root . --build-root build_posix_sitl_default/ --follow-symlinks
|
--root . --build-root build/posix_sitl_default/ --follow-symlinks
|
||||||
|
|
||||||
codecov_upload:
|
codecov_upload:
|
||||||
@/bin/bash -c "bash <(curl -s https://codecov.io/bash)"
|
@/bin/bash -c "bash <(curl -s https://codecov.io/bash)"
|
||||||
@@ -336,32 +337,32 @@ codecov_upload:
|
|||||||
.PHONY: posix_sitl_default-clang scan-build clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck check_stack
|
.PHONY: posix_sitl_default-clang scan-build clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck check_stack
|
||||||
|
|
||||||
posix_sitl_default-clang:
|
posix_sitl_default-clang:
|
||||||
@mkdir -p $(SRC_DIR)/build_posix_sitl_default-clang
|
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-clang
|
||||||
@cd $(SRC_DIR)/build_posix_sitl_default-clang && cmake .. -GNinja -DCONFIG=posix_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
@cd $(SRC_DIR)/build/posix_sitl_default-clang && cmake $(SRC_DIR) -GNinja -DCONFIG=posix_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||||
@cd $(SRC_DIR)/build_posix_sitl_default-clang && ninja
|
@cd $(SRC_DIR)/build/posix_sitl_default-clang && ninja
|
||||||
|
|
||||||
scan-build:
|
scan-build:
|
||||||
@export CCC_CC=clang
|
@export CCC_CC=clang
|
||||||
@export CCC_CXX=clang++
|
@export CCC_CXX=clang++
|
||||||
@mkdir -p $(SRC_DIR)/build_posix_sitl_default-scan-build
|
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||||
@cd $(SRC_DIR)/build_posix_sitl_default-scan-build && scan-build cmake .. -GNinja -DCONFIG=posix_sitl_default
|
@cd $(SRC_DIR)/build/posix_sitl_default-scan-build && scan-build cmake .. -GNinja -DCONFIG=posix_sitl_default
|
||||||
@scan-build -o $(SRC_DIR)/build_scan-build cmake --build $(SRC_DIR)/build_posix_sitl_default-scan-build
|
@scan-build -o $(SRC_DIR)/build/scan-build cmake --build $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||||
|
|
||||||
clang-tidy: posix_sitl_default-clang
|
clang-tidy: posix_sitl_default-clang
|
||||||
@cd build_posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -p .
|
@cd build/posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -p .
|
||||||
|
|
||||||
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
|
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
|
||||||
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
|
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
|
||||||
clang-tidy-fix: posix_sitl_default-clang
|
clang-tidy-fix: posix_sitl_default-clang
|
||||||
@cd build_posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -fix -p .
|
@cd build/posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -fix -p .
|
||||||
|
|
||||||
# modified version of run-clang-tidy.py to return error codes and only output relevant results
|
# modified version of run-clang-tidy.py to return error codes and only output relevant results
|
||||||
clang-tidy-quiet: posix_sitl_default-clang
|
clang-tidy-quiet: posix_sitl_default-clang
|
||||||
@cd build_posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
|
@cd build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
|
||||||
|
|
||||||
# TODO: Fix cppcheck errors then try --enable=warning,performance,portability,style,unusedFunction or --enable=all
|
# TODO: Fix cppcheck errors then try --enable=warning,performance,portability,style,unusedFunction or --enable=all
|
||||||
cppcheck: posix_sitl_default
|
cppcheck: posix_sitl_default
|
||||||
@cppcheck -i$(SRC_DIR)/src/examples --std=c++11 --std=c99 --std=posix --project=build_posix_sitl_default/compile_commands.json --xml-version=2 2> cppcheck-result.xml
|
@cppcheck -i$(SRC_DIR)/src/examples --std=c++11 --std=c99 --std=posix --project=build/posix_sitl_default/compile_commands.json --xml-version=2 2> cppcheck-result.xml
|
||||||
@cppcheck-htmlreport --source-encoding=ascii --file=cppcheck-result.xml --report-dir=cppcheck --source-dir=$(SRC_DIR)/src/
|
@cppcheck-htmlreport --source-encoding=ascii --file=cppcheck-result.xml --report-dir=cppcheck --source-dir=$(SRC_DIR)/src/
|
||||||
|
|
||||||
check_stack: px4fmu-v3_default
|
check_stack: px4fmu-v3_default
|
||||||
@@ -384,8 +385,7 @@ check_stack: px4fmu-v3_default
|
|||||||
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf $(SRC_DIR)/build_*/
|
@rm -rf $(SRC_DIR)/build
|
||||||
-@$(MAKE) --no-print-directory -C NuttX/nuttx clean
|
|
||||||
|
|
||||||
submodulesclean:
|
submodulesclean:
|
||||||
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
||||||
|
|||||||
-1
Submodule NuttX deleted from ba18501226
@@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
message(STATUS "ROMFS: ${config_romfs_root}")
|
||||||
|
|
||||||
|
set(romfs_temp_dir ${PX4_BINARY_DIR}/ROMFS/${config_romfs_root})
|
||||||
|
set(romfs_src_dir ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root})
|
||||||
|
|
||||||
|
# directory setup
|
||||||
|
# copy all romfs files, process airframes, prune comments
|
||||||
|
file(GLOB_RECURSE init_airframes ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root}/*/[1-9]*)
|
||||||
|
add_custom_command(OUTPUT ${romfs_temp_dir}/init.d/rcS ${romfs_temp_dir}/init.d/rc.autostart
|
||||||
|
COMMAND cmake -E copy_directory ${romfs_src_dir} ${romfs_temp_dir}
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||||
|
-a ${romfs_temp_dir}/init.d
|
||||||
|
-s ${romfs_temp_dir}/init.d/rc.autostart
|
||||||
|
--board ${BOARD}
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
|
||||||
|
--folder ${romfs_temp_dir} --board ${BOARD}
|
||||||
|
DEPENDS
|
||||||
|
${romfs_src_files}
|
||||||
|
${init_airframes}
|
||||||
|
${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root}/init.d/rcS
|
||||||
|
${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||||
|
)
|
||||||
|
|
||||||
|
set(romfs_dependencies)
|
||||||
|
list(APPEND romfs_dependencies
|
||||||
|
${romfs_temp_dir}/init.d/rcS
|
||||||
|
${romfs_temp_dir}/init.d/rc.autostart
|
||||||
|
)
|
||||||
|
|
||||||
|
# create romfs.bin
|
||||||
|
add_custom_command(OUTPUT romfs.img
|
||||||
|
COMMAND ${GENROMFS} -f romfs.img -d ${romfs_temp_dir} -V "NSHInitVol" -v > romfs.txt 2>&1
|
||||||
|
DEPENDS ${romfs_dependencies}
|
||||||
|
)
|
||||||
|
|
||||||
|
# create romfs.o
|
||||||
|
add_custom_command(OUTPUT nsh_romfsimg.c
|
||||||
|
COMMAND xxd -i romfs.img nsh_romfsimg.c
|
||||||
|
COMMAND sed 's/unsigned/const unsigned/g' nsh_romfsimg.c > nsh_romfsimg.c.tmp && mv nsh_romfsimg.c.tmp nsh_romfsimg.c
|
||||||
|
DEPENDS romfs.img
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(romfs STATIC nsh_romfsimg.c)
|
||||||
|
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
|
||||||
+5
-5
@@ -4,23 +4,23 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
|||||||
echo "guessing PX4_DOCKER_REPO based on input";
|
echo "guessing PX4_DOCKER_REPO based on input";
|
||||||
if [[ $@ =~ .*px4fmu.* ]]; then
|
if [[ $@ =~ .*px4fmu.* ]]; then
|
||||||
# nuttx-px4fmu-v{1,2,3,4,5}
|
# nuttx-px4fmu-v{1,2,3,4,5}
|
||||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-07-27"
|
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-08-29"
|
||||||
elif [[ $@ =~ .*rpi.* ]] || [[ $@ =~ .*bebop.* ]]; then
|
elif [[ $@ =~ .*rpi.* ]] || [[ $@ =~ .*bebop.* ]]; then
|
||||||
# posix_rpi_cross, posix_bebop_default
|
# posix_rpi_cross, posix_bebop_default
|
||||||
PX4_DOCKER_REPO="px4io/px4-dev-raspi:2017-07-27"
|
PX4_DOCKER_REPO="px4io/px4-dev-raspi:2017-08-29"
|
||||||
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
|
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
|
||||||
# eagle, excelsior
|
# eagle, excelsior
|
||||||
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2017-07-28"
|
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2017-07-28"
|
||||||
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
|
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
|
||||||
# clang tools
|
# clang tools
|
||||||
PX4_DOCKER_REPO="px4io/px4-dev-clang:2017-07-27"
|
PX4_DOCKER_REPO="px4io/px4-dev-clang:2017-08-29"
|
||||||
elif [[ $@ =~ .*cppcheck.* ]]; then
|
elif [[ $@ =~ .*cppcheck.* ]]; then
|
||||||
# need Ubuntu 17.04 for cppcheck cmake support
|
# need Ubuntu 17.04 for cppcheck cmake support
|
||||||
# TODO: remove this once px4io/px4-dev-base updates
|
# TODO: remove this once px4io/px4-dev-base updates
|
||||||
PX4_DOCKER_REPO=px4io/px4-dev-base:ubuntu17.04
|
PX4_DOCKER_REPO=px4io/px4-dev-base:ubuntu17.04
|
||||||
elif [[ $@ =~ .*tests* ]]; then
|
elif [[ $@ =~ .*tests* ]]; then
|
||||||
# run all tests with simulation
|
# run all tests with simulation
|
||||||
PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-07-27"
|
PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-08-29"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
|
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
|
||||||
@@ -28,7 +28,7 @@ fi
|
|||||||
|
|
||||||
# otherwise default to nuttx
|
# otherwise default to nuttx
|
||||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-07-27"
|
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-08-29"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# docker hygiene
|
# docker hygiene
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ fi
|
|||||||
|
|
||||||
# Find a reasonable tmp directory.
|
# Find a reasonable tmp directory.
|
||||||
# First make a list of all build directories by looking for a CMakeCache.txt in them. Sort them so the most recent one is first.
|
# First make a list of all build directories by looking for a CMakeCache.txt in them. Sort them so the most recent one is first.
|
||||||
CMAKECACHE_FILES=$(find "$BASEDIR" -mindepth 2 -maxdepth 2 -type f -name CMakeCache.txt -wholename "$BASEDIR/build_*/CMakeCache.txt" | xargs /bin/ls -td)
|
CMAKECACHE_FILES=$(find "$BASEDIR" -mindepth 2 -maxdepth 2 -type f -name CMakeCache.txt -wholename "$BASEDIR/build/*/CMakeCache.txt" | xargs /bin/ls -td)
|
||||||
# Make a list of all candidate tmp directories.
|
# Make a list of all candidate tmp directories.
|
||||||
TMPDIRS=
|
TMPDIRS=
|
||||||
for f in $CMAKECACHE_FILES; do
|
for f in $CMAKECACHE_FILES; do
|
||||||
@@ -195,7 +195,7 @@ for subm in $SUBMODULES; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo -n "Finding all source files with #include's (excluding submodules and build directory)... "
|
echo -n "Finding all source files with #include's (excluding submodules and build directory)... "
|
||||||
find $BASEDIR -mindepth 2 -type f ! \( -wholename $BASEDIR/build_* -o $EXCLUDE_ARGS -o $SUBMODULES_ARGS \) \( $INCLUDE_C_ARGS -o $INCLUDE_H_ARGS \) > $TMPDIR/fix_headers_sources
|
find $BASEDIR -mindepth 2 -type f ! \( -wholename $BASEDIR/build/* -o $EXCLUDE_ARGS -o $SUBMODULES_ARGS \) \( $INCLUDE_C_ARGS -o $INCLUDE_H_ARGS \) > $TMPDIR/fix_headers_sources
|
||||||
cat "$TMPDIR/fix_headers_sources" | xargs grep -l "$INCLUDE_RE" > $TMPDIR/fix_headers_sources_with_includes
|
cat "$TMPDIR/fix_headers_sources" | xargs grep -l "$INCLUDE_RE" > $TMPDIR/fix_headers_sources_with_includes
|
||||||
echo "done"
|
echo "done"
|
||||||
number_of_files=$(sed -n '$=' "$TMPDIR/fix_headers_sources_with_includes")
|
number_of_files=$(sed -n '$=' "$TMPDIR/fix_headers_sources_with_includes")
|
||||||
@@ -206,7 +206,7 @@ find $BASEDIR -type f ! \( $EXCLUDE_ARGS \) \( $SUBMODULES_ARGS \) \( $INCLUDE_H
|
|||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
echo -n "Finding all header files (excluding stdc++ headers)... "
|
echo -n "Finding all header files (excluding stdc++ headers)... "
|
||||||
find $BASEDIR -type f ! \( $EXCLUDE_ARGS \) -wholename $BASEDIR/build_* \( $INCLUDE_H_ARGS \) > $TMPDIR/fix_headers_HEADERS
|
find $BASEDIR -type f ! \( $EXCLUDE_ARGS \) -wholename $BASEDIR/build/* \( $INCLUDE_H_ARGS \) > $TMPDIR/fix_headers_HEADERS
|
||||||
grep -E "$HEADER_RE" $TMPDIR/fix_headers_sources >> $TMPDIR/fix_headers_HEADERS
|
grep -E "$HEADER_RE" $TMPDIR/fix_headers_sources >> $TMPDIR/fix_headers_HEADERS
|
||||||
cat $TMPDIR/fix_headers_SUBMODULE_HEADERS >> $TMPDIR/fix_headers_HEADERS
|
cat $TMPDIR/fix_headers_SUBMODULE_HEADERS >> $TMPDIR/fix_headers_HEADERS
|
||||||
echo "done"
|
echo "done"
|
||||||
@@ -233,7 +233,7 @@ function include_path()
|
|||||||
foo=0
|
foo=0
|
||||||
for includedir in $(grep "/$PATH_RE\$" $TMPDIR/fix_headers_HEADERS | cut -c $striplen-); do
|
for includedir in $(grep "/$PATH_RE\$" $TMPDIR/fix_headers_HEADERS | cut -c $striplen-); do
|
||||||
# If the include directory is NuttX header that was copied to the build directory, then it's still a system file.
|
# If the include directory is NuttX header that was copied to the build directory, then it's still a system file.
|
||||||
if [[ $includedir/ =~ ^build_.*/NuttX/ ]]; then
|
if [[ $includedir/ =~ ^build/.*/NuttX/ ]]; then
|
||||||
issubmodule=1
|
issubmodule=1
|
||||||
# If the include directory is a submodule, then treat it as a system file.
|
# If the include directory is a submodule, then treat it as a system file.
|
||||||
elif [[ $includedir/ =~ ^$SUBMODULES_RE/ ]]; then
|
elif [[ $includedir/ =~ ^$SUBMODULES_RE/ ]]; then
|
||||||
|
|||||||
@@ -168,6 +168,6 @@ fi
|
|||||||
sed -i -r -e 's%("(magic|description|summary)": ")([^"]*)(",).*%\1FIXME (was: \3)\4%' "Images/${newname}.prototype"
|
sed -i -r -e 's%("(magic|description|summary)": ")([^"]*)(",).*%\1FIXME (was: \3)\4%' "Images/${newname}.prototype"
|
||||||
|
|
||||||
echo "*** The following files contain a reference to $oldconfig (this might take a while):"
|
echo "*** The following files contain a reference to $oldconfig (this might take a while):"
|
||||||
find . -path './build_*' -o -path './.git' -o -name 'defconfig' -prune -o -type f -exec grep -l -- "$oldconfig" {} \;
|
find . -path './build/*' -o -path './.git' -o -name 'defconfig' -prune -o -type f -exec grep -l -- "$oldconfig" {} \;
|
||||||
echo "*** Run 'git diff' to check the changes that this script already made relative to the copied prototype files."
|
echo "*** Run 'git diff' to check the changes that this script already made relative to the copied prototype files."
|
||||||
echo "*** Use 'git status' to see other (added) files, that likely need fixing."
|
echo "*** Use 'git status' to see other (added) files, that likely need fixing."
|
||||||
|
|||||||
@@ -156,24 +156,24 @@ installpx4() {
|
|||||||
if [ $mode == 0 ]; then
|
if [ $mode == 0 ]; then
|
||||||
# copy default binaries
|
# copy default binaries
|
||||||
echo -e "Copying the PX4 binaries from the eagle_default build tree..."
|
echo -e "Copying the PX4 binaries from the eagle_default build tree..."
|
||||||
adb push $workspace/build_qurt_eagle_default/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
adb push $workspace/build/qurt_eagle_default/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_qurt_eagle_default/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
adb push $workspace/build/qurt_eagle_default/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_posix_eagle_default/src/firmware/posix/px4 /home/linaro
|
adb push $workspace/build/posix_eagle_default/src/firmware/posix/px4 /home/linaro
|
||||||
adb push $workspace/posix-configs/eagle/flight/px4.config /usr/share/data/adsp
|
adb push $workspace/posix-configs/eagle/flight/px4.config /usr/share/data/adsp
|
||||||
adb push $workspace/posix-configs/eagle/flight/mainapp.config /home/linaro
|
adb push $workspace/posix-configs/eagle/flight/mainapp.config /home/linaro
|
||||||
elif [ $mode == 1 ]; then
|
elif [ $mode == 1 ]; then
|
||||||
# copy legacy binaries
|
# copy legacy binaries
|
||||||
echo -e "Copying the PX4 binaries from the eagle_legacy build tree..."
|
echo -e "Copying the PX4 binaries from the eagle_legacy build tree..."
|
||||||
adb push $workspace/build_qurt_eagle_legacy/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
adb push $workspace/build/qurt_eagle_legacy/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_qurt_eagle_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
adb push $workspace/build/qurt_eagle_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_posix_eagle_legacy/src/firmware/posix/px4 /home/linaro
|
adb push $workspace/build/posix_eagle_legacy/src/firmware/posix/px4 /home/linaro
|
||||||
adb push $workspace/posix-configs/eagle/200qx/px4.config /usr/share/data/adsp
|
adb push $workspace/posix-configs/eagle/200qx/px4.config /usr/share/data/adsp
|
||||||
adb push $workspace/posix-configs/eagle/200qx/mainapp.config /home/linaro
|
adb push $workspace/posix-configs/eagle/200qx/mainapp.config /home/linaro
|
||||||
else
|
else
|
||||||
echo -e "Copying the PX4 binaries from the excelsior_legacy build tree..."
|
echo -e "Copying the PX4 binaries from the excelsior_legacy build tree..."
|
||||||
adb push $workspace/build_qurt_excelsior_legacy/src/firmware/qurt/libpx4.so /usr/lib/rfsa/adsp
|
adb push $workspace/build/qurt_excelsior_legacy/src/firmware/qurt/libpx4.so /usr/lib/rfsa/adsp
|
||||||
adb push $workspace/build_qurt_excelsior_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/lib/rfsa/adsp
|
adb push $workspace/build/qurt_excelsior_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/lib/rfsa/adsp
|
||||||
adb push $workspace/build_posix_excelsior_legacy/src/firmware/posix/px4 /home/root
|
adb push $workspace/build/posix_excelsior_legacy/src/firmware/posix/px4 /home/root
|
||||||
adb push $workspace/posix-configs/excelsior/px4.config /usr/lib/rfsa/adsp
|
adb push $workspace/posix-configs/excelsior/px4.config /usr/lib/rfsa/adsp
|
||||||
adb push $workspace/posix-configs/excelsior/mainapp.config /home/root
|
adb push $workspace/posix-configs/excelsior/mainapp.config /home/root
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
make px4fmu-v4_default
|
make px4fmu-v4_default
|
||||||
cp build_px4fmu-v4_default/parameters.xml ../qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
|
cp build/px4fmu-v4_default/parameters.xml ../qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
|
||||||
cp build_px4fmu-v4_default/airframes.xml ../qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
|
cp build/px4fmu-v4_default/airframes.xml ../qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
src_path="$SCRIPT_DIR/.."
|
src_path="$SCRIPT_DIR/.."
|
||||||
|
|
||||||
rc_script="posix-configs/SITL/init/ekf2/multiple_iris"
|
rc_script="posix-configs/SITL/init/ekf2/multiple_iris"
|
||||||
build_path=${src_path}/build_posix_sitl_default
|
build_path=${src_path}/build/posix_sitl_default
|
||||||
|
|
||||||
echo "killing running instances"
|
echo "killing running instances"
|
||||||
pkill -x px4 || true
|
pkill -x px4 || true
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ echo src_path: $src_path
|
|||||||
echo build_path: $build_path
|
echo build_path: $build_path
|
||||||
|
|
||||||
working_dir=`pwd`
|
working_dir=`pwd`
|
||||||
sitl_bin=$build_path/src/firmware/posix/px4
|
|
||||||
rootfs=$build_path/tmp/rootfs
|
rootfs=$build_path/tmp/rootfs
|
||||||
|
|
||||||
if [ "$chroot" == "1" ]
|
if [ "$chroot" == "1" ]
|
||||||
|
|||||||
@@ -198,10 +198,6 @@ function(px4_add_module)
|
|||||||
REQUIRED MODULE
|
REQUIRED MODULE
|
||||||
ARGN ${ARGN})
|
ARGN ${ARGN})
|
||||||
|
|
||||||
if (EXTERNAL)
|
|
||||||
px4_mangle_name("${EXTERNAL_MODULES_LOCATION}/src/${MODULE}" MODULE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
px4_add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
|
px4_add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
|
||||||
|
|
||||||
# set defaults if not set
|
# set defaults if not set
|
||||||
@@ -219,16 +215,14 @@ function(px4_add_module)
|
|||||||
if(NOT ${property})
|
if(NOT ${property})
|
||||||
set(${property} ${${property}_DEFAULT})
|
set(${property} ${${property}_DEFAULT})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(${MODULE} PROPERTIES ${property}
|
set_target_properties(${MODULE} PROPERTIES ${property} ${${property}})
|
||||||
${${property}})
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# default stack max to stack main
|
# default stack max to stack main
|
||||||
if(NOT STACK_MAX)
|
if(NOT STACK_MAX)
|
||||||
set(STACK_MAX ${STACK_MAIN})
|
set(STACK_MAX ${STACK_MAIN})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(${MODULE} PROPERTIES STACK_MAX
|
set_target_properties(${MODULE} PROPERTIES STACK_MAX ${STACK_MAX})
|
||||||
${STACK_MAX})
|
|
||||||
|
|
||||||
if(${OS} STREQUAL "qurt" )
|
if(${OS} STREQUAL "qurt" )
|
||||||
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||||
@@ -270,7 +264,6 @@ function(px4_add_module)
|
|||||||
set_target_properties(${MODULE} PROPERTIES ${prop} ${${prop}})
|
set_target_properties(${MODULE} PROPERTIES ${prop} ${${prop}})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -479,14 +472,6 @@ function(px4_add_common_flags)
|
|||||||
-D__STDC_FORMAT_MACROS
|
-D__STDC_FORMAT_MACROS
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT (APPLE AND (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")))
|
|
||||||
set(added_exe_linker_flags
|
|
||||||
-Wl,--warn-common
|
|
||||||
-Wl,--gc-sections
|
|
||||||
#,--print-gc-sections
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# output
|
# output
|
||||||
foreach(var ${inout_vars})
|
foreach(var ${inout_vars})
|
||||||
string(TOLOWER ${var} lower_var)
|
string(TOLOWER ${var} lower_var)
|
||||||
@@ -496,31 +481,6 @@ function(px4_add_common_flags)
|
|||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
#
|
|
||||||
# px4_mangle_name
|
|
||||||
#
|
|
||||||
# Convert a path name to a module name
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# px4_mangle_name(dirname newname)
|
|
||||||
#
|
|
||||||
# Input:
|
|
||||||
# dirname : path to module dir
|
|
||||||
#
|
|
||||||
# Output:
|
|
||||||
# newname : module name
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# px4_mangle_name(${dirpath} mangled_name)
|
|
||||||
# message(STATUS "module name is ${mangled_name}")
|
|
||||||
#
|
|
||||||
function(px4_mangle_name dirname newname)
|
|
||||||
set(tmp)
|
|
||||||
string(REPLACE "/" "__" tmp ${dirname})
|
|
||||||
set(${newname} ${tmp} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
#
|
#
|
||||||
# px4_strip_optimization
|
# px4_strip_optimization
|
||||||
@@ -588,6 +548,8 @@ function(px4_add_library target)
|
|||||||
px4_add_optimization_flags_for_target(${target})
|
px4_add_optimization_flags_for_target(${target})
|
||||||
# Pass variable to the parent px4_add_module.
|
# Pass variable to the parent px4_add_module.
|
||||||
set(_no_optimization_for_target ${_no_optimization_for_target} PARENT_SCOPE)
|
set(_no_optimization_for_target ${_no_optimization_for_target} PARENT_SCOPE)
|
||||||
|
|
||||||
|
set_property(GLOBAL APPEND PROPERTY PX4_LIBRARIES ${target})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|||||||
@@ -68,71 +68,15 @@ function(px4_add_git_submodule)
|
|||||||
ONE_VALUE TARGET PATH
|
ONE_VALUE TARGET PATH
|
||||||
REQUIRED TARGET PATH
|
REQUIRED TARGET PATH
|
||||||
ARGN ${ARGN})
|
ARGN ${ARGN})
|
||||||
|
|
||||||
string(REPLACE "/" "_" NAME ${PATH})
|
string(REPLACE "/" "_" NAME ${PATH})
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
||||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
COMMAND Tools/check_submodules.sh ${PATH}
|
||||||
COMMAND touch ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
COMMAND cmake -E touch ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
||||||
DEPENDS ${PX4_SOURCE_DIR}/.gitmodules
|
DEPENDS ${PX4_SOURCE_DIR}/.gitmodules
|
||||||
)
|
|
||||||
add_custom_target(${TARGET}
|
|
||||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||||
# todo:Not have 2 list of submodules one (see the end of Tools/check_submodules.sh and Firmware/CMakeLists.txt)
|
|
||||||
# using the list of submodules from the CMake file to drive the test
|
|
||||||
# COMMAND Tools/check_submodules.sh ${PATH}
|
|
||||||
DEPENDS ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
|
|
||||||
)
|
)
|
||||||
endfunction()
|
|
||||||
|
add_custom_target(${TARGET} DEPENDS ${PX4_BINARY_DIR}/git_init_${NAME}.stamp)
|
||||||
#=============================================================================
|
|
||||||
#
|
|
||||||
# px4_create_git_hash_header
|
|
||||||
#
|
|
||||||
# Create a header file containing the git hash of the current tree
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# px4_create_git_hash_header()
|
|
||||||
#
|
|
||||||
# Example:
|
|
||||||
# px4_create_git_hash_header()
|
|
||||||
#
|
|
||||||
function(px4_create_git_hash_header)
|
|
||||||
px4_parse_function_args(
|
|
||||||
NAME px4_create_git_hash_header
|
|
||||||
ARGN ${ARGN})
|
|
||||||
|
|
||||||
set(px4_git_ver_header ${PX4_BINARY_DIR}/build_git_version.h)
|
|
||||||
|
|
||||||
# check if px4 source is a git repo
|
|
||||||
if(EXISTS ${PX4_SOURCE_DIR}/.git)
|
|
||||||
if (IS_DIRECTORY ${PX4_SOURCE_DIR}/.git)
|
|
||||||
# standard git repo
|
|
||||||
set(git_dir_path ${PX4_SOURCE_DIR}/.git)
|
|
||||||
else()
|
|
||||||
# git submodule
|
|
||||||
file(READ ${PX4_SOURCE_DIR}/.git git_dir_path)
|
|
||||||
string(STRIP ${git_dir_path} git_dir_path)
|
|
||||||
string(REPLACE "gitdir: " "" git_dir_path ${git_dir_path})
|
|
||||||
get_filename_component(git_dir_path ${git_dir_path} ABSOLUTE)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "is not a git repository")
|
|
||||||
endif()
|
|
||||||
if(NOT IS_DIRECTORY "${git_dir_path}")
|
|
||||||
message(FATAL_ERROR "${git_dir_path} is not a directory")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(deps
|
|
||||||
${PX4_SOURCE_DIR}/Tools/px_update_git_header.py
|
|
||||||
${git_dir_path}/index
|
|
||||||
${git_dir_path}/HEAD)
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT ${px4_git_ver_header}
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_update_git_header.py ${px4_git_ver_header} > ${PX4_BINARY_DIR}/git_header.log
|
|
||||||
DEPENDS ${deps}
|
|
||||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
|
||||||
COMMENT "Generating git hash header"
|
|
||||||
)
|
|
||||||
set_source_files_properties(${px4_git_ver_header} PROPERTIES GENERATED TRUE)
|
|
||||||
add_custom_target(ver_gen ALL DEPENDS ${px4_git_ver_header})
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ function(px4_generate_messages)
|
|||||||
REQUIRED MSG_FILES OS TARGET
|
REQUIRED MSG_FILES OS TARGET
|
||||||
ARGN ${ARGN})
|
ARGN ${ARGN})
|
||||||
|
|
||||||
if("${config_nuttx_config}" STREQUAL "bootloader")
|
if("${nuttx_config_type}" STREQUAL "bootloader")
|
||||||
# do nothing for bootloaders
|
# do nothing for bootloaders
|
||||||
else()
|
else()
|
||||||
|
|
||||||
@@ -162,6 +162,12 @@ function(px4_generate_messages)
|
|||||||
${msg_multi_files_out}
|
${msg_multi_files_out}
|
||||||
${msg_files_out}
|
${msg_files_out}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_include_directories(${TARGET}
|
||||||
|
PRIVATE ${PX4_SOURCE_DIR}/src/lib/micro-CDR/include
|
||||||
|
PRIVATE ${PX4_BINARY_DIR}/src/lib/micro-CDR/include/microcdr
|
||||||
|
)
|
||||||
|
target_link_libraries(${TARGET} PRIVATE lib__micro-CDR)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
set(config_uavcan_num_ifaces 2)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -16,7 +14,7 @@ set(config_module_list
|
|||||||
drivers/stm32/tone_alarm
|
drivers/stm32/tone_alarm
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/boards/aerocore2
|
drivers/boards
|
||||||
drivers/lsm303d
|
drivers/lsm303d
|
||||||
drivers/l3gd20
|
drivers/l3gd20
|
||||||
drivers/ms5611
|
drivers/ms5611
|
||||||
@@ -63,6 +61,7 @@ set(config_module_list
|
|||||||
#modules/commander/commander_tests
|
#modules/commander/commander_tests
|
||||||
#lib/controllib/controllib_test
|
#lib/controllib/controllib_test
|
||||||
#modules/mavlink/mavlink_tests
|
#modules/mavlink/mavlink_tests
|
||||||
|
#modules/unit_test
|
||||||
#modules/uORB/uORB_tests
|
#modules/uORB/uORB_tests
|
||||||
#systemcmds/tests
|
#systemcmds/tests
|
||||||
|
|
||||||
@@ -169,20 +168,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon" STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis" STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
set(config_uavcan_num_ifaces 2)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -14,7 +12,7 @@ set(config_module_list
|
|||||||
drivers/stm32
|
drivers/stm32
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/boards/aerofc-v1
|
drivers/boards
|
||||||
drivers/tap_esc
|
drivers/tap_esc
|
||||||
drivers/mpu9250
|
drivers/mpu9250
|
||||||
drivers/ms5611
|
drivers/ms5611
|
||||||
@@ -95,9 +93,3 @@ set(config_module_list
|
|||||||
platforms/common
|
platforms/common
|
||||||
platforms/nuttx/px4_layer
|
platforms/nuttx/px4_layer
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_board
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 1)
|
set(config_uavcan_num_ifaces 1)
|
||||||
|
|
||||||
@@ -17,7 +15,7 @@ set(config_module_list
|
|||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/px4io
|
drivers/px4io
|
||||||
drivers/boards/auav-x21
|
drivers/boards
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
drivers/mpu6000
|
drivers/mpu6000
|
||||||
drivers/mpu9250
|
drivers/mpu9250
|
||||||
@@ -190,26 +188,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_board
|
|
||||||
px4io-v2
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
#
|
#
|
||||||
# Board support modules
|
# Board support modules
|
||||||
@@ -12,7 +10,7 @@ set(config_module_list
|
|||||||
drivers/stm32
|
drivers/stm32
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/boards/crazyflie
|
drivers/boards
|
||||||
drivers/mpu9250
|
drivers/mpu9250
|
||||||
drivers/lps25h
|
drivers/lps25h
|
||||||
drivers/gps
|
drivers/gps
|
||||||
@@ -45,7 +43,6 @@ set(config_module_list
|
|||||||
modules/mavlink
|
modules/mavlink
|
||||||
#modules/gpio_led
|
#modules/gpio_led
|
||||||
modules/land_detector
|
modules/land_detector
|
||||||
|
|
||||||
modules/syslink
|
modules/syslink
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -138,22 +135,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -1,30 +1,2 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_uavcan_bootloader)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
||||||
|
|
||||||
set(px4_src_base ${CMAKE_SOURCE_DIR}/src/)
|
|
||||||
set(px4_bootloader_base ${px4_src_base}drivers/bootloaders/)
|
|
||||||
set(px4_module_base ${px4_src_base}modules/)
|
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/esc35-v1)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
|
||||||
|
|
||||||
drivers/boards/esc35-v1/bootloader
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bootloaders use a compact vector table not
|
|
||||||
# from the lib, but exported in startup
|
|
||||||
#
|
|
||||||
set(nuttx_startup_files stm32_vectors.o)
|
|
||||||
|
|||||||
@@ -1,97 +1,80 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DFLASH_BASED_PARAMS
|
-DFLASH_BASED_PARAMS
|
||||||
-DPARAM_NO_ORB
|
-DPARAM_NO_ORB
|
||||||
-DPARAM_NO_AUTOSAVE
|
-DPARAM_NO_AUTOSAVE
|
||||||
-DPARAMETER_BUFFER_SIZE=1024
|
-DPARAMETER_BUFFER_SIZE=1024
|
||||||
)
|
)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh)
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
# UAVCAN boot loadable Module ID
|
||||||
|
|
||||||
set(uavcanblid_sw_version_major 0)
|
set(uavcanblid_sw_version_major 0)
|
||||||
set(uavcanblid_sw_version_minor 1)
|
set(uavcanblid_sw_version_minor 1)
|
||||||
|
add_definitions(
|
||||||
|
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
|
||||||
|
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
# Bring in common uavcan hardware identity definitions
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/esc35-v1)
|
include(configs/uavcan_board_ident/esc35-v1)
|
||||||
|
add_definitions(
|
||||||
|
-DHW_UAVCAN_NAME=${uavcanblid_name}
|
||||||
|
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major}
|
||||||
|
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
||||||
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/firmware_nuttx.bin
|
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/esc35-v1.bin
|
||||||
HWNAME ${uavcanblid_name}
|
HWNAME ${uavcanblid_name}
|
||||||
HW_MAJOR ${uavcanblid_hw_version_major}
|
HW_MAJOR ${uavcanblid_hw_version_major}
|
||||||
HW_MINOR ${uavcanblid_hw_version_minor}
|
HW_MINOR ${uavcanblid_hw_version_minor}
|
||||||
SW_MAJOR ${uavcanblid_sw_version_major}
|
SW_MAJOR ${uavcanblid_sw_version_major}
|
||||||
SW_MINOR ${uavcanblid_sw_version_minor})
|
SW_MINOR ${uavcanblid_sw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
include_directories(${PX4_SOURCE_DIR}/src/drivers/boards/esc35-v1/bootloader)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
|
|
||||||
#
|
#
|
||||||
# Board support modules
|
# Board support modules
|
||||||
#
|
#
|
||||||
|
drivers/boards
|
||||||
drivers/stm32
|
drivers/bootloaders
|
||||||
|
drivers/device
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/boards/esc35-v1
|
drivers/stm32
|
||||||
|
|
||||||
#
|
#
|
||||||
# System commands
|
# System commands
|
||||||
#
|
#
|
||||||
|
systemcmds/config
|
||||||
systemcmds/reboot
|
systemcmds/reboot
|
||||||
systemcmds/top
|
systemcmds/top
|
||||||
systemcmds/config
|
systemcmds/param
|
||||||
systemcmds/ver
|
systemcmds/ver
|
||||||
systemcmds/param
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# General system control
|
# General system control
|
||||||
#
|
#
|
||||||
modules/uavcanesc
|
modules/uavcanesc
|
||||||
modules/uavcanesc/nshterm
|
modules/uavcanesc/nshterm
|
||||||
modules/uavcanesc/commands/cfg
|
modules/uavcanesc/commands/cfg
|
||||||
modules/uavcanesc/commands/selftest
|
modules/uavcanesc/commands/selftest
|
||||||
modules/uavcanesc/commands/dc
|
modules/uavcanesc/commands/dc
|
||||||
modules/uavcanesc/commands/rpm
|
modules/uavcanesc/commands/rpm
|
||||||
modules/uavcanesc/commands/stat
|
modules/uavcanesc/commands/stat
|
||||||
|
|
||||||
#
|
#
|
||||||
# Library modules
|
# Library modules
|
||||||
#
|
#
|
||||||
modules/systemlib/param
|
|
||||||
modules/systemlib
|
|
||||||
modules/uORB
|
|
||||||
lib/version
|
|
||||||
|
|
||||||
#
|
|
||||||
# Libraries
|
|
||||||
#
|
|
||||||
# had to add for cmake, not sure why wasn't in original config
|
|
||||||
platforms/nuttx
|
|
||||||
platforms/common
|
|
||||||
platforms/nuttx/px4_layer
|
|
||||||
lib/micro-CDR
|
lib/micro-CDR
|
||||||
|
lib/version
|
||||||
|
modules/systemlib
|
||||||
|
modules/systemlib/param
|
||||||
|
modules/uORB
|
||||||
|
platforms/common
|
||||||
|
platforms/nuttx
|
||||||
|
platforms/nuttx/px4_layer
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon" STACK_MAIN "2048")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis" STACK_MAIN "2048")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 1)
|
set(config_uavcan_num_ifaces 1)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -16,8 +14,9 @@ set(config_module_list
|
|||||||
drivers/stm32/tone_alarm
|
drivers/stm32/tone_alarm
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/boards/mindpx-v2
|
drivers/boards
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
|
#drivers/rgbled_pwm
|
||||||
drivers/mpu6000
|
drivers/mpu6000
|
||||||
drivers/mpu9250
|
drivers/mpu9250
|
||||||
drivers/lsm303d
|
drivers/lsm303d
|
||||||
@@ -208,20 +207,3 @@ set(config_rtps_send_topics
|
|||||||
set(config_rtps_receive_topics
|
set(config_rtps_receive_topics
|
||||||
sensor_baro
|
sensor_baro
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 1)
|
set(config_uavcan_num_ifaces 1)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -15,7 +13,7 @@ set(config_module_list
|
|||||||
#NOT Supported drivers/bma180
|
#NOT Supported drivers/bma180
|
||||||
#NOT Supported drivers/bmi160
|
#NOT Supported drivers/bmi160
|
||||||
drivers/bmp280
|
drivers/bmp280
|
||||||
drivers/boards/nxphlite-v3
|
drivers/boards
|
||||||
drivers/bst
|
drivers/bst
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/device
|
drivers/device
|
||||||
@@ -212,30 +210,3 @@ set(config_module_list
|
|||||||
# EKF
|
# EKF
|
||||||
examples/ekf_att_pos_estimator
|
examples/ekf_att_pos_estimator
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_extra_libs
|
|
||||||
##NO CAN YET uavcan
|
|
||||||
##NO CAN YET uavcan_stm32_driver
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_extra_libs
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
##set(config_uavcan_num_ifaces 2)
|
##set(config_uavcan_num_ifaces 2)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -16,8 +14,7 @@ set(config_module_list
|
|||||||
drivers/samv7/tone_alarm
|
drivers/samv7/tone_alarm
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
#WIP drivers/px4io
|
drivers/boards
|
||||||
drivers/boards/px4-same70xplained-v1
|
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
drivers/mpu6000
|
drivers/mpu6000
|
||||||
drivers/mpu9250
|
drivers/mpu9250
|
||||||
@@ -173,30 +170,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_extra_libs
|
|
||||||
# uavcan
|
|
||||||
# uavcan_stm32_driver
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_extra_libs
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
#
|
#
|
||||||
# Board support modules
|
# Board support modules
|
||||||
@@ -11,7 +9,7 @@ set(config_module_list
|
|||||||
drivers/device
|
drivers/device
|
||||||
drivers/stm32
|
drivers/stm32
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/boards/px4-stm32f4discovery
|
drivers/boards
|
||||||
|
|
||||||
#
|
#
|
||||||
# System commands
|
# System commands
|
||||||
@@ -77,20 +75,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|||||||
@@ -1,30 +1,2 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_uavcan_bootloader)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m3 CONFIG bootloader)
|
px4_nuttx_configure(HWCLASS m3 CONFIG bootloader)
|
||||||
|
|
||||||
set(px4_src_base ${CMAKE_SOURCE_DIR}/src/)
|
|
||||||
set(px4_bootloader_base ${px4_src_base}drivers/bootloaders/)
|
|
||||||
set(px4_module_base ${px4_src_base}modules/)
|
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/px4cannode-v1)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
|
||||||
|
|
||||||
drivers/boards/px4cannode-v1/bootloader
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bootloaders use a compact vector table not
|
|
||||||
# from the lib, but exported in startup
|
|
||||||
#
|
|
||||||
set(nuttx_startup_files stm32_vectors.o)
|
|
||||||
|
|||||||
@@ -7,44 +7,49 @@ add_definitions(
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m3 CONFIG nsh)
|
px4_nuttx_configure(HWCLASS m3 CONFIG nsh)
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
# UAVCAN boot loadable Module ID
|
||||||
|
|
||||||
set(uavcanblid_sw_version_major 0)
|
set(uavcanblid_sw_version_major 0)
|
||||||
set(uavcanblid_sw_version_minor 1)
|
set(uavcanblid_sw_version_minor 1)
|
||||||
|
add_definitions(
|
||||||
|
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
|
||||||
|
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
# Bring in common uavcan hardware identity definitions
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/px4cannode-v1)
|
include(configs/uavcan_board_ident/px4cannode-v1)
|
||||||
|
add_definitions(
|
||||||
|
-DHW_UAVCAN_NAME=${uavcanblid_name}
|
||||||
|
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major}
|
||||||
|
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
||||||
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/firmware_nuttx.bin
|
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/px4cannode-v1.bin
|
||||||
HWNAME ${uavcanblid_name}
|
HWNAME ${uavcanblid_name}
|
||||||
HW_MAJOR ${uavcanblid_hw_version_major}
|
HW_MAJOR ${uavcanblid_hw_version_major}
|
||||||
HW_MINOR ${uavcanblid_hw_version_minor}
|
HW_MINOR ${uavcanblid_hw_version_minor}
|
||||||
SW_MAJOR ${uavcanblid_sw_version_major}
|
SW_MAJOR ${uavcanblid_sw_version_major}
|
||||||
SW_MINOR ${uavcanblid_sw_version_minor})
|
SW_MINOR ${uavcanblid_sw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
include_directories(${PX4_SOURCE_DIR}/src/drivers/boards/px4cannode-v1/bootloader)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
|
|
||||||
#
|
#
|
||||||
# Board support modules
|
# Board support modules
|
||||||
#
|
#
|
||||||
|
drivers/boards
|
||||||
drivers/stm32
|
drivers/bootloaders
|
||||||
|
drivers/device
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/boards/px4cannode-v1
|
drivers/stm32
|
||||||
|
|
||||||
#
|
#
|
||||||
# System commands
|
# System commands
|
||||||
#
|
#
|
||||||
|
systemcmds/config
|
||||||
systemcmds/reboot
|
systemcmds/reboot
|
||||||
systemcmds/top
|
systemcmds/top
|
||||||
systemcmds/config
|
|
||||||
systemcmds/ver
|
systemcmds/ver
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -55,19 +60,12 @@ set(config_module_list
|
|||||||
#
|
#
|
||||||
# Library modules
|
# Library modules
|
||||||
#
|
#
|
||||||
modules/systemlib/param
|
|
||||||
modules/systemlib
|
|
||||||
modules/uORB
|
|
||||||
lib/version
|
|
||||||
|
|
||||||
#
|
|
||||||
# Libraries
|
|
||||||
#
|
|
||||||
# had to add for cmake, not sure why wasn't in original config
|
|
||||||
platforms/nuttx
|
|
||||||
platforms/common
|
|
||||||
platforms/nuttx/px4_layer
|
|
||||||
lib/micro-CDR
|
lib/micro-CDR
|
||||||
|
lib/version
|
||||||
|
modules/systemlib
|
||||||
|
modules/systemlib/param
|
||||||
|
modules/uORB
|
||||||
|
platforms/common
|
||||||
|
platforms/nuttx
|
||||||
|
platforms/nuttx/px4_layer
|
||||||
)
|
)
|
||||||
@@ -1,30 +1,2 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_uavcan_bootloader)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
||||||
|
|
||||||
set(px4_src_base ${CMAKE_SOURCE_DIR}/src/)
|
|
||||||
set(px4_bootloader_base ${px4_src_base}drivers/bootloaders/)
|
|
||||||
set(px4_module_base ${px4_src_base}modules/)
|
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/px4esc-v1)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
|
||||||
|
|
||||||
drivers/boards/px4esc-v1/bootloader
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bootloaders use a compact vector table not
|
|
||||||
# from the lib, but exported in startup
|
|
||||||
#
|
|
||||||
set(nuttx_startup_files stm32_vectors.o)
|
|
||||||
|
|||||||
@@ -1,96 +1,80 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DFLASH_BASED_PARAMS
|
-DFLASH_BASED_PARAMS
|
||||||
-DPARAM_NO_ORB
|
-DPARAM_NO_ORB
|
||||||
-DPARAM_NO_AUTOSAVE
|
-DPARAM_NO_AUTOSAVE
|
||||||
-DPARAMETER_BUFFER_SIZE=1024
|
-DPARAMETER_BUFFER_SIZE=1024
|
||||||
)
|
)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh)
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
# UAVCAN boot loadable Module ID
|
||||||
|
|
||||||
set(uavcanblid_sw_version_major 0)
|
set(uavcanblid_sw_version_major 0)
|
||||||
set(uavcanblid_sw_version_minor 1)
|
set(uavcanblid_sw_version_minor 1)
|
||||||
|
add_definitions(
|
||||||
|
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
|
||||||
|
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
# Bring in common uavcan hardware identity definitions
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/px4esc-v1)
|
include(configs/uavcan_board_ident/px4esc-v1)
|
||||||
|
add_definitions(
|
||||||
|
-DHW_UAVCAN_NAME=${uavcanblid_name}
|
||||||
|
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major}
|
||||||
|
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
||||||
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/firmware_nuttx.bin
|
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/px4esc-v1.bin
|
||||||
HWNAME ${uavcanblid_name}
|
HWNAME ${uavcanblid_name}
|
||||||
HW_MAJOR ${uavcanblid_hw_version_major}
|
HW_MAJOR ${uavcanblid_hw_version_major}
|
||||||
HW_MINOR ${uavcanblid_hw_version_minor}
|
HW_MINOR ${uavcanblid_hw_version_minor}
|
||||||
SW_MAJOR ${uavcanblid_sw_version_major}
|
SW_MAJOR ${uavcanblid_sw_version_major}
|
||||||
SW_MINOR ${uavcanblid_sw_version_minor})
|
SW_MINOR ${uavcanblid_sw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
include_directories(${PX4_SOURCE_DIR}/src/drivers/boards/px4esc-v1/bootloader)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
|
|
||||||
#
|
#
|
||||||
# Board support modules
|
# Board support modules
|
||||||
#
|
#
|
||||||
|
drivers/boards
|
||||||
drivers/stm32
|
drivers/bootloaders
|
||||||
|
drivers/device
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/boards/px4esc-v1
|
drivers/stm32
|
||||||
|
|
||||||
#
|
#
|
||||||
# System commands
|
# System commands
|
||||||
#
|
#
|
||||||
|
systemcmds/config
|
||||||
systemcmds/reboot
|
systemcmds/reboot
|
||||||
systemcmds/top
|
systemcmds/top
|
||||||
systemcmds/config
|
systemcmds/param
|
||||||
systemcmds/ver
|
systemcmds/ver
|
||||||
systemcmds/param
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# General system control
|
# General system control
|
||||||
#
|
#
|
||||||
modules/uavcanesc
|
modules/uavcanesc
|
||||||
modules/uavcanesc/nshterm
|
modules/uavcanesc/nshterm
|
||||||
modules/uavcanesc/commands/cfg
|
modules/uavcanesc/commands/cfg
|
||||||
modules/uavcanesc/commands/selftest
|
modules/uavcanesc/commands/selftest
|
||||||
modules/uavcanesc/commands/dc
|
modules/uavcanesc/commands/dc
|
||||||
modules/uavcanesc/commands/rpm
|
modules/uavcanesc/commands/rpm
|
||||||
modules/uavcanesc/commands/stat
|
modules/uavcanesc/commands/stat
|
||||||
|
|
||||||
#
|
#
|
||||||
# Library modules
|
# Library modules
|
||||||
#
|
#
|
||||||
modules/systemlib/param
|
|
||||||
modules/systemlib
|
|
||||||
lib/version
|
|
||||||
|
|
||||||
#
|
|
||||||
# Libraries
|
|
||||||
#
|
|
||||||
# had to add for cmake, not sure why wasn't in original config
|
|
||||||
platforms/nuttx
|
|
||||||
platforms/common
|
|
||||||
platforms/nuttx/px4_layer
|
|
||||||
modules/uORB
|
|
||||||
lib/micro-CDR
|
lib/micro-CDR
|
||||||
|
lib/version
|
||||||
|
modules/systemlib
|
||||||
|
modules/systemlib/param
|
||||||
|
modules/uORB
|
||||||
|
platforms/common
|
||||||
|
platforms/nuttx
|
||||||
|
platforms/nuttx/px4_layer
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon" STACK_MAIN "2048")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis" STACK_MAIN "2048")
|
|
||||||
|
|||||||
@@ -1,30 +1,2 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_uavcan_bootloader)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
||||||
|
|
||||||
set(px4_src_base ${CMAKE_SOURCE_DIR}/src/)
|
|
||||||
set(px4_bootloader_base ${px4_src_base}drivers/bootloaders/)
|
|
||||||
set(px4_module_base ${px4_src_base}modules/)
|
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/px4flow-v2)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
|
||||||
|
|
||||||
drivers/boards/px4flow-v2/bootloader
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bootloaders use a compact vector table not
|
|
||||||
# from the lib, but exported in startup
|
|
||||||
#
|
|
||||||
set(nuttx_startup_files stm32_vectors.o)
|
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
#
|
#
|
||||||
@@ -17,7 +12,7 @@ set(config_module_list
|
|||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/px4io
|
drivers/px4io
|
||||||
drivers/boards/px4fmu-v2
|
drivers/boards
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
drivers/mpu6000
|
drivers/mpu6000
|
||||||
drivers/mpu9250
|
drivers/mpu9250
|
||||||
@@ -193,26 +188,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_board
|
|
||||||
px4io-v2
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_test)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_test)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
#
|
#
|
||||||
# Board support modules
|
# Board support modules
|
||||||
@@ -17,7 +13,7 @@ set(config_module_list
|
|||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/px4io
|
drivers/px4io
|
||||||
drivers/boards/px4fmu-v2
|
drivers/boards
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
drivers/mpu6000
|
drivers/mpu6000
|
||||||
#TO FIT drivers/mpu9250
|
#TO FIT drivers/mpu9250
|
||||||
@@ -188,24 +184,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_board
|
|
||||||
px4io-v2
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon" STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis" STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
set(config_uavcan_num_ifaces 2)
|
||||||
|
|
||||||
@@ -14,7 +11,7 @@ set(config_module_list
|
|||||||
drivers/blinkm
|
drivers/blinkm
|
||||||
drivers/bmi160
|
drivers/bmi160
|
||||||
drivers/bmp280
|
drivers/bmp280
|
||||||
drivers/boards/px4fmu-v2
|
drivers/boards
|
||||||
drivers/bst
|
drivers/bst
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/device
|
drivers/device
|
||||||
@@ -220,26 +217,3 @@ set(config_rtps_send_topics
|
|||||||
set(config_rtps_receive_topics
|
set(config_rtps_receive_topics
|
||||||
sensor_baro
|
sensor_baro
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_board
|
|
||||||
px4io-v2
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 1)
|
set(config_uavcan_num_ifaces 1)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -17,7 +15,7 @@ set(config_module_list
|
|||||||
drivers/bmi160
|
drivers/bmi160
|
||||||
drivers/bmm150
|
drivers/bmm150
|
||||||
drivers/bmp280
|
drivers/bmp280
|
||||||
drivers/boards/px4fmu-v4
|
drivers/boards
|
||||||
drivers/bst
|
drivers/bst
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/device
|
drivers/device
|
||||||
@@ -63,56 +61,57 @@ set(config_module_list
|
|||||||
# System commands
|
# System commands
|
||||||
#
|
#
|
||||||
systemcmds/bl_update
|
systemcmds/bl_update
|
||||||
|
systemcmds/config
|
||||||
|
systemcmds/dumpfile
|
||||||
|
systemcmds/esc_calib
|
||||||
|
systemcmds/hardfault_log
|
||||||
systemcmds/led_control
|
systemcmds/led_control
|
||||||
systemcmds/mixer
|
systemcmds/mixer
|
||||||
|
systemcmds/motor_ramp
|
||||||
|
systemcmds/mtd
|
||||||
|
systemcmds/nshterm
|
||||||
systemcmds/param
|
systemcmds/param
|
||||||
systemcmds/perf
|
systemcmds/perf
|
||||||
systemcmds/pwm
|
systemcmds/pwm
|
||||||
systemcmds/esc_calib
|
|
||||||
systemcmds/hardfault_log
|
|
||||||
systemcmds/reboot
|
systemcmds/reboot
|
||||||
systemcmds/topic_listener
|
|
||||||
systemcmds/top
|
|
||||||
systemcmds/config
|
|
||||||
systemcmds/nshterm
|
|
||||||
systemcmds/mtd
|
|
||||||
systemcmds/dumpfile
|
|
||||||
systemcmds/ver
|
|
||||||
systemcmds/sd_bench
|
systemcmds/sd_bench
|
||||||
systemcmds/motor_ramp
|
systemcmds/top
|
||||||
|
systemcmds/topic_listener
|
||||||
|
systemcmds/ver
|
||||||
|
|
||||||
#
|
#
|
||||||
# Testing
|
# Testing
|
||||||
#
|
#
|
||||||
drivers/sf0x/sf0x_tests
|
drivers/sf0x/sf0x_tests
|
||||||
drivers/test_ppm
|
drivers/test_ppm
|
||||||
|
#lib/rc/rc_tests
|
||||||
modules/commander/commander_tests
|
modules/commander/commander_tests
|
||||||
modules/mc_pos_control/mc_pos_control_tests
|
|
||||||
lib/controllib/controllib_test
|
lib/controllib/controllib_test
|
||||||
modules/mavlink/mavlink_tests
|
modules/mavlink/mavlink_tests
|
||||||
|
modules/mc_pos_control/mc_pos_control_tests
|
||||||
modules/uORB/uORB_tests
|
modules/uORB/uORB_tests
|
||||||
systemcmds/tests
|
systemcmds/tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# General system control
|
# General system control
|
||||||
#
|
#
|
||||||
|
modules/camera_feedback
|
||||||
modules/commander
|
modules/commander
|
||||||
modules/events
|
modules/events
|
||||||
modules/load_mon
|
|
||||||
modules/navigator
|
|
||||||
modules/mavlink
|
|
||||||
modules/gpio_led
|
modules/gpio_led
|
||||||
modules/uavcan
|
|
||||||
modules/land_detector
|
modules/land_detector
|
||||||
modules/camera_feedback
|
modules/load_mon
|
||||||
|
modules/mavlink
|
||||||
|
modules/navigator
|
||||||
|
modules/uavcan
|
||||||
|
|
||||||
#
|
#
|
||||||
# Estimation modules (EKF/ SO3 / other filters)
|
# Estimation modules
|
||||||
#
|
#
|
||||||
modules/attitude_estimator_q
|
modules/attitude_estimator_q
|
||||||
modules/position_estimator_inav
|
|
||||||
modules/ekf2
|
modules/ekf2
|
||||||
modules/local_position_estimator
|
modules/local_position_estimator
|
||||||
|
modules/position_estimator_inav
|
||||||
|
|
||||||
#
|
#
|
||||||
# Vehicle Control
|
# Vehicle Control
|
||||||
@@ -128,8 +127,8 @@ set(config_module_list
|
|||||||
#
|
#
|
||||||
# Logging
|
# Logging
|
||||||
#
|
#
|
||||||
modules/sdlog2
|
|
||||||
modules/logger
|
modules/logger
|
||||||
|
modules/sdlog2
|
||||||
|
|
||||||
#
|
#
|
||||||
# Library modules
|
# Library modules
|
||||||
@@ -162,11 +161,13 @@ set(config_module_list
|
|||||||
lib/tailsitter_recovery
|
lib/tailsitter_recovery
|
||||||
lib/version
|
lib/version
|
||||||
lib/DriverFramework/framework
|
lib/DriverFramework/framework
|
||||||
platforms/nuttx
|
|
||||||
lib/micro-CDR
|
lib/micro-CDR
|
||||||
|
|
||||||
# had to add for cmake, not sure why wasn't in original config
|
#
|
||||||
|
# Platform
|
||||||
|
#
|
||||||
platforms/common
|
platforms/common
|
||||||
|
platforms/nuttx
|
||||||
platforms/nuttx/px4_layer
|
platforms/nuttx/px4_layer
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -179,28 +180,33 @@ set(config_module_list
|
|||||||
#
|
#
|
||||||
examples/rover_steering_control
|
examples/rover_steering_control
|
||||||
|
|
||||||
|
#
|
||||||
|
# Segway
|
||||||
|
#
|
||||||
|
examples/segway
|
||||||
|
|
||||||
#
|
#
|
||||||
# Demo apps
|
# Demo apps
|
||||||
#
|
#
|
||||||
#examples/math_demo
|
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/px4_simple_app
|
# https://px4.io/dev/px4_simple_app
|
||||||
examples/px4_simple_app
|
examples/px4_simple_app
|
||||||
|
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/daemon
|
# https://px4.io/dev/daemon
|
||||||
#examples/px4_daemon_app
|
examples/px4_daemon_app
|
||||||
|
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/debug_values
|
# https://px4.io/dev/debug_values
|
||||||
#examples/px4_mavlink_debug
|
examples/px4_mavlink_debug
|
||||||
|
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/example_fixedwing_control
|
# https://px4.io/dev/example_fixedwing_control
|
||||||
examples/fixedwing_control
|
examples/fixedwing_control
|
||||||
|
|
||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
examples/hwtest
|
||||||
|
|
||||||
# EKF
|
# EKF
|
||||||
examples/ekf_att_pos_estimator
|
examples/ekf_att_pos_estimator
|
||||||
@@ -213,22 +219,3 @@ set(config_rtps_send_topics
|
|||||||
set(config_rtps_receive_topics
|
set(config_rtps_receive_topics
|
||||||
sensor_baro
|
sensor_baro
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
set(config_uavcan_num_ifaces 2)
|
||||||
|
|
||||||
@@ -15,7 +13,7 @@ set(config_module_list
|
|||||||
drivers/bma180
|
drivers/bma180
|
||||||
drivers/bmi160
|
drivers/bmi160
|
||||||
drivers/bmp280
|
drivers/bmp280
|
||||||
drivers/boards/px4fmu-v4pro
|
drivers/boards
|
||||||
drivers/bst
|
drivers/bst
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/device
|
drivers/device
|
||||||
@@ -220,26 +218,3 @@ set(config_rtps_send_topics
|
|||||||
set(config_rtps_receive_topics
|
set(config_rtps_receive_topics
|
||||||
sensor_baro
|
sensor_baro
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_board
|
|
||||||
px4io-v2
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
set(config_uavcan_num_ifaces 2)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -16,7 +14,7 @@ set(config_module_list
|
|||||||
drivers/bmi055
|
drivers/bmi055
|
||||||
drivers/bmi160
|
drivers/bmi160
|
||||||
drivers/bmp280
|
drivers/bmp280
|
||||||
drivers/boards/px4fmu-v5
|
drivers/boards
|
||||||
drivers/bst
|
drivers/bst
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/device
|
drivers/device
|
||||||
@@ -221,22 +219,3 @@ set(config_rtps_send_topics
|
|||||||
set(config_rtps_receive_topics
|
set(config_rtps_receive_topics
|
||||||
sensor_baro
|
sensor_baro
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048"
|
|
||||||
COMPILE_FLAGS "-Os")
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
|
||||||
|
px4_nuttx_configure(HWCLASS m3 CONFIG nsh)
|
||||||
|
|
||||||
|
set(config_module_list
|
||||||
|
drivers/boards
|
||||||
|
drivers/stm32
|
||||||
|
lib/rc
|
||||||
|
modules/px4iofirmware
|
||||||
|
modules/systemlib/mixer
|
||||||
|
platforms/common
|
||||||
|
)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
include(nuttx/px4_impl_nuttx)
|
||||||
|
|
||||||
|
px4_nuttx_configure(HWCLASS m3 CONFIG nsh)
|
||||||
|
|
||||||
|
set(config_module_list
|
||||||
|
drivers/boards/px4io-v2
|
||||||
|
drivers/stm32
|
||||||
|
lib/rc
|
||||||
|
modules/px4iofirmware
|
||||||
|
modules/systemlib/mixer
|
||||||
|
platforms/common
|
||||||
|
|
||||||
|
lib/micro-CDR
|
||||||
|
)
|
||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_uavcan_num_ifaces 2)
|
set(config_uavcan_num_ifaces 2)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -15,7 +13,7 @@ set(config_module_list
|
|||||||
drivers/bma180
|
drivers/bma180
|
||||||
drivers/bmi160
|
drivers/bmi160
|
||||||
drivers/bmp280
|
drivers/bmp280
|
||||||
drivers/boards/px4nucleoF767ZI-v1
|
drivers/boards
|
||||||
drivers/bst
|
drivers/bst
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/device
|
drivers/device
|
||||||
@@ -178,20 +176,3 @@ set(config_module_list
|
|||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|||||||
@@ -1,30 +1,2 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_uavcan_bootloader)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
px4_nuttx_configure(HWCLASS m4 CONFIG bootloader)
|
||||||
|
|
||||||
set(px4_src_base ${CMAKE_SOURCE_DIR}/src/)
|
|
||||||
set(px4_bootloader_base ${px4_src_base}drivers/bootloaders/)
|
|
||||||
set(px4_module_base ${px4_src_base}modules/)
|
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/s2740vc-v1)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
|
||||||
|
|
||||||
drivers/boards/s2740vc-v1/bootloader
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bootloaders use a compact vector table not
|
|
||||||
# from the lib, but exported in startup
|
|
||||||
#
|
|
||||||
set(nuttx_startup_files stm32_vectors.o)
|
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ px4_nuttx_configure(HWCLASS m4 CONFIG nsh)
|
|||||||
|
|
||||||
set(uavcanblid_sw_version_major 0)
|
set(uavcanblid_sw_version_major 0)
|
||||||
set(uavcanblid_sw_version_minor 1)
|
set(uavcanblid_sw_version_minor 1)
|
||||||
|
add_definitions(
|
||||||
|
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
|
||||||
|
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
|
||||||
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bring in common uavcan hardware identity definitions
|
# Bring in common uavcan hardware identity definitions
|
||||||
@@ -21,15 +25,13 @@ include(configs/uavcan_board_ident/s2740vc-v1)
|
|||||||
|
|
||||||
# N.B. this would be uncommented when there is an APP
|
# N.B. this would be uncommented when there is an APP
|
||||||
#px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
#px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
|
||||||
# BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/firmware_nuttx.bin
|
# BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/s2740vc-v1.bin
|
||||||
# HWNAME ${uavcanblid_name}
|
# HWNAME ${uavcanblid_name}
|
||||||
# HW_MAJOR ${uavcanblid_hw_version_major}
|
# HW_MAJOR ${uavcanblid_hw_version_major}
|
||||||
# HW_MINOR ${uavcanblid_hw_version_minor}
|
# HW_MINOR ${uavcanblid_hw_version_minor}
|
||||||
# SW_MAJOR ${uavcanblid_sw_version_major}
|
# SW_MAJOR ${uavcanblid_sw_version_major}
|
||||||
# SW_MINOR ${uavcanblid_sw_version_minor})
|
# SW_MINOR ${uavcanblid_sw_version_minor})
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -38,7 +40,7 @@ set(config_module_list
|
|||||||
|
|
||||||
drivers/stm32
|
drivers/stm32
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/boards/s2740vc-v1
|
drivers/boards
|
||||||
|
|
||||||
#
|
#
|
||||||
# System commands
|
# System commands
|
||||||
@@ -67,6 +69,4 @@ set(config_module_list
|
|||||||
platforms/nuttx
|
platforms/nuttx
|
||||||
platforms/common
|
platforms/common
|
||||||
platforms/nuttx/px4_layer
|
platforms/nuttx/px4_layer
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ include(nuttx/px4_impl_nuttx)
|
|||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT tap_common)
|
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT tap_common)
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(target_definitions MEMORY_CONSTRAINED_SYSTEM)
|
set(target_definitions MEMORY_CONSTRAINED_SYSTEM)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
@@ -16,7 +14,7 @@ set(config_module_list
|
|||||||
drivers/stm32/tone_alarm
|
drivers/stm32/tone_alarm
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/px4fmu
|
drivers/px4fmu
|
||||||
drivers/boards/tap-v1
|
drivers/boards
|
||||||
drivers/rgbled_pwm
|
drivers/rgbled_pwm
|
||||||
drivers/tap_esc
|
drivers/tap_esc
|
||||||
drivers/mpu6000
|
drivers/mpu6000
|
||||||
@@ -112,23 +110,3 @@ set(config_module_list
|
|||||||
platforms/common
|
platforms/common
|
||||||
platforms/nuttx/px4_layer
|
platforms/nuttx/px4_layer
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_io_board
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_target(sercon)
|
|
||||||
set_target_properties(sercon PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "sercon"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|
||||||
add_custom_target(serdis)
|
|
||||||
set_target_properties(serdis PROPERTIES
|
|
||||||
PRIORITY "SCHED_PRIORITY_DEFAULT"
|
|
||||||
MAIN "serdis"
|
|
||||||
STACK_MAIN "2048")
|
|
||||||
|
|||||||
@@ -1,30 +1,2 @@
|
|||||||
include(nuttx/px4_impl_nuttx)
|
include(nuttx/px4_uavcan_bootloader)
|
||||||
|
|
||||||
px4_nuttx_configure(HWCLASS m3 CONFIG bootloader)
|
px4_nuttx_configure(HWCLASS m3 CONFIG bootloader)
|
||||||
|
|
||||||
set(px4_src_base ${CMAKE_SOURCE_DIR}/src/)
|
|
||||||
set(px4_bootloader_base ${px4_src_base}drivers/bootloaders/)
|
|
||||||
set(px4_module_base ${px4_src_base}modules/)
|
|
||||||
|
|
||||||
#
|
|
||||||
# UAVCAN boot loadable Module ID
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bring in common uavcan hardware identity definitions
|
|
||||||
#
|
|
||||||
|
|
||||||
include(configs/uavcan_board_ident/zubaxgnss-v1)
|
|
||||||
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
|
|
||||||
|
|
||||||
set(config_module_list
|
|
||||||
|
|
||||||
drivers/boards/zubaxgnss-v1/bootloader
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bootloaders use a compact vector table not
|
|
||||||
# from the lib, but exported in startup
|
|
||||||
#
|
|
||||||
set(nuttx_startup_files stm32_vectors.o)
|
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ add_definitions(
|
|||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
|
|
||||||
# examples/px4_simple_app
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Board support modules
|
# Board support modules
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ endif()
|
|||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
drivers/device
|
drivers/device
|
||||||
drivers/boards/sitl
|
drivers/boards
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/linux_sbus
|
drivers/linux_sbus
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ set(config_module_list
|
|||||||
drivers/pwm_out_sim
|
drivers/pwm_out_sim
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/boards/sitl
|
drivers/boards
|
||||||
drivers/qshell/posix
|
drivers/qshell/posix
|
||||||
|
|
||||||
systemcmds/param
|
systemcmds/param
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ set(config_module_list
|
|||||||
drivers/pwm_out_sim
|
drivers/pwm_out_sim
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/boards/sitl
|
drivers/boards
|
||||||
drivers/qshell/posix
|
drivers/qshell/posix
|
||||||
|
|
||||||
systemcmds/param
|
systemcmds/param
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ include(posix/px4_impl_posix)
|
|||||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
|
||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
drivers/boards/sitl
|
drivers/boards
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/device
|
drivers/device
|
||||||
drivers/gps
|
drivers/gps
|
||||||
@@ -194,11 +194,6 @@ set(config_module_list
|
|||||||
lib/micro-CDR
|
lib/micro-CDR
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_builtin_cmds
|
|
||||||
serdis
|
|
||||||
sercon
|
|
||||||
)
|
|
||||||
|
|
||||||
set(config_rtps_send_topics
|
set(config_rtps_send_topics
|
||||||
sensor_baro
|
sensor_baro
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ include_directories(${HEXAGON_SDK_INCLUDES})
|
|||||||
|
|
||||||
set(config_module_list
|
set(config_module_list
|
||||||
drivers/device
|
drivers/device
|
||||||
drivers/boards/sitl
|
drivers/boards
|
||||||
drivers/pwm_out_sim
|
drivers/pwm_out_sim
|
||||||
drivers/led
|
drivers/led
|
||||||
drivers/rgbled
|
drivers/rgbled
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user