diff --git a/CMakeLists.txt b/CMakeLists.txt index fc5dec731e..10e5117942 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,7 @@ # # * Avoid use of global variables in functions. Functions in a nested # scope may use global variables, but this makes it difficult to -# resuse functions. +# reuse functions. # # Included CMake Files # --------------------------------------------------------------------------- @@ -99,18 +99,12 @@ # #============================================================================= -# Warning: Changing this modifies CMake's internal workings -# and leads to wrong toolchain detection cmake_minimum_required(VERSION 3.2 FATAL_ERROR) set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR}) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR}) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR}) - -list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake) +list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake") #============================================================================= # git @@ -124,14 +118,16 @@ execute_process( WORKING_DIRECTORY ${PX4_SOURCE_DIR} ) -px4_add_git_submodule(TARGET git_ecl PATH "src/lib/ecl") -px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix") - -define_property(GLOBAL PROPERTY PX4_LIBRARIES - BRIEF_DOCS "PX4 libs" +define_property(GLOBAL PROPERTY PX4_MODULE_LIBRARIES + BRIEF_DOCS "PX4 module libs" FULL_DOCS "List of all PX4 module libraries" ) +define_property(GLOBAL PROPERTY PX4_MODULE_PATHS + BRIEF_DOCS "PX4 module paths" + FULL_DOCS "List of paths to all PX4 modules" + ) + #============================================================================= # configuration # @@ -142,10 +138,6 @@ string(REPLACE "_" ";" config_args ${CONFIG}) list(GET config_args 0 OS) list(GET config_args 1 BOARD) list(GET config_args 2 LABEL) -set(target_name "${OS}_${BOARD}_${LABEL}") - -file(GLOB_RECURSE configs RELATIVE cmake/configs "cmake/configs/*.cmake") -set_property(CACHE CONFIG PROPERTY STRINGS ${configs}) set(THREADS "4" CACHE STRING "number of threads to use for external build processes") set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port") @@ -155,22 +147,14 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "") get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE) endif() +include(platforms/${OS}/cmake/px4_impl_os.cmake) +include(configs/${CONFIG}) list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${OS}/cmake) -include(platforms/${OS}/cmake/px4_impl_os.cmake) -set(config_module "configs/${CONFIG}") -include(${config_module}) - -include(common/coverage) -include(common/sanitizers) - -# CMake build type -# Debug Release RelWithDebInfo MinSizeRel Coverage +# CMake build type (Debug Release RelWithDebInfo MinSizeRel Coverage) if (NOT CMAKE_BUILD_TYPE) if (${OS} STREQUAL "nuttx") set(PX4_BUILD_TYPE "MinSizeRel") - elseif (${OS} STREQUAL "bebop") - set(PX4_BUILD_TYPE "MinSizeRel") else() set(PX4_BUILD_TYPE "RelWithDebInfo") endif() @@ -180,12 +164,10 @@ endif() set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage") -message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}") - #============================================================================= message(STATUS "PX4 VERSION: ${git_tag}") -message(STATUS "CONFIG: ${target_name}") +message(STATUS "CONFIG: ${CONFIG}") message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}") #============================================================================= @@ -195,20 +177,23 @@ project(px4 CXX C ASM) set(package-contact "px4users@googlegroups.com") +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR}) + #============================================================================= -# The URL for the elf file for crash logging -if (DEFINED ENV{BUILD_URI}) - set(BUILD_URI $ENV{BUILD_URI}) -else() - set(BUILD_URI "localhost") -endif() - -add_definitions(-DBUILD_URI=${BUILD_URI}) - # Setup install paths if (${OS} STREQUAL "posix") + include(common/coverage) + include(common/sanitizers) + # Define GNU standard installation directories include(GNUInstallDirs) @@ -229,20 +214,17 @@ set(px4_required_interface ) foreach(cmd ${px4_required_interface}) if (NOT COMMAND ${cmd}) - message(FATAL_ERROR "${config_module} must implement ${cmd}") + message(FATAL_ERROR "${CONFIG} must implement ${cmd}") endif() endforeach() set(px4_required_config config_module_list) foreach(conf ${px4_required_config}) if (NOT DEFINED ${conf}) - message(FATAL_ERROR "cmake/${config_module} must define ${conf}") + message(FATAL_ERROR "cmake/${CONFIG} must define ${conf}") endif() endforeach() -# force static lib build -set(BUILD_SHARED_LIBS OFF) - #============================================================================= # ccache # @@ -250,7 +232,6 @@ option(CCACHE "Use ccache if available" ON) find_program(CCACHE_PROGRAM ccache) if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE}) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") -else() endif() #============================================================================= @@ -271,23 +252,10 @@ endif() find_package(PythonInterp REQUIRED) px4_find_python_module(jinja2 REQUIRED) -#============================================================================= -# generate compile command database -# -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - #============================================================================= # check required toolchain variables # -# PX4 requires c++11 -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -# PX4 requires c99 -set(CMAKE_C_STANDARD 99) -set(CMAKE_C_STANDARD_REQUIRED ON) - set(required_variables CMAKE_C_COMPILER_ID CMAKE_CXX_COMPILER_ID) foreach(var ${required_variables}) if (NOT ${var}) @@ -335,24 +303,20 @@ px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${CMAKE_EXE_LINKER_FLAGS};${exe_linker px4_join(OUT CMAKE_C_FLAGS LIST "${CMAKE_C_FLAGS};${c_flags};${optimization_flags}" GLUE " ") px4_join(OUT CMAKE_CXX_FLAGS LIST "${CMAKE_CXX_FLAGS};${cxx_flags};${optimization_flags}" GLUE " ") -include_directories(${include_dirs} ${CMAKE_CURRENT_BINARY_DIR}/src/modules/systemlib/param) -link_directories(${link_dirs}) -add_definitions(${definitions}) - #============================================================================= # message, and airframe generation # include(common/px4_metadata) -add_subdirectory(msg) +add_subdirectory(msg EXCLUDE_FROM_ALL) px4_generate_airframes_xml(BOARD ${BOARD}) #============================================================================= # DriverFramework # - px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework") +add_subdirectory(src/lib/DriverFramework/framework) # List the DriverFramework drivers if (DEFINED config_df_driver_list) @@ -369,7 +333,6 @@ endforeach() #============================================================================= # external projects # - set(ep_base ${PX4_BINARY_DIR}/external) set_property(DIRECTORY PROPERTY EP_BASE ${ep_base}) @@ -397,12 +360,22 @@ endif() #============================================================================= # subdirectories # -add_subdirectory(src/platforms/common) +add_library(parameters_interface INTERFACE) +add_subdirectory(src/lib EXCLUDE_FROM_ALL) +add_subdirectory(src/platforms/common EXCLUDE_FROM_ALL) +add_subdirectory(src/modules/systemlib EXCLUDE_FROM_ALL) # TODO: split into libraries in platform layer +add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer +add_subdirectory(src/drivers/boards EXCLUDE_FROM_ALL) foreach(module ${config_module_list}) add_subdirectory(src/${module}) endforeach() +# must be the last module before firmware +add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL) +target_link_libraries(parameters_interface INTERFACE parameters) + +# firmware added last to generate the builtin for included modules add_subdirectory(platforms/${OS}) #============================================================================= @@ -450,14 +423,14 @@ set(CPACK_PACKAGE_CONTACT ${package-contact}) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_DEBIAN_PACKAGE_SECTION "devel") set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") -set(short-description "The px4 autopilot.") -set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${short-description}) +set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The PX4 Pro autopilot.") set(CPACK_GENERATOR "ZIP") set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${git_tag}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${git_version}") set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2") set(CPACK_PACKAGING_INSTALL_PREFIX "") set(CPACK_SET_DESTDIR "OFF") + if ("${CMAKE_SYSTEM}" MATCHES "Linux") find_program(DPKG_PROGRAM dpkg) if (EXISTS ${DPKG_PROGRAM}) @@ -465,5 +438,3 @@ if ("${CMAKE_SYSTEM}" MATCHES "Linux") endif() endif() include(CPack) - -# vim: set noet fenc=utf-8 ff=unix ft=cmake : diff --git a/Makefile b/Makefile index 758d7b6824..1b20acf043 100644 --- a/Makefile +++ b/Makefile @@ -252,8 +252,8 @@ coverity_scan: posix_sitl_default .PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata parameters_metadata: - @python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --markdown - @python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --xml + @python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --markdown + @python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --xml airframe_metadata: @python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --markdown diff --git a/cmake/common/px4_base.cmake b/cmake/common/px4_base.cmake index 6a0bce6960..fb2549539a 100644 --- a/cmake/common/px4_base.cmake +++ b/cmake/common/px4_base.cmake @@ -195,10 +195,22 @@ function(px4_add_module) ONE_VALUE MODULE MAIN STACK STACK_MAIN STACK_MAX PRIORITY MULTI_VALUE COMPILE_FLAGS LINK_FLAGS SRCS INCLUDES DEPENDS OPTIONS EXTERNAL - REQUIRED MODULE + REQUIRED MODULE MAIN ARGN ${ARGN}) - px4_add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS}) + add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS}) + + # all modules can potentially use parameters and uORB + add_dependencies(${MODULE} uorb_headers) + target_link_libraries(${MODULE} PRIVATE prebuild_targets parameters_interface platforms__common px4_layer systemlib) + + set_property(GLOBAL APPEND PROPERTY PX4_MODULE_LIBRARIES ${MODULE}) + set_property(GLOBAL APPEND PROPERTY PX4_MODULE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}) + + px4_add_optimization_flags_for_target(${MODULE}) + + # Pass variable to the parent px4_add_module. + set(_no_optimization_for_target ${_no_optimization_for_target} PARENT_SCOPE) # set defaults if not set set(MAIN_DEFAULT MAIN-NOTFOUND) @@ -240,7 +252,16 @@ function(px4_add_module) endif() if(DEPENDS) - add_dependencies(${MODULE} ${DEPENDS}) + # using target_link_libraries for dependencies provides linking + # as well as interface include and libraries + foreach(dep ${DEPENDS}) + get_target_property(dep_type ${dep} TYPE) + if (${dep_type} STREQUAL "STATIC_LIBRARY") + target_link_libraries(${MODULE} PRIVATE ${dep}) + else() + add_dependencies(${MODULE} ${dep}) + endif() + endforeach() endif() # join list variables to get ready to send to compiler @@ -425,6 +446,10 @@ function(px4_add_common_flags) -fdiagnostics-color=always ) endif() + + list(APPEND cxx_warnings + -Wno-format-truncation # TODO: fix + ) endif() set(visibility_flags @@ -450,10 +475,13 @@ function(px4_add_common_flags) ${_optimization_flags} ) - set(added_include_dirs + include_directories( ${PX4_BINARY_DIR} ${PX4_BINARY_DIR}/src + ${PX4_BINARY_DIR}/src/lib ${PX4_BINARY_DIR}/src/modules + + ${PX4_SOURCE_DIR}/src ${PX4_SOURCE_DIR}/src/drivers/boards/${BOARD} ${PX4_SOURCE_DIR}/src/include @@ -464,13 +492,10 @@ function(px4_add_common_flags) ${PX4_SOURCE_DIR}/src/platforms ) - set(added_link_dirs) # none used currently - set(added_exe_linker_flags) - string(TOUPPER ${BOARD} board_upper) string(REPLACE "-" "_" board_config ${board_upper}) - set(added_definitions + add_definitions( -DCONFIG_ARCH_BOARD_${board_config} -D__STDC_FORMAT_MACROS ) @@ -548,13 +573,25 @@ endfunction() # function(px4_add_library target) add_library(${target} ${ARGN}) - add_dependencies(${target} prebuild_targets) + + target_compile_definitions(${target} PRIVATE MODULE_NAME="${target}") + + # all PX4 libraries have access to parameters and uORB + add_dependencies(${target} uorb_headers) + target_link_libraries(${target} PRIVATE prebuild_targets parameters_interface uorb_msgs) + + # TODO: move to platform layer + if ("${OS}" MATCHES "nuttx") + target_link_libraries(${target} PRIVATE m nuttx_c) + endif() + px4_add_optimization_flags_for_target(${target}) # Pass variable to the parent px4_add_module. set(_no_optimization_for_target ${_no_optimization_for_target} PARENT_SCOPE) set_property(GLOBAL APPEND PROPERTY PX4_LIBRARIES ${target}) + set_property(GLOBAL APPEND PROPERTY PX4_MODULE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}) endfunction() #============================================================================= @@ -596,4 +633,3 @@ function(px4_find_python_module module) #endif() endfunction(px4_find_python_module) -# vim: set noet fenc=utf-8 ff=unix nowrap: diff --git a/cmake/configs/nuttx_aerocore2_default.cmake b/cmake/configs/nuttx_aerocore2_default.cmake index ed31afa913..1bdbe99cad 100644 --- a/cmake/configs/nuttx_aerocore2_default.cmake +++ b/cmake/configs/nuttx_aerocore2_default.cmake @@ -13,18 +13,14 @@ set(config_module_list #drivers/magnetometer #drivers/telemetry - drivers/device drivers/stm32 drivers/stm32/adc drivers/stm32/tone_alarm - drivers/led drivers/px4fmu - drivers/boards drivers/imu/lsm303d drivers/imu/l3gd20 drivers/gps drivers/pwm_out_sim - drivers/airspeed modules/sensors #drivers/pwm_input #drivers/camera_trigger @@ -100,27 +96,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_aerofc-v1_default.cmake b/cmake/configs/nuttx_aerofc-v1_default.cmake index 12fe7545ca..d2e7828a90 100644 --- a/cmake/configs/nuttx_aerofc-v1_default.cmake +++ b/cmake/configs/nuttx_aerofc-v1_default.cmake @@ -8,11 +8,8 @@ set(config_module_list # Board support modules # drivers/aerofc_adc - drivers/boards - drivers/device drivers/distance_sensor drivers/gps - drivers/led drivers/barometer/ms5611 drivers/magnetometer/hmc5883 drivers/magnetometer/ist8310 @@ -70,21 +67,5 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/mathlib - lib/mixer - lib/rc - lib/version - lib/FlightTasks ) diff --git a/cmake/configs/nuttx_auav-x21_default.cmake b/cmake/configs/nuttx_auav-x21_default.cmake index b0b26120ce..afabeb7b70 100644 --- a/cmake/configs/nuttx_auav-x21_default.cmake +++ b/cmake/configs/nuttx_auav-x21_default.cmake @@ -13,14 +13,10 @@ set(config_module_list drivers/magnetometer drivers/telemetry - drivers/airspeed drivers/batt_smbus drivers/blinkm - drivers/boards drivers/camera_trigger - drivers/device drivers/gps - drivers/led drivers/mkblctrl drivers/imu/mpu6000 drivers/imu/mpu9250 @@ -113,26 +109,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_crazyflie_default.cmake b/cmake/configs/nuttx_crazyflie_default.cmake index 6f1482b70e..74aac30091 100644 --- a/cmake/configs/nuttx_crazyflie_default.cmake +++ b/cmake/configs/nuttx_crazyflie_default.cmake @@ -5,11 +5,8 @@ set(config_module_list # # Board support modules # - drivers/device drivers/stm32 - drivers/led drivers/px4fmu - drivers/boards drivers/imu/mpu9250 drivers/barometer/lps25h drivers/gps @@ -71,25 +68,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_esc35-v1_default.cmake b/cmake/configs/nuttx_esc35-v1_default.cmake index 1446f25ae8..816feaea56 100644 --- a/cmake/configs/nuttx_esc35-v1_default.cmake +++ b/cmake/configs/nuttx_esc35-v1_default.cmake @@ -39,9 +39,6 @@ set(config_module_list # # Board support modules # - drivers/boards - drivers/device - drivers/led drivers/stm32 # @@ -63,12 +60,4 @@ set(config_module_list modules/uavcanesc/commands/dc modules/uavcanesc/commands/rpm modules/uavcanesc/commands/stat - - # - # Library modules - # - lib/version - modules/systemlib - modules/systemlib/param - modules/uORB ) diff --git a/cmake/configs/nuttx_mindpx-v2_default.cmake b/cmake/configs/nuttx_mindpx-v2_default.cmake index 9aec9ded1b..63658b2a09 100644 --- a/cmake/configs/nuttx_mindpx-v2_default.cmake +++ b/cmake/configs/nuttx_mindpx-v2_default.cmake @@ -13,16 +13,12 @@ set(config_module_list drivers/magnetometer drivers/telemetry - drivers/airspeed drivers/batt_smbus drivers/blinkm - drivers/boards drivers/camera_trigger - drivers/device drivers/gps #drivers/hott drivers/imu/l3gd20 - drivers/led drivers/imu/lsm303d #drivers/mkblctrl drivers/imu/mpu6000 @@ -117,27 +113,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_nxphlite-v3_default.cmake b/cmake/configs/nuttx_nxphlite-v3_default.cmake index f485cc2c0e..e681e85fc7 100644 --- a/cmake/configs/nuttx_nxphlite-v3_default.cmake +++ b/cmake/configs/nuttx_nxphlite-v3_default.cmake @@ -13,13 +13,10 @@ set(config_module_list drivers/magnetometer drivers/telemetry - drivers/airspeed drivers/barometer/mpl3115a2 drivers/batt_smbus drivers/blinkm - drivers/boards drivers/camera_trigger - drivers/device drivers/imu/fxas21002c drivers/imu/fxos8701cq drivers/gps @@ -27,7 +24,6 @@ set(config_module_list drivers/kinetis/adc drivers/kinetis/tone_alarm drivers/imu/l3gd20 - drivers/led drivers/mkblctrl drivers/imu/mpu6000 drivers/imu/mpu9250 @@ -121,27 +117,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/ecl - lib/conversion - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/DriverFramework/framework - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_px4-same70xplained-v1_default.cmake b/cmake/configs/nuttx_px4-same70xplained-v1_default.cmake index 009a03584d..20cde30201 100644 --- a/cmake/configs/nuttx_px4-same70xplained-v1_default.cmake +++ b/cmake/configs/nuttx_px4-same70xplained-v1_default.cmake @@ -13,13 +13,10 @@ set(config_module_list drivers/magnetometer drivers/telemetry - drivers/device drivers/samv7 #WIP drivers/samv7/adc drivers/samv7/tone_alarm - drivers/led drivers/px4fmu - drivers/boards drivers/rgbled drivers/imu/mpu6000 drivers/imu/mpu9250 @@ -28,7 +25,6 @@ set(config_module_list drivers/gps #WIP drivers/pwm_out_sim drivers/blinkm - drivers/airspeed modules/sensors #drivers/mkblctrl drivers/px4flow @@ -94,26 +90,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake b/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake index 9e8569cc5d..125e897f5f 100644 --- a/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake +++ b/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake @@ -5,10 +5,7 @@ set(config_module_list # # Board support modules # - drivers/device drivers/stm32 - drivers/led - drivers/boards # # System commands @@ -23,25 +20,6 @@ set(config_module_list systemcmds/nshterm systemcmds/ver - # - # Library modules - # - modules/systemlib/param - modules/systemlib - modules/uORB - - # - # Libraries - # - #lib/mathlib/CMSIS - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/mathlib - lib/mixer - lib/version - # # Demo apps # diff --git a/cmake/configs/nuttx_px4cannode-v1_default.cmake b/cmake/configs/nuttx_px4cannode-v1_default.cmake index bc9d6119d6..0460bf4b26 100644 --- a/cmake/configs/nuttx_px4cannode-v1_default.cmake +++ b/cmake/configs/nuttx_px4cannode-v1_default.cmake @@ -37,10 +37,7 @@ set(config_module_list # # Board support modules # - drivers/boards drivers/bootloaders - drivers/device - drivers/led drivers/stm32 # @@ -56,12 +53,4 @@ set(config_module_list # modules/uavcannode - # - # Library modules - # - lib/version - modules/systemlib - modules/systemlib/param - modules/uORB - ) \ No newline at end of file diff --git a/cmake/configs/nuttx_px4esc-v1_default.cmake b/cmake/configs/nuttx_px4esc-v1_default.cmake index 3c7d1ef1d3..2b27b7386f 100644 --- a/cmake/configs/nuttx_px4esc-v1_default.cmake +++ b/cmake/configs/nuttx_px4esc-v1_default.cmake @@ -39,10 +39,7 @@ set(config_module_list # # Board support modules # - drivers/boards drivers/bootloaders - drivers/device - drivers/led drivers/stm32 # @@ -65,12 +62,4 @@ set(config_module_list modules/uavcanesc/commands/rpm modules/uavcanesc/commands/stat - # - # Library modules - # - lib/version - modules/systemlib - modules/systemlib/param - modules/uORB - ) \ No newline at end of file diff --git a/cmake/configs/nuttx_px4fmu-v2_default.cmake b/cmake/configs/nuttx_px4fmu-v2_default.cmake index 7125c40504..715ae19133 100644 --- a/cmake/configs/nuttx_px4fmu-v2_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v2_default.cmake @@ -12,22 +12,18 @@ set(config_module_list #drivers/telemetry #drivers/imu/adis16448 - drivers/airspeed drivers/barometer/ms5611 #drivers/blinkm #drivers/imu/bmi160 #drivers/barometer/bmp280 - drivers/boards #drivers/bst drivers/camera_trigger - drivers/device #drivers/frsky_telemetry drivers/gps #drivers/hott #drivers/iridiumsbd #drivers/irlock drivers/imu/l3gd20 - drivers/led drivers/imu/lsm303d drivers/magnetometer/hmc5883 drivers/magnetometer/lis3mdl @@ -142,24 +138,6 @@ set(config_module_list # Library modules # modules/dataman - modules/systemlib - modules/systemlib/param - modules/uORB - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - #lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks # # OBC challenge diff --git a/cmake/configs/nuttx_px4fmu-v2_test.cmake b/cmake/configs/nuttx_px4fmu-v2_test.cmake index 8fdbc21aff..cf990f3c0e 100644 --- a/cmake/configs/nuttx_px4fmu-v2_test.cmake +++ b/cmake/configs/nuttx_px4fmu-v2_test.cmake @@ -12,22 +12,18 @@ set(config_module_list #drivers/telemetry #drivers/imu/adis16448 - drivers/airspeed drivers/barometer/ms5611 #drivers/blinkm #drivers/imu/bmi160 #drivers/barometer/bmp280 - drivers/boards #drivers/bst #drivers/camera_trigger - drivers/device #drivers/frsky_telemetry drivers/gps #drivers/hott #drivers/iridiumsbd #drivers/irlock drivers/imu/l3gd20 - drivers/led drivers/imu/lsm303d drivers/magnetometer/hmc5883 drivers/magnetometer/lis3mdl @@ -133,24 +129,6 @@ set(config_module_list # Library modules # modules/dataman - modules/systemlib - modules/systemlib/param - modules/uORB - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - #lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks # # OBC challenge diff --git a/cmake/configs/nuttx_px4fmu-v3_default.cmake b/cmake/configs/nuttx_px4fmu-v3_default.cmake index 0094aa7c8a..2344282420 100644 --- a/cmake/configs/nuttx_px4fmu-v3_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v3_default.cmake @@ -19,12 +19,9 @@ set(config_module_list drivers/magnetometer drivers/telemetry - drivers/airspeed drivers/batt_smbus drivers/blinkm - drivers/boards drivers/camera_trigger - drivers/device drivers/gps drivers/imu/adis16448 drivers/imu/bmi160 @@ -33,7 +30,6 @@ set(config_module_list drivers/imu/mpu6000 drivers/imu/mpu9250 drivers/irlock - drivers/led drivers/mkblctrl drivers/oreoled drivers/protocol_splitter @@ -131,24 +127,6 @@ set(config_module_list # Library modules # modules/dataman - modules/systemlib - modules/systemlib/param - modules/uORB - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks # # OBC challenge diff --git a/cmake/configs/nuttx_px4fmu-v4_default.cmake b/cmake/configs/nuttx_px4fmu-v4_default.cmake index 778b001d39..c665bf3f22 100644 --- a/cmake/configs/nuttx_px4fmu-v4_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v4_default.cmake @@ -14,15 +14,11 @@ set(config_module_list drivers/telemetry drivers/imu - drivers/airspeed drivers/batt_smbus drivers/blinkm - drivers/boards drivers/camera_trigger - drivers/device drivers/gps drivers/irlock - drivers/led drivers/mkblctrl drivers/oreoled drivers/pca9685 @@ -117,27 +113,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_px4fmu-v4pro_default.cmake b/cmake/configs/nuttx_px4fmu-v4pro_default.cmake index 3fd0a85aaf..8985fdfd0c 100644 --- a/cmake/configs/nuttx_px4fmu-v4pro_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v4pro_default.cmake @@ -13,18 +13,14 @@ set(config_module_list drivers/magnetometer drivers/telemetry - drivers/airspeed drivers/batt_smbus drivers/blinkm drivers/imu/bma180 drivers/imu/bmi160 - drivers/boards drivers/camera_trigger - drivers/device drivers/gps drivers/irlock drivers/imu/l3gd20 - drivers/led drivers/mkblctrl drivers/imu/mpu6000 drivers/imu/mpu9250 @@ -122,24 +118,6 @@ set(config_module_list # Library modules # modules/dataman - modules/systemlib/param - modules/systemlib - modules/uORB - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks # # OBC challenge diff --git a/cmake/configs/nuttx_px4fmu-v5_default.cmake b/cmake/configs/nuttx_px4fmu-v5_default.cmake index c30b485266..f866340b56 100644 --- a/cmake/configs/nuttx_px4fmu-v5_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v5_default.cmake @@ -13,18 +13,14 @@ set(config_module_list drivers/magnetometer drivers/telemetry - drivers/airspeed drivers/batt_smbus drivers/blinkm drivers/imu/bma180 drivers/imu/bmi055 drivers/imu/bmi160 - drivers/boards drivers/camera_trigger - drivers/device drivers/gps drivers/irlock - drivers/led drivers/mkblctrl drivers/imu/mpu6000 drivers/imu/mpu9250 @@ -123,25 +119,6 @@ set(config_module_list # Library modules # modules/dataman - modules/systemlib/param - modules/systemlib - modules/uORB - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks # # OBC challenge diff --git a/cmake/configs/nuttx_px4io-v2_default.cmake b/cmake/configs/nuttx_px4io-v2_default.cmake index 0a0ebcb384..ff227dfbb8 100644 --- a/cmake/configs/nuttx_px4io-v2_default.cmake +++ b/cmake/configs/nuttx_px4io-v2_default.cmake @@ -2,9 +2,6 @@ px4_nuttx_configure(HWCLASS m3 CONFIG nsh) set(config_module_list - drivers/boards/px4io-v2 drivers/stm32 - lib/mixer - lib/rc modules/px4iofirmware ) diff --git a/cmake/configs/nuttx_px4nucleoF767ZI-v1_default.cmake b/cmake/configs/nuttx_px4nucleoF767ZI-v1_default.cmake index a5030d11b8..2172366f41 100644 --- a/cmake/configs/nuttx_px4nucleoF767ZI-v1_default.cmake +++ b/cmake/configs/nuttx_px4nucleoF767ZI-v1_default.cmake @@ -14,15 +14,11 @@ set(config_module_list drivers/telemetry drivers/imu/adis16448 - drivers/airspeed drivers/blinkm drivers/imu/bma180 drivers/imu/bmi160 - drivers/boards drivers/camera_trigger - drivers/device drivers/gps - drivers/led drivers/mkblctrl drivers/imu/mpu6000 drivers/imu/mpu9250 @@ -100,27 +96,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/nuttx_s2740vc-v1_default.cmake b/cmake/configs/nuttx_s2740vc-v1_default.cmake index 2c6e3fe492..f9d629158e 100644 --- a/cmake/configs/nuttx_s2740vc-v1_default.cmake +++ b/cmake/configs/nuttx_s2740vc-v1_default.cmake @@ -6,9 +6,7 @@ add_definitions( px4_nuttx_configure(HWCLASS m4 CONFIG nsh) -# # UAVCAN boot loadable Module ID - set(uavcanblid_sw_version_major 0) set(uavcanblid_sw_version_minor 1) add_definitions( @@ -16,9 +14,7 @@ add_definitions( -DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor} ) -# # Bring in common uavcan hardware identity definitions -# include(common/px4_git) px4_add_git_submodule(TARGET git_uavcan_board_ident PATH "cmake/configs/uavcan_board_ident") include(configs/uavcan_board_ident/s2740vc-v1) @@ -33,14 +29,11 @@ include(configs/uavcan_board_ident/s2740vc-v1) # SW_MINOR ${uavcanblid_sw_version_minor}) set(config_module_list - # # Board support modules # - + drivers/bootloaders drivers/stm32 - drivers/led - drivers/boards # # System commands @@ -49,15 +42,4 @@ set(config_module_list systemcmds/top systemcmds/config systemcmds/ver - - # - # General system control - # - - # - # Library modules - # - modules/systemlib/param - modules/systemlib - lib/version -) +) \ No newline at end of file diff --git a/cmake/configs/nuttx_tap-v1_default.cmake b/cmake/configs/nuttx_tap-v1_default.cmake index f1fbc541a8..4e2b1fdc21 100644 --- a/cmake/configs/nuttx_tap-v1_default.cmake +++ b/cmake/configs/nuttx_tap-v1_default.cmake @@ -7,13 +7,9 @@ set(config_module_list # # Board support modules # - drivers/airspeed - drivers/boards - drivers/device drivers/barometer drivers/differential_pressure drivers/gps - drivers/led drivers/magnetometer/hmc5883 drivers/imu/mpu6000 drivers/px4fmu @@ -77,24 +73,5 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks ) diff --git a/cmake/configs/posix_bebop_default.cmake b/cmake/configs/posix_bebop_default.cmake index 70b72c3a61..7a9f5cc401 100644 --- a/cmake/configs/posix_bebop_default.cmake +++ b/cmake/configs/posix_bebop_default.cmake @@ -12,7 +12,6 @@ set(config_module_list # # Board support modules # - drivers/device drivers/linux_sbus modules/sensors platforms/posix/drivers/df_ms5607_wrapper @@ -56,9 +55,6 @@ set(config_module_list modules/sdlog2 modules/logger modules/commander - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman modules/land_detector modules/navigator @@ -68,19 +64,6 @@ set(config_module_list # PX4 drivers # drivers/gps - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/version - lib/FlightTasks ) set(config_df_driver_list diff --git a/cmake/configs/posix_eagle_hil.cmake b/cmake/configs/posix_eagle_hil.cmake index 835e2509d5..71579837c9 100644 --- a/cmake/configs/posix_eagle_hil.cmake +++ b/cmake/configs/posix_eagle_hil.cmake @@ -18,9 +18,6 @@ else() endif() set(config_module_list - drivers/device - drivers/boards - drivers/led drivers/linux_sbus systemcmds/param @@ -28,9 +25,6 @@ set(config_module_list modules/mavlink - modules/systemlib/param - modules/systemlib - modules/uORB modules/sensors modules/dataman modules/sdlog2 @@ -38,13 +32,6 @@ set(config_module_list modules/simulator modules/commander - lib/controllib - lib/mathlib - lib/ecl - lib/conversion - lib/version - lib/DriverFramework/framework - modules/muorb/krait ) diff --git a/cmake/configs/posix_eagle_muorb.cmake b/cmake/configs/posix_eagle_muorb.cmake index 51ce40b9bb..7e4107c98f 100644 --- a/cmake/configs/posix_eagle_muorb.cmake +++ b/cmake/configs/posix_eagle_muorb.cmake @@ -13,12 +13,6 @@ else() endif() set(config_module_list - drivers/device - - modules/uORB - - lib/DriverFramework/framework - modules/muorb/krait ) diff --git a/cmake/configs/posix_ocpoc_cross.cmake b/cmake/configs/posix_ocpoc_cross.cmake index e1a8859a96..702c2bbd80 100644 --- a/cmake/configs/posix_ocpoc_cross.cmake +++ b/cmake/configs/posix_ocpoc_cross.cmake @@ -18,7 +18,6 @@ set(config_module_list # # Board support modules # - drivers/device modules/sensors platforms/posix/drivers/df_mpu9250_wrapper platforms/posix/drivers/df_ms5611_wrapper @@ -59,9 +58,6 @@ set(config_module_list modules/sdlog2 modules/logger modules/commander - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman modules/land_detector modules/navigator @@ -76,21 +72,6 @@ set(config_module_list drivers/linux_pwm_out drivers/rgbled drivers/ulanding - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/version - lib/FlightTasks examples/px4_simple_app ) diff --git a/cmake/configs/posix_ocpoc_ubuntu.cmake b/cmake/configs/posix_ocpoc_ubuntu.cmake index f199af69d1..4738e78eb9 100644 --- a/cmake/configs/posix_ocpoc_ubuntu.cmake +++ b/cmake/configs/posix_ocpoc_ubuntu.cmake @@ -17,7 +17,6 @@ set(config_module_list # # Board support modules # - drivers/device drivers/distance_sensor modules/sensors platforms/posix/drivers/df_mpu9250_wrapper @@ -59,9 +58,6 @@ set(config_module_list modules/sdlog2 modules/logger modules/commander - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman modules/land_detector modules/navigator @@ -75,21 +71,6 @@ set(config_module_list drivers/linux_sbus drivers/linux_pwm_out drivers/rgbled - - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/version - lib/FlightTasks examples/px4_simple_app ) diff --git a/cmake/configs/posix_rpi_common.cmake b/cmake/configs/posix_rpi_common.cmake index 67e5dee78d..fd87c2696b 100644 --- a/cmake/configs/posix_rpi_common.cmake +++ b/cmake/configs/posix_rpi_common.cmake @@ -15,10 +15,8 @@ set(config_module_list # # Board support modules # - drivers/airspeed #drivers/barometer drivers/batt_smbus - drivers/device drivers/differential_pressure drivers/distance_sensor #drivers/telemetry @@ -71,9 +69,6 @@ set(config_module_list modules/sdlog2 modules/logger modules/commander - modules/systemlib/param - modules/systemlib - modules/uORB modules/dataman modules/land_detector modules/navigator @@ -92,20 +87,6 @@ set(config_module_list drivers/pwm_out_sim drivers/rpi_rc_in - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks ) # diff --git a/cmake/configs/posix_sdflight_default.cmake b/cmake/configs/posix_sdflight_default.cmake index c3b3046e20..19e34255b6 100644 --- a/cmake/configs/posix_sdflight_default.cmake +++ b/cmake/configs/posix_sdflight_default.cmake @@ -30,13 +30,10 @@ endif() set(CONFIG_SHMEM "1") set(config_module_list - drivers/device drivers/blinkm drivers/linux_sbus drivers/pwm_out_sim drivers/rgbled - drivers/led - drivers/boards drivers/qshell/posix systemcmds/param @@ -57,9 +54,6 @@ set(config_module_list modules/mc_pos_control modules/mc_att_control - modules/systemlib/param - modules/systemlib - modules/uORB modules/muorb/krait modules/sensors modules/dataman @@ -68,16 +62,4 @@ set(config_module_list modules/simulator modules/commander modules/navigator - - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks ) diff --git a/cmake/configs/posix_sdflight_legacy.cmake b/cmake/configs/posix_sdflight_legacy.cmake index 428136c26a..aa31bb2ab0 100644 --- a/cmake/configs/posix_sdflight_legacy.cmake +++ b/cmake/configs/posix_sdflight_legacy.cmake @@ -22,13 +22,10 @@ set(CONFIG_SHMEM "1") set(config_module_list - drivers/device drivers/blinkm drivers/linux_sbus drivers/pwm_out_sim drivers/rgbled - drivers/led - drivers/boards drivers/qshell/posix systemcmds/param @@ -49,9 +46,6 @@ set(config_module_list modules/mc_pos_control modules/mc_att_control - modules/systemlib/param - modules/systemlib - modules/uORB modules/muorb/krait modules/sensors modules/dataman @@ -60,15 +54,4 @@ set(config_module_list modules/simulator modules/commander modules/navigator - - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/tunes - lib/version ) diff --git a/cmake/configs/posix_sitl_default.cmake b/cmake/configs/posix_sitl_default.cmake index 803c36be8d..3a643c1606 100644 --- a/cmake/configs/posix_sitl_default.cmake +++ b/cmake/configs/posix_sitl_default.cmake @@ -7,24 +7,15 @@ set(config_module_list drivers/distance_sensor #drivers/telemetry - drivers/airspeed drivers/batt_smbus - drivers/boards drivers/camera_trigger - drivers/device drivers/gps drivers/linux_gpio drivers/pwm_out_sim drivers/vmount modules/sensors - platforms/posix/drivers/accelsim - platforms/posix/drivers/adcsim - platforms/posix/drivers/airspeedsim - platforms/posix/drivers/barosim - platforms/posix/drivers/gpssim - platforms/posix/drivers/gyrosim - platforms/posix/drivers/ledsim + platforms/posix/drivers/tonealrmsim # @@ -111,27 +102,8 @@ set(config_module_list # Library modules # modules/dataman - modules/systemlib/param - modules/systemlib - modules/uORB modules/landing_target_estimator - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mixer - lib/mathlib - lib/rc - lib/terrain_estimation - lib/tunes - lib/version - lib/FlightTasks - # # OBC challenge # diff --git a/cmake/configs/posix_sitl_replay.cmake b/cmake/configs/posix_sitl_replay.cmake index 58130ad4a0..15b7f5da80 100644 --- a/cmake/configs/posix_sitl_replay.cmake +++ b/cmake/configs/posix_sitl_replay.cmake @@ -2,25 +2,14 @@ set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake) set(config_module_list - drivers/device drivers/boards/sitl systemcmds/param systemcmds/ver systemcmds/perf - modules/uORB - modules/systemlib/param - modules/systemlib modules/ekf2 modules/ekf2_replay modules/sdlog2 modules/logger - lib/controllib - lib/mathlib - lib/conversion - lib/ecl - lib/version - lib/DriverFramework/framework - lib/micro-CDR ) set(config_extra_builtin_cmds diff --git a/cmake/configs/qurt_eagle_hello.cmake b/cmake/configs/qurt_eagle_hello.cmake index aac80873b9..72e4ea88cb 100644 --- a/cmake/configs/qurt_eagle_hello.cmake +++ b/cmake/configs/qurt_eagle_hello.cmake @@ -20,7 +20,6 @@ include(qurt_flags) include_directories(${HEXAGON_SDK_INCLUDES}) set(config_module_list - drivers/device # # System commands @@ -30,8 +29,5 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB ) diff --git a/cmake/configs/qurt_eagle_hil.cmake b/cmake/configs/qurt_eagle_hil.cmake index 3c35798d36..8f00d92bf2 100644 --- a/cmake/configs/qurt_eagle_hil.cmake +++ b/cmake/configs/qurt_eagle_hil.cmake @@ -20,10 +20,7 @@ include(qurt_flags) include_directories(${HEXAGON_SDK_INCLUDES}) set(config_module_list - drivers/device - drivers/boards drivers/pwm_out_sim - drivers/led drivers/rgbled modules/sensors @@ -52,23 +49,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/commander - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/version - # # sources for muorb over fastrpc # diff --git a/cmake/configs/qurt_eagle_muorb.cmake b/cmake/configs/qurt_eagle_muorb.cmake index 3e1c179d15..cba46d050a 100644 --- a/cmake/configs/qurt_eagle_muorb.cmake +++ b/cmake/configs/qurt_eagle_muorb.cmake @@ -20,7 +20,6 @@ include(qurt_flags) include_directories(${HEXAGON_SDK_INCLUDES}) set(config_module_list - drivers/device # # System commands @@ -30,17 +29,6 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB - - # - # Libraries - # - lib/mathlib - lib/conversion - lib/version - lib/DriverFramework/framework # # sources for muorb over fastrpc diff --git a/cmake/configs/qurt_eagle_test.cmake b/cmake/configs/qurt_eagle_test.cmake index 592aefb900..72e4ea88cb 100644 --- a/cmake/configs/qurt_eagle_test.cmake +++ b/cmake/configs/qurt_eagle_test.cmake @@ -20,7 +20,6 @@ include(qurt_flags) include_directories(${HEXAGON_SDK_INCLUDES}) set(config_module_list - drivers/device # # System commands @@ -30,16 +29,5 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB - - # - # Libraries - # - lib/conversion - lib/DriverFramework/framework - lib/mathlib - lib/mixer ) diff --git a/cmake/configs/qurt_eagle_travis.cmake b/cmake/configs/qurt_eagle_travis.cmake index b690d82386..8badcdddac 100644 --- a/cmake/configs/qurt_eagle_travis.cmake +++ b/cmake/configs/qurt_eagle_travis.cmake @@ -25,10 +25,7 @@ include(qurt_flags) include_directories(${HEXAGON_SDK_INCLUDES}) set(config_module_list - drivers/device - drivers/boards drivers/pwm_out_sim - drivers/led drivers/rgbled modules/sensors @@ -57,24 +54,8 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/commander - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/led - lib/mathlib - lib/mixer - lib/terrain_estimation - lib/version - # # sources for muorb over fastrpc # diff --git a/cmake/configs/qurt_sdflight_default.cmake b/cmake/configs/qurt_sdflight_default.cmake index 0bb1b7dacf..cbc80f3cb4 100644 --- a/cmake/configs/qurt_sdflight_default.cmake +++ b/cmake/configs/qurt_sdflight_default.cmake @@ -34,7 +34,6 @@ set(config_module_list # # Board support modules # - drivers/device modules/sensors platforms/posix/drivers/df_mpu9250_wrapper platforms/posix/drivers/df_bmp280_wrapper @@ -66,9 +65,6 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/commander modules/land_detector @@ -80,20 +76,6 @@ set(config_module_list drivers/qshell/qurt drivers/snapdragon_pwm_out - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/version - lib/FlightTasks - # # sources for muorb over fastrpc # diff --git a/cmake/configs/qurt_sdflight_legacy.cmake b/cmake/configs/qurt_sdflight_legacy.cmake index cc6fa2b3e1..27e2ad8eb5 100644 --- a/cmake/configs/qurt_sdflight_legacy.cmake +++ b/cmake/configs/qurt_sdflight_legacy.cmake @@ -33,7 +33,6 @@ set(config_module_list # # Board support modules # - drivers/device modules/sensors platforms/posix/drivers/df_mpu9250_wrapper platforms/posix/drivers/df_bmp280_wrapper @@ -61,9 +60,6 @@ set(config_module_list # # Library modules # - modules/systemlib/param - modules/systemlib - modules/uORB modules/commander modules/land_detector @@ -79,19 +75,6 @@ set(config_module_list # platforms/qurt/fc_addon/uart_esc - # - # Libraries - # - lib/controllib - lib/conversion - lib/DriverFramework/framework - lib/ecl - lib/mathlib - lib/mixer - lib/rc - lib/terrain_estimation - lib/version - # # sources for muorb over fastrpc # diff --git a/msg/CMakeLists.txt b/msg/CMakeLists.txt index ec31d20d51..feb8e913dc 100644 --- a/msg/CMakeLists.txt +++ b/msg/CMakeLists.txt @@ -196,5 +196,5 @@ add_custom_command(OUTPUT ${uorb_sources} VERBATIM ) -px4_add_library(uorb_msgs ${uorb_sources}) -add_dependencies(uorb_msgs uorb_headers) +add_library(uorb_msgs ${uorb_sources}) +add_dependencies(uorb_msgs prebuild_targets uorb_headers) diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index 708a528de0..e2f9445c4d 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -42,7 +42,7 @@ endif() add_executable(${FW_NAME} ${PX4_SOURCE_DIR}/src/platforms/empty.c) add_dependencies(${FW_NAME} git_nuttx nuttx_build) -get_property(module_libraries GLOBAL PROPERTY PX4_LIBRARIES) +get_property(module_libraries GLOBAL PROPERTY PX4_MODULE_LIBRARIES) # build NuttX add_subdirectory(NuttX ${PX4_BINARY_DIR}/NuttX) @@ -76,24 +76,41 @@ file(RELATIVE_PATH PX4_BINARY_DIR_REL ${CMAKE_CURRENT_BINARY_DIR} ${PX4_BINARY_D # because even relative linker script paths are different for linux, mac and windows CYGPATH(PX4_BINARY_DIR PX4_BINARY_DIR_CYG) -target_link_libraries(${FW_NAME} +target_link_libraries(nuttx_arch + INTERFACE + drivers_board + drivers_arch + drivers_boards_common + drivers_boards_common_arch +) + +target_link_libraries(nuttx_c INTERFACE nuttx_drivers) +target_link_libraries(nuttx_cxx INTERFACE nuttx_c) + +target_link_libraries(${FW_NAME} PRIVATE + + -nodefaultlibs + -nostdlib + + -fno-exceptions + -fno-rtti -Wl,--script=${PX4_BINARY_DIR_CYG}/NuttX/nuttx/configs/${BOARD}/scripts/${LD_SCRIPT} -Wl,-Map=${CONFIG}.map - -Wl,--warn-common,--gc-sections + -Wl,--warn-common + -Wl,--gc-sections -Wl,--start-group - ${module_libraries} - ${nuttx_libs} + ${nuttx_libs} -Wl,--end-group - - m - gcc ) +target_link_libraries(${FW_NAME} PRIVATE ${module_libraries}) +target_link_libraries(${FW_NAME} PRIVATE modules__uORB) + if (config_romfs_root) add_subdirectory(${PX4_SOURCE_DIR}/ROMFS ${PX4_BINARY_DIR}/ROMFS) - target_link_libraries(${FW_NAME} romfs) + target_link_libraries(${FW_NAME} PRIVATE romfs) endif() # create px4 file (combined firmware and metadata) @@ -212,4 +229,3 @@ add_custom_target(profile DEPENDS ${FW_NAME} ${PX4_SOURCE_DIR}/platforms/nuttx/Debug/poor-mans-profiler.sh USES_TERMINAL ) - diff --git a/platforms/nuttx/cmake/px4_impl_os.cmake b/platforms/nuttx/cmake/px4_impl_os.cmake index a9877bce38..b26ae5f687 100644 --- a/platforms/nuttx/cmake/px4_impl_os.cmake +++ b/platforms/nuttx/cmake/px4_impl_os.cmake @@ -110,7 +110,8 @@ function(px4_nuttx_make_uavcan_bootloadable) add_custom_command(OUTPUT ${uavcan_bl_imange_name} COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/make_can_boot_descriptor.py -v --use-git-hash ${BIN} ${uavcan_bl_imange_name} - DEPENDS ${BIN}) + DEPENDS ${BIN} + ) add_custom_target(build_uavcan_bl_${BOARD} ALL DEPENDS ${uavcan_bl_imange_name}) endfunction() @@ -188,11 +189,11 @@ function(px4_os_add_flags) ${PX4_BINARY_DIR}/NuttX/apps/include ) - #set(added_exe_linker_flags) - #set(added_link_dirs ${nuttx_export_dir}/libs) - set(added_definitions -D__PX4_NUTTX) + add_definitions( + -D__PX4_NUTTX + -D__DF_NUTTX + ) - list(APPEND added_definitions -D__DF_NUTTX) if("${config_nuttx_hw_stack_check_${BOARD}}" STREQUAL "y") set(instrument_flags @@ -240,7 +241,9 @@ function(px4_os_prebuild_targets) REQUIRED OUT BOARD ARGN ${ARGN}) - add_custom_target(${OUT} DEPENDS nuttx_context uorb_headers) + add_library(${OUT} INTERFACE) + target_link_libraries(${OUT} INTERFACE nuttx_cxx nuttx_c nuttx_fs nuttx_mm nuttx_sched m gcc) + add_dependencies(${OUT} DEPENDS nuttx_context uorb_headers) # parse nuttx config options for cmake file(STRINGS ${PX4_SOURCE_DIR}/platforms/nuttx/nuttx-configs/${BOARD}/nsh/defconfig ConfigContents) @@ -323,4 +326,3 @@ function(px4_nuttx_configure) endif() endfunction() -# vim: set noet fenc=utf-8 ff=unix nowrap: diff --git a/platforms/nuttx/src/px4_layer/CMakeLists.txt b/platforms/nuttx/src/px4_layer/CMakeLists.txt index cda2c1fbca..98f4065751 100644 --- a/platforms/nuttx/src/px4_layer/CMakeLists.txt +++ b/platforms/nuttx/src/px4_layer/CMakeLists.txt @@ -34,12 +34,12 @@ # skip for px4_layer support on an IO board if (NOT ${BOARD} MATCHES "px4io") - px4_add_module( - MODULE platform_px4_layer - SRCS - px4_nuttx_tasks.c - px4_nuttx_impl.cpp - DEPENDS - prebuild_targets - ) + add_library(px4_layer + px4_nuttx_tasks.c + px4_nuttx_impl.cpp + ) + target_link_libraries(px4_layer PRIVATE nuttx_sched drivers_boards_common_arch) +else() + add_library(px4_layer ${PX4_SOURCE_DIR}/src/platforms/empty.c) endif() +add_dependencies(px4_layer prebuild_targets) diff --git a/platforms/posix/CMakeLists.txt b/platforms/posix/CMakeLists.txt index 3f14234ac9..18dc510ca2 100644 --- a/platforms/posix/CMakeLists.txt +++ b/platforms/posix/CMakeLists.txt @@ -3,7 +3,7 @@ add_subdirectory(src) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -get_property(module_libraries GLOBAL PROPERTY PX4_LIBRARIES) +get_property(module_libraries GLOBAL PROPERTY PX4_MODULE_LIBRARIES) px4_posix_generate_builtin_commands( OUT apps @@ -46,23 +46,19 @@ else() apps.cpp ) - if (APPLE) - target_link_libraries(px4 + target_link_libraries(px4 + PRIVATE ${module_libraries} df_driver_framework ${df_driver_libs} pthread m - ) - else() - target_link_libraries(px4 - -Wl,--start-group - ${module_libraries} - df_driver_framework - ${df_driver_libs} - pthread m rt - -Wl,--end-group - ) + ) + + if (NOT APPLE) + target_link_libraries(px4 PRIVATE rt) endif() + + target_link_libraries(px4 PRIVATE modules__uORB) endif() if ("${BOARD}" STREQUAL "rpi") @@ -99,5 +95,3 @@ endif() install(TARGETS px4 DESTINATION ${CMAKE_INSTALL_BINDIR}) install(DIRECTORY ${PROJECT_SOURCE_DIR}/ROMFS DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) - - diff --git a/platforms/posix/cmake/px4_impl_os.cmake b/platforms/posix/cmake/px4_impl_os.cmake index ea8e3b8b52..63f8c94c43 100644 --- a/platforms/posix/cmake/px4_impl_os.cmake +++ b/platforms/posix/cmake/px4_impl_os.cmake @@ -164,21 +164,19 @@ function(px4_os_add_flags) LINK_DIRS ${LINK_DIRS} DEFINITIONS ${DEFINITIONS}) - set(added_include_dirs - platforms/posix/include - ) - - # This block sets added_definitions and added_cxx_flags. set(added_c_flags) set(added_cxx_flags) set(added_exe_linker_flags) - set(added_definitions + + add_definitions( -D__PX4_POSIX -Dnoreturn_function=__attribute__\(\(noreturn\)\) ) + + include_directories(platforms/posix/include) if(UNIX AND APPLE) - list(APPEND added_definitions + add_definitions( -D__PX4_DARWIN -D__DF_DARWIN ) @@ -191,7 +189,7 @@ function(px4_os_add_flags) STRING(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) # message(STATUS "PX4 Darwin Version: ${DARWIN_VERSION}") if (DARWIN_VERSION LESS 16) - list(APPEND added_definitions + add_definitions( -DCLOCK_MONOTONIC=1 -DCLOCK_REALTIME=0 -D__PX4_APPLE_LEGACY @@ -199,14 +197,14 @@ function(px4_os_add_flags) endif() elseif(CYGWIN) - list(APPEND added_definitions + add_definitions( -D__PX4_CYGWIN -D_GNU_SOURCE -D__USE_LINUX_IOCTL_DEFS -U __CUSTOM_FILE_IO__ ) else() - list(APPEND added_definitions + add_definitions( -D__PX4_LINUX -D__DF_LINUX ) @@ -316,5 +314,6 @@ function(px4_os_prebuild_targets) REQUIRED OUT BOARD ARGN ${ARGN}) - add_custom_target(${OUT} DEPENDS uorb_headers) + add_library(${OUT} INTERFACE) + add_dependencies(${OUT} DEPENDS uorb_headers) endfunction() diff --git a/platforms/posix/src/px4_layer/CMakeLists.txt b/platforms/posix/src/px4_layer/CMakeLists.txt index 6dadaa1e74..cf566b52b0 100644 --- a/platforms/posix/src/px4_layer/CMakeLists.txt +++ b/platforms/posix/src/px4_layer/CMakeLists.txt @@ -45,17 +45,16 @@ if("${CONFIG_SHMEM}" STREQUAL "1") set(EXTRA_DEPENDS generate_px4muorb_stubs) endif() -px4_add_module( - MODULE platforms__posix__px4_layer - COMPILE_FLAGS - SRCS - px4_posix_impl.cpp - px4_posix_tasks.cpp - px4_sem.cpp - lib_crc32.c - drv_hrt.c - ${SHMEM_SRCS} - DEPENDS - platforms__common - ${EXTRA_DEPENDS} - ) +add_library(px4_layer + px4_posix_impl.cpp + px4_posix_tasks.cpp + px4_sem.cpp + lib_crc32.c + drv_hrt.c + ${SHMEM_SRCS} +) +target_link_libraries(px4_layer PRIVATE work_queue) + +if (EXTRA_DEPENDS) + add_dependencies(px4_layer ${EXTRA_DEPENDS}) +endif() diff --git a/platforms/posix/src/px4_layer/px4_posix_impl.cpp b/platforms/posix/src/px4_layer/px4_posix_impl.cpp index 90dc3630be..852dd12151 100644 --- a/platforms/posix/src/px4_layer/px4_posix_impl.cpp +++ b/platforms/posix/src/px4_layer/px4_posix_impl.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include "hrt_work.h" #include #include "px4_time.h" diff --git a/platforms/posix/src/px4_layer/shmem_posix.c b/platforms/posix/src/px4_layer/shmem_posix.c index 5811d89115..d59a9c8916 100644 --- a/platforms/posix/src/px4_layer/shmem_posix.c +++ b/platforms/posix/src/px4_layer/shmem_posix.c @@ -48,7 +48,7 @@ #include #include -#include "systemlib/param/param.h" +#include #include #include "px4muorb.h" diff --git a/platforms/qurt/CMakeLists.txt b/platforms/qurt/CMakeLists.txt index b346f87b09..2cf9acc0bc 100644 --- a/platforms/qurt/CMakeLists.txt +++ b/platforms/qurt/CMakeLists.txt @@ -10,33 +10,31 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes") -get_property(module_libraries GLOBAL PROPERTY PX4_LIBRARIES) +get_property(module_libraries GLOBAL PROPERTY PX4_MODULE_LIBRARIES) px4_qurt_generate_builtin_commands( OUT ${PX4_BINARY_DIR}/apps - MODULE_LIST ${module_libraries}) + MODULE_LIST ${module_libraries} +) FASTRPC_STUB_GEN(px4muorb.idl) # Enable build without HexagonSDK to check link dependencies if ("${QURT_ENABLE_STUBS}" STREQUAL "1") + add_definitions(-D QURT_EXE_BUILD=1) + include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${FASTRPC_DSP_INCLUDES} ) add_executable(px4 - ${PX4_BINARY_DIR}/src/firmware/qurt/px4muorb_skel.c ${PX4_BINARY_DIR}/apps.cpp - ) + ${PX4_BINARY_DIR}/platforms/qurt/px4muorb_skel.c + ) - target_link_libraries(px4 - -Wl,--start-group - ${module_libraries} - ${df_driver_libs} - -Wl,--end-group - ) + target_link_libraries(px4 PRIVATE ${module_libraries} ${df_driver_libs}) else() # Generate the DSP lib and stubs but not the apps side executable # The Apps side executable is generated via the posix_eagle_xxxx target @@ -58,6 +56,6 @@ else() DEPENDS px4 px4muorb_skel COMMENT "uploading px4" USES_TERMINAL - ) - + ) + endif() diff --git a/platforms/qurt/cmake/px4_impl_os.cmake b/platforms/qurt/cmake/px4_impl_os.cmake index 47754c3120..4a4c494e1d 100644 --- a/platforms/qurt/cmake/px4_impl_os.cmake +++ b/platforms/qurt/cmake/px4_impl_os.cmake @@ -162,7 +162,7 @@ function(px4_os_add_flags) DEFINITIONS ${DEFINITIONS}) set(DSPAL_ROOT src/lib/DriverFramework/dspal) - set(added_include_dirs + include_directories( ${DSPAL_ROOT}/include ${DSPAL_ROOT}/mpu_spi/inc ${DSPAL_ROOT}/sys @@ -173,7 +173,7 @@ function(px4_os_add_flags) platforms/qurt/include ) - set(added_definitions + add_definitions( -D__DF_QURT # For DriverFramework -D__PX4_POSIX -D__PX4_QURT @@ -195,8 +195,8 @@ function(px4_os_add_flags) ) # Clear -rdynamic flag which fails for hexagon - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") - set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") + set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) + set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) set(DF_TARGET "qurt" PARENT_SCOPE) @@ -238,8 +238,6 @@ function(px4_os_prebuild_targets) REQUIRED OUT BOARD ARGN ${ARGN}) - add_custom_target(${OUT} DEPENDS git_driverframework uorb_headers) - + add_library(${OUT} INTERFACE) + add_dependencies(${OUT} DEPENDS uorb_headers) endfunction() - -# vim: set noet fenc=utf-8 ff=unix nowrap: diff --git a/platforms/qurt/src/px4_layer/CMakeLists.txt b/platforms/qurt/src/px4_layer/CMakeLists.txt index b7cf471c94..85357fee4a 100644 --- a/platforms/qurt/src/px4_layer/CMakeLists.txt +++ b/platforms/qurt/src/px4_layer/CMakeLists.txt @@ -30,6 +30,7 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon") include(hexagon_sdk) @@ -52,12 +53,8 @@ if ("${QURT_ENABLE_STUBS}" STREQUAL "1") ) endif() -px4_add_module( - MODULE platforms_px4_layer - COMPILE_FLAGS - SRCS - ${QURT_LAYER_SRCS} - ${CONFIG_SRC} - DEPENDS - platforms__common - ) +add_library(px4_layer + ${QURT_LAYER_SRCS} + ${CONFIG_SRC} +) +add_dependencies(px4_layer uorb_msgs) # dataman requires mission diff --git a/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp b/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp index 6d9054e031..44a1dc6519 100644 --- a/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp +++ b/platforms/qurt/src/px4_layer/px4_qurt_impl.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "hrt_work.h" #include "px4_log.h" diff --git a/platforms/qurt/src/px4_layer/shmem_qurt.c b/platforms/qurt/src/px4_layer/shmem_qurt.c index af62109712..e4eb4edc4c 100644 --- a/platforms/qurt/src/px4_layer/shmem_qurt.c +++ b/platforms/qurt/src/px4_layer/shmem_qurt.c @@ -41,7 +41,7 @@ #include #include -#include "systemlib/param/param.h" +#include #include #include diff --git a/src/drivers/aerofc_adc/CMakeLists.txt b/src/drivers/aerofc_adc/CMakeLists.txt index 4b1a6cd2ae..c3e745c6f6 100644 --- a/src/drivers/aerofc_adc/CMakeLists.txt +++ b/src/drivers/aerofc_adc/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( SRCS aerofc_adc.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/barometer/bmp280/CMakeLists.txt b/src/drivers/barometer/bmp280/CMakeLists.txt index 06178f61d4..c6f2dd4ee1 100644 --- a/src/drivers/barometer/bmp280/CMakeLists.txt +++ b/src/drivers/barometer/bmp280/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( bmp280_i2c.cpp bmp280.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/barometer/bmp280/bmp280.cpp b/src/drivers/barometer/bmp280/bmp280.cpp index cdd38aa4d5..bedb30cf54 100644 --- a/src/drivers/barometer/bmp280/bmp280.cpp +++ b/src/drivers/barometer/bmp280/bmp280.cpp @@ -66,7 +66,7 @@ #include #include -#include +#include #include diff --git a/src/drivers/barometer/lps25h/CMakeLists.txt b/src/drivers/barometer/lps25h/CMakeLists.txt index 75fe641bb5..9fab6f8b50 100644 --- a/src/drivers/barometer/lps25h/CMakeLists.txt +++ b/src/drivers/barometer/lps25h/CMakeLists.txt @@ -41,6 +41,5 @@ px4_add_module( lps25h_spi.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/barometer/lps25h/lps25h.cpp b/src/drivers/barometer/lps25h/lps25h.cpp index 3a0438b7d0..e7afc3e623 100644 --- a/src/drivers/barometer/lps25h/lps25h.cpp +++ b/src/drivers/barometer/lps25h/lps25h.cpp @@ -60,7 +60,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/barometer/mpl3115a2/CMakeLists.txt b/src/drivers/barometer/mpl3115a2/CMakeLists.txt index 43480945c7..ace4c7273a 100644 --- a/src/drivers/barometer/mpl3115a2/CMakeLists.txt +++ b/src/drivers/barometer/mpl3115a2/CMakeLists.txt @@ -42,6 +42,5 @@ px4_add_module( COMPILE_FLAGS SRCS ${srcs} DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp b/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp index 6307c74793..da4c55ba92 100644 --- a/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp +++ b/src/drivers/barometer/mpl3115a2/mpl3115a2.cpp @@ -70,7 +70,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/barometer/ms5611/CMakeLists.txt b/src/drivers/barometer/ms5611/CMakeLists.txt index 5c6e1559a0..e7ef162869 100644 --- a/src/drivers/barometer/ms5611/CMakeLists.txt +++ b/src/drivers/barometer/ms5611/CMakeLists.txt @@ -43,6 +43,5 @@ px4_add_module( COMPILE_FLAGS SRCS ${srcs} DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/barometer/ms5611/ms5611.cpp b/src/drivers/barometer/ms5611/ms5611.cpp index 8dfa27dc86..a5285e9b6d 100644 --- a/src/drivers/barometer/ms5611/ms5611.cpp +++ b/src/drivers/barometer/ms5611/ms5611.cpp @@ -64,7 +64,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/batt_smbus/CMakeLists.txt b/src/drivers/batt_smbus/CMakeLists.txt index 3bc80cb569..74ebd8c6ec 100644 --- a/src/drivers/batt_smbus/CMakeLists.txt +++ b/src/drivers/batt_smbus/CMakeLists.txt @@ -37,5 +37,4 @@ px4_add_module( SRCS batt_smbus.cpp DEPENDS - platforms__common ) diff --git a/src/drivers/batt_smbus/batt_smbus.cpp b/src/drivers/batt_smbus/batt_smbus.cpp index 25066b6e49..b23923259e 100644 --- a/src/drivers/batt_smbus/batt_smbus.cpp +++ b/src/drivers/batt_smbus/batt_smbus.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/drivers/blinkm/CMakeLists.txt b/src/drivers/blinkm/CMakeLists.txt index 94f7942c5d..67d2d4fca7 100644 --- a/src/drivers/blinkm/CMakeLists.txt +++ b/src/drivers/blinkm/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS blinkm.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/blinkm/blinkm.cpp b/src/drivers/blinkm/blinkm.cpp index afc07becaf..9719abfc02 100644 --- a/src/drivers/blinkm/blinkm.cpp +++ b/src/drivers/blinkm/blinkm.cpp @@ -110,7 +110,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/boards/aerocore2/CMakeLists.txt b/src/drivers/boards/aerocore2/CMakeLists.txt index 264812f312..93fb657702 100644 --- a/src/drivers/boards/aerocore2/CMakeLists.txt +++ b/src/drivers/boards/aerocore2/CMakeLists.txt @@ -39,3 +39,11 @@ px4_add_library(drivers_board timer_config.c usb.c ) +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/aerocore2/init.c b/src/drivers/boards/aerocore2/init.c index fe41c86e3a..6e0427d405 100644 --- a/src/drivers/boards/aerocore2/init.c +++ b/src/drivers/boards/aerocore2/init.c @@ -69,10 +69,10 @@ #include #include -#include +#include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/aerofc-v1/CMakeLists.txt b/src/drivers/boards/aerofc-v1/CMakeLists.txt index 63c61dc049..c0ca8bf5d6 100644 --- a/src/drivers/boards/aerofc-v1/CMakeLists.txt +++ b/src/drivers/boards/aerofc-v1/CMakeLists.txt @@ -38,3 +38,10 @@ px4_add_library(drivers_board spi.c timer_config.c ) +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + parameters # param_init + modules__dataman # dm_flash_sector_description_set +) diff --git a/src/drivers/boards/aerofc-v1/init.c b/src/drivers/boards/aerofc-v1/init.c index 0bc8e8b83e..5412e76d53 100644 --- a/src/drivers/boards/aerofc-v1/init.c +++ b/src/drivers/boards/aerofc-v1/init.c @@ -74,10 +74,10 @@ #include #include #include -#include +#include # if defined(FLASH_BASED_PARAMS) -# include +# include #endif /**************************************************************************** diff --git a/src/drivers/boards/auav-x21/CMakeLists.txt b/src/drivers/boards/auav-x21/CMakeLists.txt index 264812f312..93fb657702 100644 --- a/src/drivers/boards/auav-x21/CMakeLists.txt +++ b/src/drivers/boards/auav-x21/CMakeLists.txt @@ -39,3 +39,11 @@ px4_add_library(drivers_board timer_config.c usb.c ) +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/auav-x21/init.c b/src/drivers/boards/auav-x21/init.c index 99419823fe..b1a3f4490a 100644 --- a/src/drivers/boards/auav-x21/init.c +++ b/src/drivers/boards/auav-x21/init.c @@ -73,13 +73,13 @@ #include #include -#include +#include #include #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/bebop/CMakeLists.txt b/src/drivers/boards/bebop/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/drivers/boards/common/CMakeLists.txt b/src/drivers/boards/common/CMakeLists.txt index c274797710..ce63d8d4eb 100644 --- a/src/drivers/boards/common/CMakeLists.txt +++ b/src/drivers/boards/common/CMakeLists.txt @@ -31,13 +31,14 @@ # ############################################################################ -if (${OS} MATCHES "nuttx") - px4_add_library(boards_common +# common board drivers (currently only for nuttx fmu boards) +if (${OS} MATCHES "nuttx" AND NOT ${BOARD} MATCHES "io") + + px4_add_library(drivers_boards_common board_crashdump.c board_dma_alloc.c board_gpio_init.c ) - add_dependencies(boards_common nuttx_build) if (${CONFIG_ARCH_CHIP} MATCHES "kinetis") add_subdirectory(kinetis) @@ -46,4 +47,16 @@ if (${OS} MATCHES "nuttx") elseif (${CONFIG_ARCH_CHIP} MATCHES "stm32") add_subdirectory(stm32) endif() -endif() \ No newline at end of file + + target_link_libraries(drivers_boards_common + PRIVATE + drivers_boards_common_arch + nuttx_arch # bbsram + nuttx_mm # dma gran alloc + systemlib + ) + +else() + add_library(drivers_boards_common INTERFACE) + add_library(drivers_boards_common_arch INTERFACE) +endif() diff --git a/src/drivers/boards/common/board_dma_alloc.c b/src/drivers/boards/common/board_dma_alloc.c index c0f90fb89c..c7547be99e 100644 --- a/src/drivers/boards/common/board_dma_alloc.c +++ b/src/drivers/boards/common/board_dma_alloc.c @@ -48,7 +48,7 @@ #include #include -#include +#include /************************************************************************************ * Definitions diff --git a/src/drivers/boards/common/kinetis/CMakeLists.txt b/src/drivers/boards/common/kinetis/CMakeLists.txt index 0c477acf1d..a3759bb5cc 100644 --- a/src/drivers/boards/common/kinetis/CMakeLists.txt +++ b/src/drivers/boards/common/kinetis/CMakeLists.txt @@ -31,9 +31,10 @@ # ############################################################################ -px4_add_library(board_kinetis +add_library(drivers_boards_common_arch board_identity.c board_mcu_version.c board_reset.c ) -add_dependencies(board_kinetis nuttx_build) \ No newline at end of file +add_dependencies(drivers_boards_common_arch prebuild_targets) +target_link_libraries(drivers_boards_common_arch PRIVATE nuttx_arch) diff --git a/src/drivers/boards/common/samv7/CMakeLists.txt b/src/drivers/boards/common/samv7/CMakeLists.txt index e98b8ab874..9c94c77c7b 100644 --- a/src/drivers/boards/common/samv7/CMakeLists.txt +++ b/src/drivers/boards/common/samv7/CMakeLists.txt @@ -31,9 +31,10 @@ # ############################################################################ -px4_add_library(board_samv7 +add_library(drivers_boards_common_arch board_identity.c board_mcu_version.c board_reset.c - ) -add_dependencies(board_samv7 nuttx_build) \ No newline at end of file +) +add_dependencies(drivers_boards_common_arch prebuild_targets) +target_link_libraries(drivers_boards_common_arch PRIVATE nuttx_arch) diff --git a/src/drivers/boards/common/stm32/CMakeLists.txt b/src/drivers/boards/common/stm32/CMakeLists.txt index 861c4b81df..088003db7b 100644 --- a/src/drivers/boards/common/stm32/CMakeLists.txt +++ b/src/drivers/boards/common/stm32/CMakeLists.txt @@ -43,5 +43,6 @@ if (NOT ${LABEL} STREQUAL "bootloader") ) endif() -px4_add_library(board_stm32 ${SRCS}) -add_dependencies(board_stm32 nuttx_build) \ No newline at end of file +add_library(drivers_boards_common_arch ${SRCS}) +add_dependencies(drivers_boards_common_arch prebuild_targets) +target_link_libraries(drivers_boards_common_arch PRIVATE nuttx_arch) diff --git a/src/drivers/boards/common/stm32/board_reset.c b/src/drivers/boards/common/stm32/board_reset.c index a8e0dc0a12..cb5355ee9c 100644 --- a/src/drivers/boards/common/stm32/board_reset.c +++ b/src/drivers/boards/common/stm32/board_reset.c @@ -79,7 +79,10 @@ void board_system_reset(int status) #if defined(BOARD_HAS_ON_RESET) board_on_reset(status); #endif + +#ifdef CONFIG_BOARDCTL_RESET board_reset(status); +#endif while (1); } diff --git a/src/drivers/boards/crazyflie/CMakeLists.txt b/src/drivers/boards/crazyflie/CMakeLists.txt index 27101c7b71..4b64e6e1b4 100644 --- a/src/drivers/boards/crazyflie/CMakeLists.txt +++ b/src/drivers/boards/crazyflie/CMakeLists.txt @@ -37,3 +37,9 @@ px4_add_library(drivers_board timer_config.c usb.c ) +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + parameters # param_init +) diff --git a/src/drivers/boards/crazyflie/init.c b/src/drivers/boards/crazyflie/init.c index a2afd3ef5a..7a51ce6f74 100644 --- a/src/drivers/boards/crazyflie/init.c +++ b/src/drivers/boards/crazyflie/init.c @@ -71,7 +71,7 @@ #include #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/eagle/CMakeLists.txt b/src/drivers/boards/eagle/CMakeLists.txt index b6ea65a1fd..f5d0da302b 100644 --- a/src/drivers/boards/eagle/CMakeLists.txt +++ b/src/drivers/boards/eagle/CMakeLists.txt @@ -30,12 +30,5 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE drivers__boards__sitl - COMPILE_FLAGS - SRCS - sitl_led.c - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(drivers_board sitl_led.c) diff --git a/src/drivers/boards/esc35-v1/CMakeLists.txt b/src/drivers/boards/esc35-v1/CMakeLists.txt index 7b97686e5d..0a54e8eab5 100644 --- a/src/drivers/boards/esc35-v1/CMakeLists.txt +++ b/src/drivers/boards/esc35-v1/CMakeLists.txt @@ -40,3 +40,8 @@ px4_add_library(drivers_board led.c usb.c ) +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + parameters # param_init +) diff --git a/src/drivers/boards/esc35-v1/init.c b/src/drivers/boards/esc35-v1/init.c index e06683e642..15bce9f6c6 100644 --- a/src/drivers/boards/esc35-v1/init.c +++ b/src/drivers/boards/esc35-v1/init.c @@ -69,14 +69,14 @@ #include #include -#include +#include #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) #include #endif -#if defined(FLASH_BASED_PARAMS) -# include +# if defined(FLASH_BASED_PARAMS) +# include #endif #include "board_config.h" diff --git a/src/drivers/boards/mindpx-v2/CMakeLists.txt b/src/drivers/boards/mindpx-v2/CMakeLists.txt index 264812f312..80cdd8bd7a 100644 --- a/src/drivers/boards/mindpx-v2/CMakeLists.txt +++ b/src/drivers/boards/mindpx-v2/CMakeLists.txt @@ -39,3 +39,12 @@ px4_add_library(drivers_board timer_config.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/mindpx-v2/init.c b/src/drivers/boards/mindpx-v2/init.c index db84649037..5291c7f670 100644 --- a/src/drivers/boards/mindpx-v2/init.c +++ b/src/drivers/boards/mindpx-v2/init.c @@ -74,12 +74,12 @@ #include #include -#include +#include #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/nxphlite-v3/CMakeLists.txt b/src/drivers/boards/nxphlite-v3/CMakeLists.txt index e32742c0f2..1caf862cd2 100644 --- a/src/drivers/boards/nxphlite-v3/CMakeLists.txt +++ b/src/drivers/boards/nxphlite-v3/CMakeLists.txt @@ -42,3 +42,12 @@ px4_add_library(drivers_board timer_config.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + drivers__led # drv_led_start + parameters # param_init + ) \ No newline at end of file diff --git a/src/drivers/boards/nxphlite-v3/init.c b/src/drivers/boards/nxphlite-v3/init.c index 12dc4a689f..ed58b3247d 100644 --- a/src/drivers/boards/nxphlite-v3/init.c +++ b/src/drivers/boards/nxphlite-v3/init.c @@ -73,7 +73,7 @@ #include #include -#include +#include #include #if defined(CONFIG_KINETIS_BBSRAM) //fixme:Need BBSRAM diff --git a/src/drivers/boards/ocpoc/CMakeLists.txt b/src/drivers/boards/ocpoc/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/drivers/boards/px4-same70xplained-v1/CMakeLists.txt b/src/drivers/boards/px4-same70xplained-v1/CMakeLists.txt index 17c350195f..4748379aea 100644 --- a/src/drivers/boards/px4-same70xplained-v1/CMakeLists.txt +++ b/src/drivers/boards/px4-same70xplained-v1/CMakeLists.txt @@ -40,3 +40,12 @@ px4_add_library(drivers_board timer_config.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/px4-same70xplained-v1/init.c b/src/drivers/boards/px4-same70xplained-v1/init.c index 4968c00279..a043cddc6d 100644 --- a/src/drivers/boards/px4-same70xplained-v1/init.c +++ b/src/drivers/boards/px4-same70xplained-v1/init.c @@ -75,13 +75,13 @@ #include #include -#include +#include #include #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/px4-stm32f4discovery/CMakeLists.txt b/src/drivers/boards/px4-stm32f4discovery/CMakeLists.txt index 84d50d9774..ad53ed10d7 100644 --- a/src/drivers/boards/px4-stm32f4discovery/CMakeLists.txt +++ b/src/drivers/boards/px4-stm32f4discovery/CMakeLists.txt @@ -36,3 +36,12 @@ px4_add_library(drivers_board led.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + drivers__led # drv_led_start + parameters # param_init + ) diff --git a/src/drivers/boards/px4-stm32f4discovery/init.c b/src/drivers/boards/px4-stm32f4discovery/init.c index a8e74ba544..62234feb41 100644 --- a/src/drivers/boards/px4-stm32f4discovery/init.c +++ b/src/drivers/boards/px4-stm32f4discovery/init.c @@ -71,8 +71,8 @@ #include #include -#include -#include +#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/px4cannode-v1/CMakeLists.txt b/src/drivers/boards/px4cannode-v1/CMakeLists.txt index 5b685108b7..2fe828c7f0 100644 --- a/src/drivers/boards/px4cannode-v1/CMakeLists.txt +++ b/src/drivers/boards/px4cannode-v1/CMakeLists.txt @@ -38,3 +38,12 @@ px4_add_library(drivers_board led.c spi.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + drivers__led # drv_led_start + parameters # param_init + ) diff --git a/src/drivers/boards/px4cannode-v1/init.c b/src/drivers/boards/px4cannode-v1/init.c index bcb7ff55da..28a31ba540 100644 --- a/src/drivers/boards/px4cannode-v1/init.c +++ b/src/drivers/boards/px4cannode-v1/init.c @@ -69,7 +69,7 @@ #include #include -#include +#include #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) #include diff --git a/src/drivers/boards/px4esc-v1/CMakeLists.txt b/src/drivers/boards/px4esc-v1/CMakeLists.txt index 84d50d9774..5de38c9850 100644 --- a/src/drivers/boards/px4esc-v1/CMakeLists.txt +++ b/src/drivers/boards/px4esc-v1/CMakeLists.txt @@ -36,3 +36,10 @@ px4_add_library(drivers_board led.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + drivers__led # drv_led_start + parameters # param_init + ) diff --git a/src/drivers/boards/px4esc-v1/init.c b/src/drivers/boards/px4esc-v1/init.c index a7bcbc6e57..ff443ced2a 100644 --- a/src/drivers/boards/px4esc-v1/init.c +++ b/src/drivers/boards/px4esc-v1/init.c @@ -69,14 +69,14 @@ #include #include -#include +#include #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) #include #endif -#if defined(FLASH_BASED_PARAMS) -# include +# if defined(FLASH_BASED_PARAMS) +# include #endif #include "board_config.h" diff --git a/src/drivers/boards/px4fmu-v2/CMakeLists.txt b/src/drivers/boards/px4fmu-v2/CMakeLists.txt index 9bc94939cd..cb645d22b1 100644 --- a/src/drivers/boards/px4fmu-v2/CMakeLists.txt +++ b/src/drivers/boards/px4fmu-v2/CMakeLists.txt @@ -40,3 +40,12 @@ px4_add_library(drivers_board timer_config.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/px4fmu-v2/init.c b/src/drivers/boards/px4fmu-v2/init.c index 5c24188593..65a8108cd4 100644 --- a/src/drivers/boards/px4fmu-v2/init.c +++ b/src/drivers/boards/px4fmu-v2/init.c @@ -73,13 +73,13 @@ #include #include -#include +#include #include #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/px4fmu-v4/CMakeLists.txt b/src/drivers/boards/px4fmu-v4/CMakeLists.txt index 264812f312..80cdd8bd7a 100644 --- a/src/drivers/boards/px4fmu-v4/CMakeLists.txt +++ b/src/drivers/boards/px4fmu-v4/CMakeLists.txt @@ -39,3 +39,12 @@ px4_add_library(drivers_board timer_config.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/px4fmu-v4/init.c b/src/drivers/boards/px4fmu-v4/init.c index b7171e291c..78f79431ad 100644 --- a/src/drivers/boards/px4fmu-v4/init.c +++ b/src/drivers/boards/px4fmu-v4/init.c @@ -74,13 +74,13 @@ #include #include -#include +#include #include #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/px4fmu-v4pro/CMakeLists.txt b/src/drivers/boards/px4fmu-v4pro/CMakeLists.txt index 264812f312..93fb657702 100644 --- a/src/drivers/boards/px4fmu-v4pro/CMakeLists.txt +++ b/src/drivers/boards/px4fmu-v4pro/CMakeLists.txt @@ -39,3 +39,11 @@ px4_add_library(drivers_board timer_config.c usb.c ) +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/px4fmu-v4pro/init.c b/src/drivers/boards/px4fmu-v4pro/init.c index 8d19701f87..0df6f3414b 100644 --- a/src/drivers/boards/px4fmu-v4pro/init.c +++ b/src/drivers/boards/px4fmu-v4pro/init.c @@ -74,13 +74,13 @@ #include #include -#include +#include #include #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions diff --git a/src/drivers/boards/px4fmu-v5/CMakeLists.txt b/src/drivers/boards/px4fmu-v5/CMakeLists.txt index e3b8d40f91..111fa9b021 100644 --- a/src/drivers/boards/px4fmu-v5/CMakeLists.txt +++ b/src/drivers/boards/px4fmu-v5/CMakeLists.txt @@ -40,3 +40,11 @@ px4_add_library(drivers_board timer_config.c usb.c ) +target_link_libraries(drivers_board + PRIVATE + drivers__led # drv_led_start + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + parameters # param_init +) diff --git a/src/drivers/boards/px4fmu-v5/init.c b/src/drivers/boards/px4fmu-v5/init.c index c500a01e96..58668fe47d 100644 --- a/src/drivers/boards/px4fmu-v5/init.c +++ b/src/drivers/boards/px4fmu-v5/init.c @@ -76,13 +76,13 @@ #include #include -#include +#include #include #include #include -#include +#include #include "up_internal.h" /**************************************************************************** diff --git a/src/drivers/boards/px4nucleoF767ZI-v1/CMakeLists.txt b/src/drivers/boards/px4nucleoF767ZI-v1/CMakeLists.txt index 0d2694d635..23cd00ee46 100644 --- a/src/drivers/boards/px4nucleoF767ZI-v1/CMakeLists.txt +++ b/src/drivers/boards/px4nucleoF767ZI-v1/CMakeLists.txt @@ -40,3 +40,12 @@ px4_add_library(drivers_board timer_config.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + drivers__led # drv_led_start + parameters # param_init + ) diff --git a/src/drivers/boards/px4nucleoF767ZI-v1/init.c b/src/drivers/boards/px4nucleoF767ZI-v1/init.c index 3fd13eb72f..41a724c4f7 100644 --- a/src/drivers/boards/px4nucleoF767ZI-v1/init.c +++ b/src/drivers/boards/px4nucleoF767ZI-v1/init.c @@ -74,13 +74,13 @@ #include #include -#include +#include #include #include #include -#include +#include #include "up_internal.h" /**************************************************************************** diff --git a/src/drivers/boards/rpi/CMakeLists.txt b/src/drivers/boards/rpi/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/drivers/boards/s2740vc-v1/CMakeLists.txt b/src/drivers/boards/s2740vc-v1/CMakeLists.txt index c9bbf7bde7..a2010e27ed 100644 --- a/src/drivers/boards/s2740vc-v1/CMakeLists.txt +++ b/src/drivers/boards/s2740vc-v1/CMakeLists.txt @@ -39,3 +39,9 @@ px4_add_library(drivers_board can.c init.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + drivers_arch +) diff --git a/src/drivers/boards/s2740vc-v1/init.c b/src/drivers/boards/s2740vc-v1/init.c index e990a79ca1..3c5a6f5ecb 100644 --- a/src/drivers/boards/s2740vc-v1/init.c +++ b/src/drivers/boards/s2740vc-v1/init.c @@ -69,7 +69,7 @@ #include #include -#include +#include #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) #include diff --git a/src/drivers/boards/sitl/CMakeLists.txt b/src/drivers/boards/sitl/CMakeLists.txt index b6ea65a1fd..f5d0da302b 100644 --- a/src/drivers/boards/sitl/CMakeLists.txt +++ b/src/drivers/boards/sitl/CMakeLists.txt @@ -30,12 +30,5 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE drivers__boards__sitl - COMPILE_FLAGS - SRCS - sitl_led.c - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(drivers_board sitl_led.c) diff --git a/src/drivers/boards/tap-v1/CMakeLists.txt b/src/drivers/boards/tap-v1/CMakeLists.txt index 5cef720ee8..8e853e5373 100644 --- a/src/drivers/boards/tap-v1/CMakeLists.txt +++ b/src/drivers/boards/tap-v1/CMakeLists.txt @@ -41,3 +41,12 @@ px4_add_library(drivers_board timer_config.c usb.c ) + +target_link_libraries(drivers_board + PRIVATE + nuttx_apps # up_cxxinitialize + nuttx_arch # sdio + nuttx_drivers # sdio + drivers__led # drv_led_start + parameters # param_init + ) diff --git a/src/drivers/boards/tap-v1/init.c b/src/drivers/boards/tap-v1/init.c index c768cb1b7b..28f03c66d0 100644 --- a/src/drivers/boards/tap-v1/init.c +++ b/src/drivers/boards/tap-v1/init.c @@ -72,13 +72,12 @@ #include #include #include -#include +#include # if defined(FLASH_BASED_PARAMS) -# include +# include #endif - /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ diff --git a/src/drivers/bootloaders/CMakeLists.txt b/src/drivers/bootloaders/CMakeLists.txt index 2cfce3486d..7d8909c8e3 100644 --- a/src/drivers/bootloaders/CMakeLists.txt +++ b/src/drivers/bootloaders/CMakeLists.txt @@ -31,10 +31,9 @@ # ############################################################################ -px4_add_library(drivers_bootloaders - boot_app_shared.c - ) -add_dependencies(drivers_bootloaders platforms__common) +add_library(drivers_bootloaders boot_app_shared.c) +add_dependencies(drivers_bootloaders prebuild_targets) include_directories(include) -target_include_directories(drivers_bootloaders INTERFACE include) +target_include_directories(drivers_bootloaders INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(drivers_bootloaders PRIVATE systemlib) \ No newline at end of file diff --git a/src/drivers/camera_trigger/CMakeLists.txt b/src/drivers/camera_trigger/CMakeLists.txt index 4a886d5663..ff9bbe487b 100644 --- a/src/drivers/camera_trigger/CMakeLists.txt +++ b/src/drivers/camera_trigger/CMakeLists.txt @@ -42,6 +42,5 @@ px4_add_module( interfaces/src/seagull_map2.cpp interfaces/src/gpio.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/camera_trigger/camera_trigger.cpp b/src/drivers/camera_trigger/camera_trigger.cpp index a61b50f5e8..195c7e0ee2 100644 --- a/src/drivers/camera_trigger/camera_trigger.cpp +++ b/src/drivers/camera_trigger/camera_trigger.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/drivers/camera_trigger/interfaces/src/camera_interface.h b/src/drivers/camera_trigger/interfaces/src/camera_interface.h index 8759b917fe..f1dda66802 100644 --- a/src/drivers/camera_trigger/interfaces/src/camera_interface.h +++ b/src/drivers/camera_trigger/interfaces/src/camera_interface.h @@ -4,7 +4,7 @@ #pragma once -#include +#include #include #define arraySize(a) (sizeof((a))/sizeof(((a)[0]))) diff --git a/src/drivers/camera_trigger/interfaces/src/pwm.h b/src/drivers/camera_trigger/interfaces/src/pwm.h index b54657d9aa..e008466756 100644 --- a/src/drivers/camera_trigger/interfaces/src/pwm.h +++ b/src/drivers/camera_trigger/interfaces/src/pwm.h @@ -9,7 +9,7 @@ #ifdef __PX4_NUTTX #include -#include +#include #include #include "camera_interface.h" diff --git a/src/drivers/differential_pressure/ets/CMakeLists.txt b/src/drivers/differential_pressure/ets/CMakeLists.txt index 9055085f00..cbe53b9490 100644 --- a/src/drivers/differential_pressure/ets/CMakeLists.txt +++ b/src/drivers/differential_pressure/ets/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS ets_airspeed.cpp DEPENDS - platforms__common + drivers__airspeed ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/differential_pressure/ets/ets_airspeed.cpp b/src/drivers/differential_pressure/ets/ets_airspeed.cpp index 8bbef362ef..3f05c60026 100644 --- a/src/drivers/differential_pressure/ets/ets_airspeed.cpp +++ b/src/drivers/differential_pressure/ets/ets_airspeed.cpp @@ -44,8 +44,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/src/drivers/differential_pressure/ms4525/CMakeLists.txt b/src/drivers/differential_pressure/ms4525/CMakeLists.txt index e491343f1c..bb7b5c847f 100644 --- a/src/drivers/differential_pressure/ms4525/CMakeLists.txt +++ b/src/drivers/differential_pressure/ms4525/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS ms4525_airspeed.cpp DEPENDS - platforms__common + drivers__airspeed ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/differential_pressure/ms4525/ms4525_airspeed.cpp b/src/drivers/differential_pressure/ms4525/ms4525_airspeed.cpp index 7f1142552a..3c087a6001 100644 --- a/src/drivers/differential_pressure/ms4525/ms4525_airspeed.cpp +++ b/src/drivers/differential_pressure/ms4525/ms4525_airspeed.cpp @@ -55,8 +55,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/src/drivers/differential_pressure/ms5525/CMakeLists.txt b/src/drivers/differential_pressure/ms5525/CMakeLists.txt index 1ed4ca661f..1e90ef4b67 100644 --- a/src/drivers/differential_pressure/ms5525/CMakeLists.txt +++ b/src/drivers/differential_pressure/ms5525/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( MS5525.cpp MS5525_main.cpp DEPENDS - platforms__common + drivers__airspeed ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/differential_pressure/ms5525/MS5525.hpp b/src/drivers/differential_pressure/ms5525/MS5525.hpp index 325b9a5ae6..96a1022aed 100644 --- a/src/drivers/differential_pressure/ms5525/MS5525.hpp +++ b/src/drivers/differential_pressure/ms5525/MS5525.hpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/drivers/differential_pressure/sdp3x/CMakeLists.txt b/src/drivers/differential_pressure/sdp3x/CMakeLists.txt index f67ec91802..bca086dbea 100644 --- a/src/drivers/differential_pressure/sdp3x/CMakeLists.txt +++ b/src/drivers/differential_pressure/sdp3x/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( SDP3X.cpp SDP3X_main.cpp DEPENDS - platforms__common + drivers__airspeed ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/differential_pressure/sdp3x/SDP3X.hpp b/src/drivers/differential_pressure/sdp3x/SDP3X.hpp index 55e2baaddc..4751de3450 100644 --- a/src/drivers/differential_pressure/sdp3x/SDP3X.hpp +++ b/src/drivers/differential_pressure/sdp3x/SDP3X.hpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/hc_sr04/CMakeLists.txt b/src/drivers/distance_sensor/hc_sr04/CMakeLists.txt index 82a3ac142d..2491ea4202 100644 --- a/src/drivers/distance_sensor/hc_sr04/CMakeLists.txt +++ b/src/drivers/distance_sensor/hc_sr04/CMakeLists.txt @@ -39,5 +39,4 @@ px4_add_module( SRCS hc_sr04.cpp DEPENDS - platforms__common ) \ No newline at end of file diff --git a/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp b/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp index 2bc716c2c6..ddc84e6cc0 100644 --- a/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp +++ b/src/drivers/distance_sensor/hc_sr04/hc_sr04.cpp @@ -56,7 +56,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/leddar_one/CMakeLists.txt b/src/drivers/distance_sensor/leddar_one/CMakeLists.txt index 16b4d0bcb7..1b02c17763 100644 --- a/src/drivers/distance_sensor/leddar_one/CMakeLists.txt +++ b/src/drivers/distance_sensor/leddar_one/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( SRCS leddar_one.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/distance_sensor/leddar_one/leddar_one.cpp b/src/drivers/distance_sensor/leddar_one/leddar_one.cpp index d1c4e4424d..d7584c1505 100644 --- a/src/drivers/distance_sensor/leddar_one/leddar_one.cpp +++ b/src/drivers/distance_sensor/leddar_one/leddar_one.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include diff --git a/src/drivers/distance_sensor/ll40ls/CMakeLists.txt b/src/drivers/distance_sensor/ll40ls/CMakeLists.txt index 666b7a1468..7fb19071c5 100644 --- a/src/drivers/distance_sensor/ll40ls/CMakeLists.txt +++ b/src/drivers/distance_sensor/ll40ls/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( LidarLiteI2C.cpp LidarLitePWM.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.h b/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.h index f2252ab19a..bd18d00ec1 100644 --- a/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.h +++ b/src/drivers/distance_sensor/ll40ls/LidarLiteI2C.h @@ -44,7 +44,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/ll40ls/LidarLitePWM.h b/src/drivers/distance_sensor/ll40ls/LidarLitePWM.h index 2d6954b15c..df79d4502c 100644 --- a/src/drivers/distance_sensor/ll40ls/LidarLitePWM.h +++ b/src/drivers/distance_sensor/ll40ls/LidarLitePWM.h @@ -49,7 +49,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/mb12xx/CMakeLists.txt b/src/drivers/distance_sensor/mb12xx/CMakeLists.txt index 2b4e077611..77f1efc171 100644 --- a/src/drivers/distance_sensor/mb12xx/CMakeLists.txt +++ b/src/drivers/distance_sensor/mb12xx/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS mb12xx.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/mb12xx/mb12xx.cpp b/src/drivers/distance_sensor/mb12xx/mb12xx.cpp index c2cde11700..b6719be6ab 100644 --- a/src/drivers/distance_sensor/mb12xx/mb12xx.cpp +++ b/src/drivers/distance_sensor/mb12xx/mb12xx.cpp @@ -59,7 +59,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/sf0x/CMakeLists.txt b/src/drivers/distance_sensor/sf0x/CMakeLists.txt index 195ece8f6a..42583ec15a 100644 --- a/src/drivers/distance_sensor/sf0x/CMakeLists.txt +++ b/src/drivers/distance_sensor/sf0x/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( sf0x.cpp sf0x_parser.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/sf0x/sf0x.cpp b/src/drivers/distance_sensor/sf0x/sf0x.cpp index 9f9f300e55..665e004339 100644 --- a/src/drivers/distance_sensor/sf0x/sf0x.cpp +++ b/src/drivers/distance_sensor/sf0x/sf0x.cpp @@ -57,7 +57,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/sf0x/sf0x_tests/CMakeLists.txt b/src/drivers/distance_sensor/sf0x/sf0x_tests/CMakeLists.txt index 6c6255eab3..6fb9da255e 100644 --- a/src/drivers/distance_sensor/sf0x/sf0x_tests/CMakeLists.txt +++ b/src/drivers/distance_sensor/sf0x/sf0x_tests/CMakeLists.txt @@ -39,5 +39,4 @@ px4_add_module( SF0XTest.cpp ../sf0x_parser.cpp DEPENDS - platforms__common ) diff --git a/src/drivers/distance_sensor/sf1xx/CMakeLists.txt b/src/drivers/distance_sensor/sf1xx/CMakeLists.txt index 2dfa1dfdf1..d722ac31cb 100644 --- a/src/drivers/distance_sensor/sf1xx/CMakeLists.txt +++ b/src/drivers/distance_sensor/sf1xx/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( SRCS sf1xx.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/sf1xx/sf1xx.cpp b/src/drivers/distance_sensor/sf1xx/sf1xx.cpp index 6f8b7e0911..e4156c3c05 100644 --- a/src/drivers/distance_sensor/sf1xx/sf1xx.cpp +++ b/src/drivers/distance_sensor/sf1xx/sf1xx.cpp @@ -62,7 +62,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/srf02/CMakeLists.txt b/src/drivers/distance_sensor/srf02/CMakeLists.txt index 9a85219894..a0cc6e3224 100644 --- a/src/drivers/distance_sensor/srf02/CMakeLists.txt +++ b/src/drivers/distance_sensor/srf02/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS srf02.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/srf02/srf02.cpp b/src/drivers/distance_sensor/srf02/srf02.cpp index 2c7d9ac46c..789c3b24d5 100644 --- a/src/drivers/distance_sensor/srf02/srf02.cpp +++ b/src/drivers/distance_sensor/srf02/srf02.cpp @@ -58,7 +58,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/srf02_i2c/CMakeLists.txt b/src/drivers/distance_sensor/srf02_i2c/CMakeLists.txt index 27b24ad5fa..828b1d3e85 100644 --- a/src/drivers/distance_sensor/srf02_i2c/CMakeLists.txt +++ b/src/drivers/distance_sensor/srf02_i2c/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS srf02_i2c.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/srf02_i2c/srf02_i2c.cpp b/src/drivers/distance_sensor/srf02_i2c/srf02_i2c.cpp index cb7b61f949..c37dbf6948 100644 --- a/src/drivers/distance_sensor/srf02_i2c/srf02_i2c.cpp +++ b/src/drivers/distance_sensor/srf02_i2c/srf02_i2c.cpp @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/teraranger/CMakeLists.txt b/src/drivers/distance_sensor/teraranger/CMakeLists.txt index 37f787772c..3ccf413d45 100644 --- a/src/drivers/distance_sensor/teraranger/CMakeLists.txt +++ b/src/drivers/distance_sensor/teraranger/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( SRCS teraranger.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/teraranger/teraranger.cpp b/src/drivers/distance_sensor/teraranger/teraranger.cpp index fd0ee3a81a..5b23479a80 100644 --- a/src/drivers/distance_sensor/teraranger/teraranger.cpp +++ b/src/drivers/distance_sensor/teraranger/teraranger.cpp @@ -58,7 +58,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/tfmini/CMakeLists.txt b/src/drivers/distance_sensor/tfmini/CMakeLists.txt index 69aebd90f6..6a65c4fb9b 100644 --- a/src/drivers/distance_sensor/tfmini/CMakeLists.txt +++ b/src/drivers/distance_sensor/tfmini/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( tfmini.cpp tfmini_parser.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/tfmini/tfmini.cpp b/src/drivers/distance_sensor/tfmini/tfmini.cpp index 71440b6097..b0fe162fc5 100644 --- a/src/drivers/distance_sensor/tfmini/tfmini.cpp +++ b/src/drivers/distance_sensor/tfmini/tfmini.cpp @@ -59,7 +59,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/distance_sensor/ulanding/CMakeLists.txt b/src/drivers/distance_sensor/ulanding/CMakeLists.txt index 4575df9cf9..77a4be422c 100644 --- a/src/drivers/distance_sensor/ulanding/CMakeLists.txt +++ b/src/drivers/distance_sensor/ulanding/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS ulanding.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/distance_sensor/ulanding/ulanding.cpp b/src/drivers/distance_sensor/ulanding/ulanding.cpp index 9cfb4e606b..90a46a8160 100644 --- a/src/drivers/distance_sensor/ulanding/ulanding.cpp +++ b/src/drivers/distance_sensor/ulanding/ulanding.cpp @@ -56,7 +56,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/drivers/gps/CMakeLists.txt b/src/drivers/gps/CMakeLists.txt index b027f163e4..0f54fd4544 100644 --- a/src/drivers/gps/CMakeLists.txt +++ b/src/drivers/gps/CMakeLists.txt @@ -44,6 +44,5 @@ px4_add_module( devices/src/ashtech.cpp devices/src/ubx.cpp DEPENDS - platforms__common git_gps_devices ) diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index 5d927e6937..97397e5c92 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -72,7 +72,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/drivers/imu/adis16448/CMakeLists.txt b/src/drivers/imu/adis16448/CMakeLists.txt index f2ee82624a..0ae4cdb4c6 100644 --- a/src/drivers/imu/adis16448/CMakeLists.txt +++ b/src/drivers/imu/adis16448/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( SRCS adis16448.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/imu/adis16448/adis16448.cpp b/src/drivers/imu/adis16448/adis16448.cpp index b8b33b018b..c76eac3fd8 100644 --- a/src/drivers/imu/adis16448/adis16448.cpp +++ b/src/drivers/imu/adis16448/adis16448.cpp @@ -60,7 +60,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/bma180/CMakeLists.txt b/src/drivers/imu/bma180/CMakeLists.txt index 0a05b6da80..db3051da82 100644 --- a/src/drivers/imu/bma180/CMakeLists.txt +++ b/src/drivers/imu/bma180/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS bma180.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/imu/bma180/bma180.cpp b/src/drivers/imu/bma180/bma180.cpp index 0b2aa75b08..58431f46cd 100644 --- a/src/drivers/imu/bma180/bma180.cpp +++ b/src/drivers/imu/bma180/bma180.cpp @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/drivers/imu/bmi055/CMakeLists.txt b/src/drivers/imu/bmi055/CMakeLists.txt index c871a2c232..7c52f4896f 100644 --- a/src/drivers/imu/bmi055/CMakeLists.txt +++ b/src/drivers/imu/bmi055/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( bmi055_gyro.cpp bmi055_main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/imu/bmi055/bmi055.hpp b/src/drivers/imu/bmi055/bmi055.hpp index bad674f5fe..d8ec1f4672 100644 --- a/src/drivers/imu/bmi055/bmi055.hpp +++ b/src/drivers/imu/bmi055/bmi055.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/bmi160/CMakeLists.txt b/src/drivers/imu/bmi160/CMakeLists.txt index 75609a1743..d0479f2c19 100644 --- a/src/drivers/imu/bmi160/CMakeLists.txt +++ b/src/drivers/imu/bmi160/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( bmi160_gyro.cpp bmi160_main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/imu/bmi160/bmi160.hpp b/src/drivers/imu/bmi160/bmi160.hpp index 2f5dfa4dd5..1feddf2fa8 100644 --- a/src/drivers/imu/bmi160/bmi160.hpp +++ b/src/drivers/imu/bmi160/bmi160.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/fxas21002c/CMakeLists.txt b/src/drivers/imu/fxas21002c/CMakeLists.txt index ed550dd5df..c91dc4cf7a 100644 --- a/src/drivers/imu/fxas21002c/CMakeLists.txt +++ b/src/drivers/imu/fxas21002c/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( SRCS fxas21002c.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : \ No newline at end of file diff --git a/src/drivers/imu/fxas21002c/fxas21002c.cpp b/src/drivers/imu/fxas21002c/fxas21002c.cpp index c978bf6cc2..51808a2602 100644 --- a/src/drivers/imu/fxas21002c/fxas21002c.cpp +++ b/src/drivers/imu/fxas21002c/fxas21002c.cpp @@ -58,7 +58,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/imu/fxos8701cq/CMakeLists.txt b/src/drivers/imu/fxos8701cq/CMakeLists.txt index 6ca59bb1dd..4ac135e0a6 100644 --- a/src/drivers/imu/fxos8701cq/CMakeLists.txt +++ b/src/drivers/imu/fxos8701cq/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( SRCS fxos8701cq.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : \ No newline at end of file diff --git a/src/drivers/imu/fxos8701cq/fxos8701cq.cpp b/src/drivers/imu/fxos8701cq/fxos8701cq.cpp index 8ec72c7f39..ef4c87e044 100644 --- a/src/drivers/imu/fxos8701cq/fxos8701cq.cpp +++ b/src/drivers/imu/fxos8701cq/fxos8701cq.cpp @@ -59,7 +59,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/imu/l3gd20/CMakeLists.txt b/src/drivers/imu/l3gd20/CMakeLists.txt index 0893db1204..48a5fe16c3 100644 --- a/src/drivers/imu/l3gd20/CMakeLists.txt +++ b/src/drivers/imu/l3gd20/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS l3gd20.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/imu/l3gd20/l3gd20.cpp b/src/drivers/imu/l3gd20/l3gd20.cpp index 7a90de6514..99b80b912d 100644 --- a/src/drivers/imu/l3gd20/l3gd20.cpp +++ b/src/drivers/imu/l3gd20/l3gd20.cpp @@ -57,7 +57,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/lsm303d/CMakeLists.txt b/src/drivers/imu/lsm303d/CMakeLists.txt index 9d2d36dced..6c83cef442 100644 --- a/src/drivers/imu/lsm303d/CMakeLists.txt +++ b/src/drivers/imu/lsm303d/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS lsm303d.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/imu/lsm303d/lsm303d.cpp b/src/drivers/imu/lsm303d/lsm303d.cpp index adfdb40e9a..44eafac989 100644 --- a/src/drivers/imu/lsm303d/lsm303d.cpp +++ b/src/drivers/imu/lsm303d/lsm303d.cpp @@ -56,7 +56,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/mpu6000/CMakeLists.txt b/src/drivers/imu/mpu6000/CMakeLists.txt index 274b162e11..67547d5171 100644 --- a/src/drivers/imu/mpu6000/CMakeLists.txt +++ b/src/drivers/imu/mpu6000/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( mpu6000_i2c.cpp mpu6000_spi.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/imu/mpu6000/mpu6000.cpp b/src/drivers/imu/mpu6000/mpu6000.cpp index ec59fbd00f..b05b29dc2e 100644 --- a/src/drivers/imu/mpu6000/mpu6000.cpp +++ b/src/drivers/imu/mpu6000/mpu6000.cpp @@ -73,7 +73,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/drivers/imu/mpu9250/CMakeLists.txt b/src/drivers/imu/mpu9250/CMakeLists.txt index bb2080e9d2..8900b636af 100644 --- a/src/drivers/imu/mpu9250/CMakeLists.txt +++ b/src/drivers/imu/mpu9250/CMakeLists.txt @@ -44,6 +44,5 @@ px4_add_module( mag.cpp mag_i2c.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/imu/mpu9250/gyro.cpp b/src/drivers/imu/mpu9250/gyro.cpp index ac86e32231..bb06a30de4 100644 --- a/src/drivers/imu/mpu9250/gyro.cpp +++ b/src/drivers/imu/mpu9250/gyro.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/mpu9250/mag.cpp b/src/drivers/imu/mpu9250/mag.cpp index 9e8289535a..b4acce8a0d 100644 --- a/src/drivers/imu/mpu9250/mag.cpp +++ b/src/drivers/imu/mpu9250/mag.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/mpu9250/mag.h b/src/drivers/imu/mpu9250/mag.h index 4d847438e1..d734fa2efe 100644 --- a/src/drivers/imu/mpu9250/mag.h +++ b/src/drivers/imu/mpu9250/mag.h @@ -35,7 +35,7 @@ #include "drivers/device/ringbuffer.h" // ringbuffer::RingBuffer #include "drivers/drv_mag.h" // mag_calibration_s -#include "systemlib/perf_counter.h" // perf_counter_t +#include /* in 16-bit sampling mode the mag resolution is 1.5 milli Gauss per bit */ diff --git a/src/drivers/imu/mpu9250/main.cpp b/src/drivers/imu/mpu9250/main.cpp index 9c2a82367a..2ee7861ad3 100644 --- a/src/drivers/imu/mpu9250/main.cpp +++ b/src/drivers/imu/mpu9250/main.cpp @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/imu/mpu9250/mpu9250.cpp b/src/drivers/imu/mpu9250/mpu9250.cpp index 1d81b57289..8a1fc6216f 100644 --- a/src/drivers/imu/mpu9250/mpu9250.cpp +++ b/src/drivers/imu/mpu9250/mpu9250.cpp @@ -59,7 +59,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/drivers/imu/mpu9250/mpu9250.h b/src/drivers/imu/mpu9250/mpu9250.h index 3fe12022ba..20d437228f 100644 --- a/src/drivers/imu/mpu9250/mpu9250.h +++ b/src/drivers/imu/mpu9250/mpu9250.h @@ -33,7 +33,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/irlock/CMakeLists.txt b/src/drivers/irlock/CMakeLists.txt index 22b101d3a7..b87f66a6f2 100644 --- a/src/drivers/irlock/CMakeLists.txt +++ b/src/drivers/irlock/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS irlock.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/kinetis/CMakeLists.txt b/src/drivers/kinetis/CMakeLists.txt index 5aa10114f2..1aa52ddea7 100644 --- a/src/drivers/kinetis/CMakeLists.txt +++ b/src/drivers/kinetis/CMakeLists.txt @@ -30,17 +30,14 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE drivers__kinetis - COMPILE_FLAGS - SRCS - drv_hrt.c - drv_io_timer.c - drv_pwm_servo.c - drv_pwm_trigger.c - drv_input_capture.c - drv_led_pwm.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +add_library(drivers_arch + drv_hrt.c + drv_io_timer.c + drv_pwm_servo.c + drv_pwm_trigger.c + drv_input_capture.c + drv_led_pwm.cpp +) +add_dependencies(drivers_arch prebuild_targets) +target_link_libraries(drivers_arch PRIVATE drivers_board) diff --git a/src/drivers/kinetis/adc/CMakeLists.txt b/src/drivers/kinetis/adc/CMakeLists.txt index ba29e2eaa2..bf0eca22c4 100644 --- a/src/drivers/kinetis/adc/CMakeLists.txt +++ b/src/drivers/kinetis/adc/CMakeLists.txt @@ -30,13 +30,10 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__kinetis__adc + MODULE drivers__adc MAIN adc - COMPILE_FLAGS SRCS adc.cpp - DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/kinetis/adc/adc.cpp b/src/drivers/kinetis/adc/adc.cpp index a16d1222d2..d4b27adb1e 100644 --- a/src/drivers/kinetis/adc/adc.cpp +++ b/src/drivers/kinetis/adc/adc.cpp @@ -67,7 +67,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/kinetis/tone_alarm/CMakeLists.txt b/src/drivers/kinetis/tone_alarm/CMakeLists.txt index 25e9429cbd..ae51757d6a 100644 --- a/src/drivers/kinetis/tone_alarm/CMakeLists.txt +++ b/src/drivers/kinetis/tone_alarm/CMakeLists.txt @@ -30,13 +30,12 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__kinetis__tone_alarm + MODULE drivers__tone_alarm MAIN tone_alarm - COMPILE_FLAGS SRCS tone_alarm.cpp DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + tunes + ) \ No newline at end of file diff --git a/src/drivers/linux_gpio/CMakeLists.txt b/src/drivers/linux_gpio/CMakeLists.txt index ce4042dd2e..886efe8478 100644 --- a/src/drivers/linux_gpio/CMakeLists.txt +++ b/src/drivers/linux_gpio/CMakeLists.txt @@ -30,15 +30,9 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE drivers__linux_gpio - STACK_MAIN 1200 - COMPILE_FLAGS - SRCS - linux_gpio.cpp - DEPENDS - platforms__common + +px4_add_library(drivers__linux_gpio + linux_gpio.cpp ) #add_subdirectory(test) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/linux_pwm_out/CMakeLists.txt b/src/drivers/linux_pwm_out/CMakeLists.txt index 8bc8470b03..bbbfcc4f53 100644 --- a/src/drivers/linux_pwm_out/CMakeLists.txt +++ b/src/drivers/linux_pwm_out/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( linux_pwm_out.cpp ocpoc_mmap.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/linux_pwm_out/linux_pwm_out.cpp b/src/drivers/linux_pwm_out/linux_pwm_out.cpp index 8d1b3d090e..2e7b9cb01f 100644 --- a/src/drivers/linux_pwm_out/linux_pwm_out.cpp +++ b/src/drivers/linux_pwm_out/linux_pwm_out.cpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include "common.h" diff --git a/src/drivers/linux_sbus/CMakeLists.txt b/src/drivers/linux_sbus/CMakeLists.txt index 7f62d5f129..8a7d597828 100644 --- a/src/drivers/linux_sbus/CMakeLists.txt +++ b/src/drivers/linux_sbus/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS linux_sbus.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/magnetometer/bmm150/CMakeLists.txt b/src/drivers/magnetometer/bmm150/CMakeLists.txt index ff8912c627..da23f3535b 100644 --- a/src/drivers/magnetometer/bmm150/CMakeLists.txt +++ b/src/drivers/magnetometer/bmm150/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS bmm150.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/magnetometer/bmm150/bmm150.hpp b/src/drivers/magnetometer/bmm150/bmm150.hpp index 7dc0f69918..d0f3a02c61 100644 --- a/src/drivers/magnetometer/bmm150/bmm150.hpp +++ b/src/drivers/magnetometer/bmm150/bmm150.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/drivers/magnetometer/hmc5883/CMakeLists.txt b/src/drivers/magnetometer/hmc5883/CMakeLists.txt index 1c7b768369..87117e1f02 100644 --- a/src/drivers/magnetometer/hmc5883/CMakeLists.txt +++ b/src/drivers/magnetometer/hmc5883/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( hmc5883_spi.cpp hmc5883.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/magnetometer/hmc5883/hmc5883.cpp b/src/drivers/magnetometer/hmc5883/hmc5883.cpp index 0bf1a1b83b..37c9661077 100644 --- a/src/drivers/magnetometer/hmc5883/hmc5883.cpp +++ b/src/drivers/magnetometer/hmc5883/hmc5883.cpp @@ -61,7 +61,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/magnetometer/ist8310/CMakeLists.txt b/src/drivers/magnetometer/ist8310/CMakeLists.txt index fda529310d..a905230e78 100644 --- a/src/drivers/magnetometer/ist8310/CMakeLists.txt +++ b/src/drivers/magnetometer/ist8310/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS ist8310.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/magnetometer/ist8310/ist8310.cpp b/src/drivers/magnetometer/ist8310/ist8310.cpp index faec184d53..95c7402f2a 100644 --- a/src/drivers/magnetometer/ist8310/ist8310.cpp +++ b/src/drivers/magnetometer/ist8310/ist8310.cpp @@ -63,7 +63,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/magnetometer/lis3mdl/CMakeLists.txt b/src/drivers/magnetometer/lis3mdl/CMakeLists.txt index 5f20fe8b2a..df723a2f57 100644 --- a/src/drivers/magnetometer/lis3mdl/CMakeLists.txt +++ b/src/drivers/magnetometer/lis3mdl/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( lis3mdl_spi.cpp lis3mdl.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/magnetometer/lis3mdl/lis3mdl.cpp b/src/drivers/magnetometer/lis3mdl/lis3mdl.cpp index b1daa82b0c..6599c4ed24 100644 --- a/src/drivers/magnetometer/lis3mdl/lis3mdl.cpp +++ b/src/drivers/magnetometer/lis3mdl/lis3mdl.cpp @@ -63,7 +63,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/md25/CMakeLists.txt b/src/drivers/md25/CMakeLists.txt index 12e740e614..b58ae21708 100644 --- a/src/drivers/md25/CMakeLists.txt +++ b/src/drivers/md25/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( md25.cpp md25_main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/md25/md25_main.cpp b/src/drivers/md25/md25_main.cpp index a560458fc4..0857417471 100644 --- a/src/drivers/md25/md25_main.cpp +++ b/src/drivers/md25/md25_main.cpp @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include "md25.hpp" diff --git a/src/drivers/mkblctrl/CMakeLists.txt b/src/drivers/mkblctrl/CMakeLists.txt index bdd223a92b..eebea04cd4 100644 --- a/src/drivers/mkblctrl/CMakeLists.txt +++ b/src/drivers/mkblctrl/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( mkblctrl.cpp mkblctrl_params.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/mkblctrl/mkblctrl.cpp b/src/drivers/mkblctrl/mkblctrl.cpp index 77d0226750..342ffdf437 100644 --- a/src/drivers/mkblctrl/mkblctrl.cpp +++ b/src/drivers/mkblctrl/mkblctrl.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/drivers/mkblctrl/mkblctrl_params.c b/src/drivers/mkblctrl/mkblctrl_params.c index 7fe3bd9361..27d8944a9c 100644 --- a/src/drivers/mkblctrl/mkblctrl_params.c +++ b/src/drivers/mkblctrl/mkblctrl_params.c @@ -41,7 +41,7 @@ */ #include -#include +#include /** * Test mode (Identify) of MKBLCTRL Driver diff --git a/src/drivers/navio_adc/CMakeLists.txt b/src/drivers/navio_adc/CMakeLists.txt index cfe39b33d3..955b30260f 100644 --- a/src/drivers/navio_adc/CMakeLists.txt +++ b/src/drivers/navio_adc/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS navio_adc.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/navio_rgbled/CMakeLists.txt b/src/drivers/navio_rgbled/CMakeLists.txt index 971a4e45ad..5bb708dd82 100644 --- a/src/drivers/navio_rgbled/CMakeLists.txt +++ b/src/drivers/navio_rgbled/CMakeLists.txt @@ -34,14 +34,11 @@ px4_add_module( MODULE drivers__navio_rgbled MAIN navio_rgbled - COMPILE_FLAGS SRCS navio_rgbled.cpp DEPENDS - platforms__common drivers__linux_gpio - lib__led + led ) #add_subdirectory(test) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/navio_rgbled/test/CMakeLists.txt b/src/drivers/navio_rgbled/test/CMakeLists.txt index 5b8a096bba..6ec6b63116 100644 --- a/src/drivers/navio_rgbled/test/CMakeLists.txt +++ b/src/drivers/navio_rgbled/test/CMakeLists.txt @@ -40,6 +40,5 @@ add_executable(navio_rgbled_test target_link_libraries(navio_rgbled_test drivers__navio_rgbled drivers__navio_gpio - platforms__posix__px4_layer df_driver_framework ) diff --git a/src/drivers/navio_sysfs_rc_in/CMakeLists.txt b/src/drivers/navio_sysfs_rc_in/CMakeLists.txt index 4859a2d348..2785a22b11 100644 --- a/src/drivers/navio_sysfs_rc_in/CMakeLists.txt +++ b/src/drivers/navio_sysfs_rc_in/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS navio_sysfs_rc_in.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/ocpoc_adc/CMakeLists.txt b/src/drivers/ocpoc_adc/CMakeLists.txt index 6beac74669..88d3bb8edb 100644 --- a/src/drivers/ocpoc_adc/CMakeLists.txt +++ b/src/drivers/ocpoc_adc/CMakeLists.txt @@ -30,13 +30,10 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( MODULE drivers__ocpoc_adc MAIN ocpoc_adc - COMPILE_FLAGS SRCS ocpoc_adc.cpp - DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/oreoled/CMakeLists.txt b/src/drivers/oreoled/CMakeLists.txt index 55b96b3d9d..33fdafbc02 100644 --- a/src/drivers/oreoled/CMakeLists.txt +++ b/src/drivers/oreoled/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS oreoled.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/oreoled/oreoled.cpp b/src/drivers/oreoled/oreoled.cpp index 26b615e041..e595e5e0fc 100644 --- a/src/drivers/oreoled/oreoled.cpp +++ b/src/drivers/oreoled/oreoled.cpp @@ -59,7 +59,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/pca8574/CMakeLists.txt b/src/drivers/pca8574/CMakeLists.txt index df04edb222..77c3960151 100644 --- a/src/drivers/pca8574/CMakeLists.txt +++ b/src/drivers/pca8574/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS pca8574.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/pca8574/pca8574.cpp b/src/drivers/pca8574/pca8574.cpp index 14ccaab7b2..6f6b22eb41 100644 --- a/src/drivers/pca8574/pca8574.cpp +++ b/src/drivers/pca8574/pca8574.cpp @@ -57,7 +57,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/pca9685/CMakeLists.txt b/src/drivers/pca9685/CMakeLists.txt index e5053ab8f6..547cfb0ed1 100644 --- a/src/drivers/pca9685/CMakeLists.txt +++ b/src/drivers/pca9685/CMakeLists.txt @@ -36,6 +36,4 @@ px4_add_module( SRCS pca9685.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/pca9685/pca9685.cpp b/src/drivers/pca9685/pca9685.cpp index 26e20b0fc9..329e20c470 100644 --- a/src/drivers/pca9685/pca9685.cpp +++ b/src/drivers/pca9685/pca9685.cpp @@ -65,7 +65,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/protocol_splitter/CMakeLists.txt b/src/drivers/protocol_splitter/CMakeLists.txt index 9e1e972a0e..ebcad6f89d 100644 --- a/src/drivers/protocol_splitter/CMakeLists.txt +++ b/src/drivers/protocol_splitter/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS protocol_splitter.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/pwm_input/CMakeLists.txt b/src/drivers/pwm_input/CMakeLists.txt index 9da615d1ee..a0a18a9687 100644 --- a/src/drivers/pwm_input/CMakeLists.txt +++ b/src/drivers/pwm_input/CMakeLists.txt @@ -39,6 +39,4 @@ px4_add_module( SRCS pwm_input.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/px4flow/CMakeLists.txt b/src/drivers/px4flow/CMakeLists.txt index 30bd4efc31..f9f859d9cd 100644 --- a/src/drivers/px4flow/CMakeLists.txt +++ b/src/drivers/px4flow/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS px4flow.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/px4flow/px4flow.cpp b/src/drivers/px4flow/px4flow.cpp index 1cb7fa94a0..6c0cbf94c3 100644 --- a/src/drivers/px4flow/px4flow.cpp +++ b/src/drivers/px4flow/px4flow.cpp @@ -62,9 +62,9 @@ #include #include -#include +#include #include -#include +#include #include diff --git a/src/drivers/px4fmu/CMakeLists.txt b/src/drivers/px4fmu/CMakeLists.txt index 24921c1e5c..6a10c9131a 100644 --- a/src/drivers/px4fmu/CMakeLists.txt +++ b/src/drivers/px4fmu/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS fmu.cpp DEPENDS - platforms__common + rc ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp index 4c2ac5ddde..df0b5feb8a 100644 --- a/src/drivers/px4fmu/fmu.cpp +++ b/src/drivers/px4fmu/fmu.cpp @@ -59,8 +59,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/drivers/px4io/CMakeLists.txt b/src/drivers/px4io/CMakeLists.txt index f7d8d41dda..f48bd9ec6e 100644 --- a/src/drivers/px4io/CMakeLists.txt +++ b/src/drivers/px4io/CMakeLists.txt @@ -42,7 +42,6 @@ px4_add_module( px4io_serial_f4.cpp px4io_serial_f7.cpp DEPENDS - platforms__common ) # include the px4io binary in ROMFS diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 30308dd8b6..d52df0ef44 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -68,10 +68,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/src/drivers/px4io/px4io_params.c b/src/drivers/px4io/px4io_params.c index f2080e4640..baf69802ff 100644 --- a/src/drivers/px4io/px4io_params.c +++ b/src/drivers/px4io/px4io_params.c @@ -40,7 +40,7 @@ */ #include -#include +#include /** * Set usage of IO board diff --git a/src/drivers/px4io/px4io_serial.h b/src/drivers/px4io/px4io_serial.h index dc2f35c14a..6ce95e1105 100644 --- a/src/drivers/px4io/px4io_serial.h +++ b/src/drivers/px4io/px4io_serial.h @@ -54,7 +54,7 @@ #include #include -#include +#include #include diff --git a/src/drivers/qshell/posix/CMakeLists.txt b/src/drivers/qshell/posix/CMakeLists.txt index 9bdf0a3320..d028be7983 100644 --- a/src/drivers/qshell/posix/CMakeLists.txt +++ b/src/drivers/qshell/posix/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( qshell_start_posix.cpp qshell.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/qshell/qurt/CMakeLists.txt b/src/drivers/qshell/qurt/CMakeLists.txt index 51244e4f4b..36c3fb4dcb 100644 --- a/src/drivers/qshell/qurt/CMakeLists.txt +++ b/src/drivers/qshell/qurt/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( qshell_start_qurt.cpp qshell.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/rgbled/CMakeLists.txt b/src/drivers/rgbled/CMakeLists.txt index 0655f7e92f..76d89af624 100644 --- a/src/drivers/rgbled/CMakeLists.txt +++ b/src/drivers/rgbled/CMakeLists.txt @@ -30,6 +30,7 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( MODULE drivers__rgbled MAIN rgbled @@ -37,7 +38,6 @@ px4_add_module( SRCS rgbled.cpp DEPENDS - platforms__common - lib__led + drivers__device + led ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/rgbled/rgbled.cpp b/src/drivers/rgbled/rgbled.cpp index fff04dbcd0..92adbb80cd 100644 --- a/src/drivers/rgbled/rgbled.cpp +++ b/src/drivers/rgbled/rgbled.cpp @@ -57,7 +57,7 @@ #include -#include +#include #include #include diff --git a/src/drivers/rgbled/rgbled_params.c b/src/drivers/rgbled/rgbled_params.c index 9b97c4e87d..6851b02853 100644 --- a/src/drivers/rgbled/rgbled_params.c +++ b/src/drivers/rgbled/rgbled_params.c @@ -41,7 +41,7 @@ #include -#include +#include /** * RGB Led brightness limit diff --git a/src/drivers/rgbled_pwm/CMakeLists.txt b/src/drivers/rgbled_pwm/CMakeLists.txt index 48013856ad..830ce67f20 100644 --- a/src/drivers/rgbled_pwm/CMakeLists.txt +++ b/src/drivers/rgbled_pwm/CMakeLists.txt @@ -30,14 +30,12 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( MODULE drivers__rgbled_pwm MAIN rgbled_pwm - COMPILE_FLAGS SRCS rgbled_pwm.cpp DEPENDS - platforms__common - lib__led - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + led + ) \ No newline at end of file diff --git a/src/drivers/rgbled_pwm/rgbled_pwm.cpp b/src/drivers/rgbled_pwm/rgbled_pwm.cpp index ef0c817d00..42cd2a5d29 100644 --- a/src/drivers/rgbled_pwm/rgbled_pwm.cpp +++ b/src/drivers/rgbled_pwm/rgbled_pwm.cpp @@ -56,7 +56,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/roboclaw/CMakeLists.txt b/src/drivers/roboclaw/CMakeLists.txt index d40271d9f6..72d16eec65 100644 --- a/src/drivers/roboclaw/CMakeLists.txt +++ b/src/drivers/roboclaw/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( roboclaw_main.cpp RoboClaw.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/roboclaw/roboclaw_main.cpp b/src/drivers/roboclaw/roboclaw_main.cpp index 0110f3b21c..8d01930663 100644 --- a/src/drivers/roboclaw/roboclaw_main.cpp +++ b/src/drivers/roboclaw/roboclaw_main.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include "RoboClaw.hpp" diff --git a/src/drivers/rpi_rc_in/CMakeLists.txt b/src/drivers/rpi_rc_in/CMakeLists.txt index 8ca354f6ab..c16b2ebc17 100644 --- a/src/drivers/rpi_rc_in/CMakeLists.txt +++ b/src/drivers/rpi_rc_in/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS rpi_rc_in.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/samv7/CMakeLists.txt b/src/drivers/samv7/CMakeLists.txt index e5ab12ddf4..ce8396f9eb 100644 --- a/src/drivers/samv7/CMakeLists.txt +++ b/src/drivers/samv7/CMakeLists.txt @@ -30,16 +30,12 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE drivers__samv7 - COMPILE_FLAGS - -Os - SRCS - drv_hrt.c - drv_io_timer.c - drv_pwm_servo.c - drv_input_capture.c - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +add_library(drivers_arch + drv_hrt.c + drv_io_timer.c + drv_pwm_servo.c + drv_input_capture.c +) +add_dependencies(drivers_arch prebuild_targets) +target_link_libraries(drivers_arch PRIVATE drivers_board) diff --git a/src/drivers/samv7/adc/CMakeLists.txt b/src/drivers/samv7/adc/CMakeLists.txt index e9b4e86209..46f8f429de 100644 --- a/src/drivers/samv7/adc/CMakeLists.txt +++ b/src/drivers/samv7/adc/CMakeLists.txt @@ -30,14 +30,10 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__samv7__adc + MODULE drivers__adc MAIN adc - COMPILE_FLAGS - -Os SRCS adc.cpp - DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/samv7/adc/adc.cpp b/src/drivers/samv7/adc/adc.cpp index 5137f57f82..6e418e07b2 100644 --- a/src/drivers/samv7/adc/adc.cpp +++ b/src/drivers/samv7/adc/adc.cpp @@ -63,7 +63,7 @@ #include #include -#include +#include #include diff --git a/src/drivers/samv7/tone_alarm/CMakeLists.txt b/src/drivers/samv7/tone_alarm/CMakeLists.txt index 3e9b5fd5c0..815f4d5c69 100644 --- a/src/drivers/samv7/tone_alarm/CMakeLists.txt +++ b/src/drivers/samv7/tone_alarm/CMakeLists.txt @@ -30,14 +30,12 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__samv7__tone_alarm + MODULE drivers__tone_alarm MAIN tone_alarm - COMPILE_FLAGS - -Os SRCS tone_alarm.cpp DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + tunes + ) \ No newline at end of file diff --git a/src/drivers/snapdragon_pwm_out/CMakeLists.txt b/src/drivers/snapdragon_pwm_out/CMakeLists.txt index ed7a2111c7..ad654e3a0a 100644 --- a/src/drivers/snapdragon_pwm_out/CMakeLists.txt +++ b/src/drivers/snapdragon_pwm_out/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS snapdragon_pwm_out.cpp DEPENDS - platforms__common mixer_gen ) diff --git a/src/drivers/snapdragon_pwm_out/snapdragon_pwm_out.cpp b/src/drivers/snapdragon_pwm_out/snapdragon_pwm_out.cpp index 04b9f16027..ad654bedcf 100644 --- a/src/drivers/snapdragon_pwm_out/snapdragon_pwm_out.cpp +++ b/src/drivers/snapdragon_pwm_out/snapdragon_pwm_out.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/drivers/spektrum_rc/CMakeLists.txt b/src/drivers/spektrum_rc/CMakeLists.txt index 50a0d58ecf..15be2ae6d8 100644 --- a/src/drivers/spektrum_rc/CMakeLists.txt +++ b/src/drivers/spektrum_rc/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS spektrum_rc.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/stm32/CMakeLists.txt b/src/drivers/stm32/CMakeLists.txt index 9719e3ebe7..524139e44d 100644 --- a/src/drivers/stm32/CMakeLists.txt +++ b/src/drivers/stm32/CMakeLists.txt @@ -30,17 +30,14 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE drivers__stm32 - COMPILE_FLAGS - SRCS - drv_hrt.c - drv_io_timer.c - drv_pwm_servo.c - drv_pwm_trigger.c - drv_input_capture.c - drv_led_pwm.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +add_library(drivers_arch + drv_hrt.c + drv_io_timer.c + drv_pwm_servo.c + drv_pwm_trigger.c + drv_input_capture.c + drv_led_pwm.cpp +) +add_dependencies(drivers_arch prebuild_targets) +target_link_libraries(drivers_arch PRIVATE drivers_board) diff --git a/src/drivers/stm32/adc/CMakeLists.txt b/src/drivers/stm32/adc/CMakeLists.txt index 1d1efbee43..46f8f429de 100644 --- a/src/drivers/stm32/adc/CMakeLists.txt +++ b/src/drivers/stm32/adc/CMakeLists.txt @@ -30,13 +30,10 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__stm32__adc + MODULE drivers__adc MAIN adc - COMPILE_FLAGS SRCS adc.cpp - DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/stm32/adc/adc.cpp b/src/drivers/stm32/adc/adc.cpp index e79695b986..31819da96a 100644 --- a/src/drivers/stm32/adc/adc.cpp +++ b/src/drivers/stm32/adc/adc.cpp @@ -62,7 +62,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/stm32/drv_led_pwm.cpp b/src/drivers/stm32/drv_led_pwm.cpp index 3b7f74f400..563f899769 100644 --- a/src/drivers/stm32/drv_led_pwm.cpp +++ b/src/drivers/stm32/drv_led_pwm.cpp @@ -52,7 +52,7 @@ #include -#include +#include #include #include #include diff --git a/src/drivers/stm32/tone_alarm/CMakeLists.txt b/src/drivers/stm32/tone_alarm/CMakeLists.txt index ba17923fca..815f4d5c69 100644 --- a/src/drivers/stm32/tone_alarm/CMakeLists.txt +++ b/src/drivers/stm32/tone_alarm/CMakeLists.txt @@ -30,13 +30,12 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__stm32__tone_alarm + MODULE drivers__tone_alarm MAIN tone_alarm - COMPILE_FLAGS SRCS tone_alarm.cpp DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + tunes + ) \ No newline at end of file diff --git a/src/drivers/tap_esc/CMakeLists.txt b/src/drivers/tap_esc/CMakeLists.txt index 43c19be3e2..8b8b6b1fea 100644 --- a/src/drivers/tap_esc/CMakeLists.txt +++ b/src/drivers/tap_esc/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( tap_esc.cpp tap_esc_common.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/telemetry/bst/CMakeLists.txt b/src/drivers/telemetry/bst/CMakeLists.txt index 7a638c7ed5..1a969fa3c0 100644 --- a/src/drivers/telemetry/bst/CMakeLists.txt +++ b/src/drivers/telemetry/bst/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS bst.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/telemetry/frsky_telemetry/CMakeLists.txt b/src/drivers/telemetry/frsky_telemetry/CMakeLists.txt index b6a303f4ee..adfc6144ab 100644 --- a/src/drivers/telemetry/frsky_telemetry/CMakeLists.txt +++ b/src/drivers/telemetry/frsky_telemetry/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( sPort_data.cpp frsky_telemetry.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/telemetry/hott/CMakeLists.txt b/src/drivers/telemetry/hott/CMakeLists.txt index e6342b40b7..137df38af7 100644 --- a/src/drivers/telemetry/hott/CMakeLists.txt +++ b/src/drivers/telemetry/hott/CMakeLists.txt @@ -30,16 +30,11 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -list(APPEND MODULE_CFLAGS -Wframe-larger-than=1100) -px4_add_module( - MODULE drivers__hott - COMPILE_FLAGS - SRCS - messages.cpp - comms.cpp - DEPENDS - platforms__common - ) + +px4_add_library(drivers__hott + messages.cpp + comms.cpp +) add_subdirectory(hott_sensors) add_subdirectory(hott_telemetry) diff --git a/src/drivers/telemetry/hott/hott_sensors/CMakeLists.txt b/src/drivers/telemetry/hott/hott_sensors/CMakeLists.txt index 9a6f458a22..e2f9ee6e79 100644 --- a/src/drivers/telemetry/hott/hott_sensors/CMakeLists.txt +++ b/src/drivers/telemetry/hott/hott_sensors/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS hott_sensors.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/telemetry/hott/hott_telemetry/CMakeLists.txt b/src/drivers/telemetry/hott/hott_telemetry/CMakeLists.txt index 57ac30197f..f1abeaf762 100644 --- a/src/drivers/telemetry/hott/hott_telemetry/CMakeLists.txt +++ b/src/drivers/telemetry/hott/hott_telemetry/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS hott_telemetry.cpp DEPENDS - platforms__common + drivers__hott ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/telemetry/hott/hott_telemetry/hott_telemetry.cpp b/src/drivers/telemetry/hott/hott_telemetry/hott_telemetry.cpp index f5b6fb57b6..f1a6f3917a 100644 --- a/src/drivers/telemetry/hott/hott_telemetry/hott_telemetry.cpp +++ b/src/drivers/telemetry/hott/hott_telemetry/hott_telemetry.cpp @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include "../comms.h" diff --git a/src/drivers/telemetry/iridiumsbd/CMakeLists.txt b/src/drivers/telemetry/iridiumsbd/CMakeLists.txt index a67a04e796..8a6fc409ee 100644 --- a/src/drivers/telemetry/iridiumsbd/CMakeLists.txt +++ b/src/drivers/telemetry/iridiumsbd/CMakeLists.txt @@ -40,5 +40,4 @@ px4_add_module( IridiumSBD.cpp iridiumsbd_params.c DEPENDS - platforms__common ) diff --git a/src/drivers/telemetry/iridiumsbd/IridiumSBD.cpp b/src/drivers/telemetry/iridiumsbd/IridiumSBD.cpp index 88a37e1a94..41cae65c00 100644 --- a/src/drivers/telemetry/iridiumsbd/IridiumSBD.cpp +++ b/src/drivers/telemetry/iridiumsbd/IridiumSBD.cpp @@ -46,7 +46,7 @@ #include #include -#include +#include #include "drivers/drv_iridiumsbd.h" diff --git a/src/drivers/telemetry/iridiumsbd/iridiumsbd_params.c b/src/drivers/telemetry/iridiumsbd/iridiumsbd_params.c index 3086fbe3a2..ccf7049c4e 100644 --- a/src/drivers/telemetry/iridiumsbd/iridiumsbd_params.c +++ b/src/drivers/telemetry/iridiumsbd/iridiumsbd_params.c @@ -1,4 +1,4 @@ -#include +#include /** * Satellite radio read interval. Only required to be nonzero if data is not sent using a ring call. diff --git a/src/drivers/test_ppm/CMakeLists.txt b/src/drivers/test_ppm/CMakeLists.txt index f1f8a4f392..bbc85147bc 100644 --- a/src/drivers/test_ppm/CMakeLists.txt +++ b/src/drivers/test_ppm/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS test_ppm.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/drivers/test_ppm/test_ppm.cpp b/src/drivers/test_ppm/test_ppm.cpp index 16f6f03e76..ba1445a36c 100644 --- a/src/drivers/test_ppm/test_ppm.cpp +++ b/src/drivers/test_ppm/test_ppm.cpp @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include diff --git a/src/drivers/vmount/CMakeLists.txt b/src/drivers/vmount/CMakeLists.txt index bda2c778a1..cbb1b054ef 100644 --- a/src/drivers/vmount/CMakeLists.txt +++ b/src/drivers/vmount/CMakeLists.txt @@ -46,6 +46,5 @@ px4_add_module( output_rc.cpp vmount.cpp DEPENDS - platforms__common ) - # vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/examples/bottle_drop/CMakeLists.txt b/src/examples/bottle_drop/CMakeLists.txt index aac56fe013..5fbffb57e6 100644 --- a/src/examples/bottle_drop/CMakeLists.txt +++ b/src/examples/bottle_drop/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS bottle_drop.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/examples/bottle_drop/bottle_drop.cpp b/src/examples/bottle_drop/bottle_drop.cpp index 7ad7e0e338..1d848c8a84 100644 --- a/src/examples/bottle_drop/bottle_drop.cpp +++ b/src/examples/bottle_drop/bottle_drop.cpp @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/examples/bottle_drop/bottle_drop_params.c b/src/examples/bottle_drop/bottle_drop_params.c index 868c1f0b5c..1e84837d11 100644 --- a/src/examples/bottle_drop/bottle_drop_params.c +++ b/src/examples/bottle_drop/bottle_drop_params.c @@ -39,7 +39,7 @@ */ #include -#include +#include /** * Ground drag property diff --git a/src/examples/fixedwing_control/CMakeLists.txt b/src/examples/fixedwing_control/CMakeLists.txt index 660dbfc400..3152597dfc 100644 --- a/src/examples/fixedwing_control/CMakeLists.txt +++ b/src/examples/fixedwing_control/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( SRCS main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/fixedwing_control/main.cpp b/src/examples/fixedwing_control/main.cpp index cc7cca3cd8..84c503015a 100644 --- a/src/examples/fixedwing_control/main.cpp +++ b/src/examples/fixedwing_control/main.cpp @@ -52,8 +52,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/examples/fixedwing_control/params.h b/src/examples/fixedwing_control/params.h index 8f8186b5c8..e51613a53b 100644 --- a/src/examples/fixedwing_control/params.h +++ b/src/examples/fixedwing_control/params.h @@ -38,7 +38,7 @@ * Definition of parameters for fixedwing example */ -#include +#include struct params { float hdng_p; diff --git a/src/examples/hwtest/CMakeLists.txt b/src/examples/hwtest/CMakeLists.txt index b4d4d33111..eb0a77cb3d 100644 --- a/src/examples/hwtest/CMakeLists.txt +++ b/src/examples/hwtest/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( SRCS hwtest.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/matlab_csv_serial/CMakeLists.txt b/src/examples/matlab_csv_serial/CMakeLists.txt index 43e22d085d..9a6202d1ea 100644 --- a/src/examples/matlab_csv_serial/CMakeLists.txt +++ b/src/examples/matlab_csv_serial/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( SRCS matlab_csv_serial.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/matlab_csv_serial/matlab_csv_serial.c b/src/examples/matlab_csv_serial/matlab_csv_serial.c index b949400e47..8e6cd45a00 100644 --- a/src/examples/matlab_csv_serial/matlab_csv_serial.c +++ b/src/examples/matlab_csv_serial/matlab_csv_serial.c @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/examples/publisher/CMakeLists.txt b/src/examples/publisher/CMakeLists.txt index 5755a6ff4f..24c9222a3c 100644 --- a/src/examples/publisher/CMakeLists.txt +++ b/src/examples/publisher/CMakeLists.txt @@ -39,6 +39,4 @@ px4_add_module( publisher_start_nuttx.cpp publisher_example.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/px4_mavlink_debug/CMakeLists.txt b/src/examples/px4_mavlink_debug/CMakeLists.txt index 0a030ba21e..83e50943e7 100644 --- a/src/examples/px4_mavlink_debug/CMakeLists.txt +++ b/src/examples/px4_mavlink_debug/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( SRCS px4_mavlink_debug.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/px4_simple_app/CMakeLists.txt b/src/examples/px4_simple_app/CMakeLists.txt index c0d22fa8d0..5685369f27 100644 --- a/src/examples/px4_simple_app/CMakeLists.txt +++ b/src/examples/px4_simple_app/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( SRCS px4_simple_app.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/rover_steering_control/CMakeLists.txt b/src/examples/rover_steering_control/CMakeLists.txt index 5b7ecf0b88..8afaeae2c5 100644 --- a/src/examples/rover_steering_control/CMakeLists.txt +++ b/src/examples/rover_steering_control/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( SRCS main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/rover_steering_control/main.cpp b/src/examples/rover_steering_control/main.cpp index 99da58a607..b5568e2ae3 100644 --- a/src/examples/rover_steering_control/main.cpp +++ b/src/examples/rover_steering_control/main.cpp @@ -61,10 +61,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/src/examples/rover_steering_control/params.h b/src/examples/rover_steering_control/params.h index 438c605f59..7b858f2765 100644 --- a/src/examples/rover_steering_control/params.h +++ b/src/examples/rover_steering_control/params.h @@ -38,6 +38,6 @@ * Definition of parameters for fixedwing example */ -#include +#include diff --git a/src/examples/segway/CMakeLists.txt b/src/examples/segway/CMakeLists.txt index 4bc0533eaa..caf2b4401b 100644 --- a/src/examples/segway/CMakeLists.txt +++ b/src/examples/segway/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( segway_main.cpp BlockSegwayController.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/examples/segway/params.c b/src/examples/segway/params.c index 626ef6e99d..d3c4aea35f 100644 --- a/src/examples/segway/params.c +++ b/src/examples/segway/params.c @@ -1,4 +1,4 @@ -#include +#include // 16 is max name length PARAM_DEFINE_FLOAT(SEG_TH2V_P, 10.0f); // pitch to voltage diff --git a/src/examples/segway/segway_main.cpp b/src/examples/segway/segway_main.cpp index e69c670ca7..d2f4502c36 100644 --- a/src/examples/segway/segway_main.cpp +++ b/src/examples/segway/segway_main.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/examples/subscriber/CMakeLists.txt b/src/examples/subscriber/CMakeLists.txt index fe72220a43..c72e983288 100644 --- a/src/examples/subscriber/CMakeLists.txt +++ b/src/examples/subscriber/CMakeLists.txt @@ -40,6 +40,4 @@ px4_add_module( subscriber_example.cpp subscriber_params.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/uuv_example_app/CMakeLists.txt b/src/examples/uuv_example_app/CMakeLists.txt index 552ffb26dd..bcfa534b4b 100644 --- a/src/examples/uuv_example_app/CMakeLists.txt +++ b/src/examples/uuv_example_app/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( SRCS uuv_example_app.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/examples/uuv_example_app/uuv_example_app.cpp b/src/examples/uuv_example_app/uuv_example_app.cpp index e77a7d1a78..63f7582405 100644 --- a/src/examples/uuv_example_app/uuv_example_app.cpp +++ b/src/examples/uuv_example_app/uuv_example_app.cpp @@ -51,9 +51,9 @@ #include // system libraries -#include +#include #include -#include +#include #include #include // internal libraries diff --git a/src/platforms/posix/drivers/airspeedsim/CMakeLists.txt b/src/lib/CMakeLists.txt similarity index 75% rename from src/platforms/posix/drivers/airspeedsim/CMakeLists.txt rename to src/lib/CMakeLists.txt index eb180a424a..93152ae534 100644 --- a/src/platforms/posix/drivers/airspeedsim/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -1,6 +1,6 @@ ############################################################################ # -# Copyright (c) 2015 PX4 Development Team. All rights reserved. +# Copyright (c) 2017 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -31,16 +31,20 @@ # ############################################################################ -include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) +px4_add_git_submodule(TARGET git_ecl PATH "ecl") +px4_add_git_submodule(TARGET git_matrix PATH "matrix") -px4_add_module( - MODULE platforms__posix__drivers__airspeedsim - MAIN measairspeedsim - COMPILE_FLAGS - SRCS - airspeedsim.cpp - meas_airspeed_sim.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : +add_subdirectory(battery) +add_subdirectory(controllib) +add_subdirectory(conversion) +add_subdirectory(drivers) +add_subdirectory(ecl) +add_subdirectory(FlightTasks) +add_subdirectory(led) +add_subdirectory(mathlib) +add_subdirectory(mixer) +add_subdirectory(perf) +add_subdirectory(rc) +add_subdirectory(terrain_estimation) +add_subdirectory(tunes) +add_subdirectory(version) diff --git a/src/lib/FlightTasks/CMakeLists.txt b/src/lib/FlightTasks/CMakeLists.txt index b80abca058..ea4908cc40 100644 --- a/src/lib/FlightTasks/CMakeLists.txt +++ b/src/lib/FlightTasks/CMakeLists.txt @@ -30,23 +30,18 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__flight_tasks - SRCS - tasks/FlightTask.cpp - tasks/FlightTaskManual.cpp - tasks/FlightTaskManualStabilized.cpp - tasks/FlightTaskOrbit.cpp - tasks/FlightTaskManualAltitude.cpp - tasks/FlightTaskManualAltitudeSmooth.cpp - tasks/FlightTaskManualPosition.cpp - tasks/FlightTaskManualPositionSmooth.cpp - tasks/Utility/ManualSmoothingZ.cpp - tasks/Utility/ManualSmoothingXY.cpp - SubscriptionArray.cpp - FlightTasks.cpp - DEPENDS - platforms__common - modules__uORB - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(flight_tasks + tasks/FlightTask.cpp + tasks/FlightTaskManual.cpp + tasks/FlightTaskManualStabilized.cpp + tasks/FlightTaskOrbit.cpp + tasks/FlightTaskManualAltitude.cpp + tasks/FlightTaskManualAltitudeSmooth.cpp + tasks/FlightTaskManualPosition.cpp + tasks/FlightTaskManualPositionSmooth.cpp + tasks/Utility/ManualSmoothingZ.cpp + tasks/Utility/ManualSmoothingXY.cpp + SubscriptionArray.cpp + FlightTasks.cpp +) diff --git a/src/lib/battery/CMakeLists.txt b/src/lib/battery/CMakeLists.txt new file mode 100644 index 0000000000..aaca5a3547 --- /dev/null +++ b/src/lib/battery/CMakeLists.txt @@ -0,0 +1,34 @@ +############################################################################ +# +# Copyright (c) 2018 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +px4_add_library(battery battery.cpp) diff --git a/src/modules/systemlib/battery.cpp b/src/lib/battery/battery.cpp similarity index 100% rename from src/modules/systemlib/battery.cpp rename to src/lib/battery/battery.cpp diff --git a/src/modules/systemlib/battery.h b/src/lib/battery/battery.h similarity index 100% rename from src/modules/systemlib/battery.h rename to src/lib/battery/battery.h diff --git a/src/modules/systemlib/battery_params.c b/src/lib/battery/battery_params.c similarity index 99% rename from src/modules/systemlib/battery_params.c rename to src/lib/battery/battery_params.c index 76fd273a84..065cdf7e7c 100644 --- a/src/modules/systemlib/battery_params.c +++ b/src/lib/battery/battery_params.c @@ -40,7 +40,7 @@ */ #include -#include +#include /** * Empty cell voltage (5C load) diff --git a/src/lib/controllib/CMakeLists.txt b/src/lib/controllib/CMakeLists.txt index 9d33534c2b..e3077f2253 100644 --- a/src/lib/controllib/CMakeLists.txt +++ b/src/lib/controllib/CMakeLists.txt @@ -30,21 +30,16 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__controllib - COMPILE_FLAGS - SRCS - block/Block.cpp - block/BlockParam.cpp - BlockDerivative.cpp - BlockHighPass.cpp - BlockIntegral.cpp - BlockIntegralTrap.cpp - BlockLimit.cpp - BlockLimitSym.cpp - BlockLowPass.cpp - BlockLowPass2.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(controllib + block/Block.cpp + block/BlockParam.cpp + BlockDerivative.cpp + BlockHighPass.cpp + BlockIntegral.cpp + BlockIntegralTrap.cpp + BlockLimit.cpp + BlockLimitSym.cpp + BlockLowPass.cpp + BlockLowPass2.cpp +) \ No newline at end of file diff --git a/src/lib/controllib/block/BlockParam.hpp b/src/lib/controllib/block/BlockParam.hpp index 841ba879c9..ac1f33f9bd 100644 --- a/src/lib/controllib/block/BlockParam.hpp +++ b/src/lib/controllib/block/BlockParam.hpp @@ -43,7 +43,7 @@ #include #include -#include +#include namespace control { diff --git a/src/lib/controllib/controllib_test/CMakeLists.txt b/src/lib/controllib/controllib_test/CMakeLists.txt index e1cf608bcb..9b63b25920 100644 --- a/src/lib/controllib/controllib_test/CMakeLists.txt +++ b/src/lib/controllib/controllib_test/CMakeLists.txt @@ -37,7 +37,6 @@ px4_add_module( SRCS controllib_test_main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/lib/controllib/controllib_test/test_params.c b/src/lib/controllib/controllib_test/test_params.c index 5ef469b3e2..bfaa19636b 100644 --- a/src/lib/controllib/controllib_test/test_params.c +++ b/src/lib/controllib/controllib_test/test_params.c @@ -1,4 +1,4 @@ -#include +#include // WARNING: // do not changes these unless // you want to recompute the diff --git a/src/lib/conversion/CMakeLists.txt b/src/lib/conversion/CMakeLists.txt index f4dff925e8..8fdc3b1155 100644 --- a/src/lib/conversion/CMakeLists.txt +++ b/src/lib/conversion/CMakeLists.txt @@ -30,12 +30,5 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__conversion - COMPILE_FLAGS - SRCS - rotation.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(conversion rotation.cpp) diff --git a/src/lib/drivers/CMakeLists.txt b/src/lib/drivers/CMakeLists.txt new file mode 100644 index 0000000000..688d2c2101 --- /dev/null +++ b/src/lib/drivers/CMakeLists.txt @@ -0,0 +1,36 @@ +############################################################################ +# +# Copyright (c) 2017 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +add_subdirectory(airspeed) +add_subdirectory(device) +add_subdirectory(led) diff --git a/src/lib/drivers/airspeed/CMakeLists.txt b/src/lib/drivers/airspeed/CMakeLists.txt new file mode 100644 index 0000000000..4161c5faca --- /dev/null +++ b/src/lib/drivers/airspeed/CMakeLists.txt @@ -0,0 +1,35 @@ +############################################################################ +# +# Copyright (c) 2015 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +px4_add_library(drivers__airspeed airspeed.cpp) +target_link_libraries(drivers__airspeed PRIVATE drivers__device) diff --git a/src/drivers/airspeed/airspeed.cpp b/src/lib/drivers/airspeed/airspeed.cpp similarity index 99% rename from src/drivers/airspeed/airspeed.cpp rename to src/lib/drivers/airspeed/airspeed.cpp index 12d1e821f4..0402b33b29 100644 --- a/src/drivers/airspeed/airspeed.cpp +++ b/src/lib/drivers/airspeed/airspeed.cpp @@ -45,8 +45,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/src/drivers/airspeed/airspeed.h b/src/lib/drivers/airspeed/airspeed.h similarity index 99% rename from src/drivers/airspeed/airspeed.h rename to src/lib/drivers/airspeed/airspeed.h index 384403cb54..4c1b396682 100644 --- a/src/drivers/airspeed/airspeed.h +++ b/src/lib/drivers/airspeed/airspeed.h @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/drivers/device/CDev.cpp b/src/lib/drivers/device/CDev.cpp similarity index 100% rename from src/drivers/device/CDev.cpp rename to src/lib/drivers/device/CDev.cpp diff --git a/src/drivers/device/CDev.hpp b/src/lib/drivers/device/CDev.hpp similarity index 100% rename from src/drivers/device/CDev.hpp rename to src/lib/drivers/device/CDev.hpp diff --git a/src/drivers/device/CMakeLists.txt b/src/lib/drivers/device/CMakeLists.txt similarity index 91% rename from src/drivers/device/CMakeLists.txt rename to src/lib/drivers/device/CMakeLists.txt index 0c5c539586..1e690cac0f 100644 --- a/src/drivers/device/CMakeLists.txt +++ b/src/lib/drivers/device/CMakeLists.txt @@ -51,13 +51,13 @@ else() ) endif() -px4_add_module( - MODULE drivers__device - SRCS - CDev.cpp - ringbuffer.cpp - integrator.cpp - ${SRCS_PLATFORM} - DEPENDS - platforms__common - ) \ No newline at end of file +px4_add_library(drivers__device + CDev.cpp + ringbuffer.cpp + integrator.cpp + ${SRCS_PLATFORM} + ) + +if (${OS} STREQUAL "nuttx") + target_link_libraries(drivers__device PRIVATE nuttx_arch) +endif() diff --git a/src/drivers/device/Device.hpp b/src/lib/drivers/device/Device.hpp similarity index 100% rename from src/drivers/device/Device.hpp rename to src/lib/drivers/device/Device.hpp diff --git a/src/drivers/device/device.h b/src/lib/drivers/device/device.h similarity index 100% rename from src/drivers/device/device.h rename to src/lib/drivers/device/device.h diff --git a/src/drivers/device/i2c.h b/src/lib/drivers/device/i2c.h similarity index 100% rename from src/drivers/device/i2c.h rename to src/lib/drivers/device/i2c.h diff --git a/src/drivers/device/integrator.cpp b/src/lib/drivers/device/integrator.cpp similarity index 100% rename from src/drivers/device/integrator.cpp rename to src/lib/drivers/device/integrator.cpp diff --git a/src/drivers/device/integrator.h b/src/lib/drivers/device/integrator.h similarity index 100% rename from src/drivers/device/integrator.h rename to src/lib/drivers/device/integrator.h diff --git a/src/drivers/device/nuttx/I2C.cpp b/src/lib/drivers/device/nuttx/I2C.cpp similarity index 100% rename from src/drivers/device/nuttx/I2C.cpp rename to src/lib/drivers/device/nuttx/I2C.cpp diff --git a/src/drivers/device/nuttx/I2C.hpp b/src/lib/drivers/device/nuttx/I2C.hpp similarity index 100% rename from src/drivers/device/nuttx/I2C.hpp rename to src/lib/drivers/device/nuttx/I2C.hpp diff --git a/src/drivers/device/nuttx/SPI.cpp b/src/lib/drivers/device/nuttx/SPI.cpp similarity index 100% rename from src/drivers/device/nuttx/SPI.cpp rename to src/lib/drivers/device/nuttx/SPI.cpp diff --git a/src/drivers/device/nuttx/SPI.hpp b/src/lib/drivers/device/nuttx/SPI.hpp similarity index 100% rename from src/drivers/device/nuttx/SPI.hpp rename to src/lib/drivers/device/nuttx/SPI.hpp diff --git a/src/drivers/device/nuttx/cdev_platform.cpp b/src/lib/drivers/device/nuttx/cdev_platform.cpp similarity index 100% rename from src/drivers/device/nuttx/cdev_platform.cpp rename to src/lib/drivers/device/nuttx/cdev_platform.cpp diff --git a/src/drivers/device/nuttx/cdev_platform.hpp b/src/lib/drivers/device/nuttx/cdev_platform.hpp similarity index 100% rename from src/drivers/device/nuttx/cdev_platform.hpp rename to src/lib/drivers/device/nuttx/cdev_platform.hpp diff --git a/src/drivers/device/posix/I2C.cpp b/src/lib/drivers/device/posix/I2C.cpp similarity index 100% rename from src/drivers/device/posix/I2C.cpp rename to src/lib/drivers/device/posix/I2C.cpp diff --git a/src/drivers/device/posix/I2C.hpp b/src/lib/drivers/device/posix/I2C.hpp similarity index 100% rename from src/drivers/device/posix/I2C.hpp rename to src/lib/drivers/device/posix/I2C.hpp diff --git a/src/drivers/device/posix/SPI.hpp b/src/lib/drivers/device/posix/SPI.hpp similarity index 100% rename from src/drivers/device/posix/SPI.hpp rename to src/lib/drivers/device/posix/SPI.hpp diff --git a/src/drivers/device/posix/cdev_platform.cpp b/src/lib/drivers/device/posix/cdev_platform.cpp similarity index 100% rename from src/drivers/device/posix/cdev_platform.cpp rename to src/lib/drivers/device/posix/cdev_platform.cpp diff --git a/src/drivers/device/posix/cdev_platform.hpp b/src/lib/drivers/device/posix/cdev_platform.hpp similarity index 100% rename from src/drivers/device/posix/cdev_platform.hpp rename to src/lib/drivers/device/posix/cdev_platform.hpp diff --git a/src/drivers/device/posix/vfile.cpp b/src/lib/drivers/device/posix/vfile.cpp similarity index 100% rename from src/drivers/device/posix/vfile.cpp rename to src/lib/drivers/device/posix/vfile.cpp diff --git a/src/drivers/device/posix/vfile.h b/src/lib/drivers/device/posix/vfile.h similarity index 100% rename from src/drivers/device/posix/vfile.h rename to src/lib/drivers/device/posix/vfile.h diff --git a/src/drivers/device/ringbuffer.cpp b/src/lib/drivers/device/ringbuffer.cpp similarity index 100% rename from src/drivers/device/ringbuffer.cpp rename to src/lib/drivers/device/ringbuffer.cpp diff --git a/src/drivers/device/ringbuffer.h b/src/lib/drivers/device/ringbuffer.h similarity index 100% rename from src/drivers/device/ringbuffer.h rename to src/lib/drivers/device/ringbuffer.h diff --git a/src/drivers/device/spi.h b/src/lib/drivers/device/spi.h similarity index 100% rename from src/drivers/device/spi.h rename to src/lib/drivers/device/spi.h diff --git a/src/lib/drivers/led/CMakeLists.txt b/src/lib/drivers/led/CMakeLists.txt new file mode 100644 index 0000000000..9a0bb3ea5f --- /dev/null +++ b/src/lib/drivers/led/CMakeLists.txt @@ -0,0 +1,35 @@ +############################################################################ +# +# Copyright (c) 2015 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +px4_add_library(drivers__led led.cpp) +target_link_libraries(drivers__led PRIVATE drivers__device) diff --git a/src/drivers/led/led.cpp b/src/lib/drivers/led/led.cpp similarity index 100% rename from src/drivers/led/led.cpp rename to src/lib/drivers/led/led.cpp diff --git a/src/lib/led/CMakeLists.txt b/src/lib/led/CMakeLists.txt index 14d6305d6c..1306dbc12e 100644 --- a/src/lib/led/CMakeLists.txt +++ b/src/lib/led/CMakeLists.txt @@ -30,11 +30,5 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__led - SRCS - led.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(led led.cpp) diff --git a/src/lib/mathlib/CMakeLists.txt b/src/lib/mathlib/CMakeLists.txt index f51827d78b..574f27002a 100644 --- a/src/lib/mathlib/CMakeLists.txt +++ b/src/lib/mathlib/CMakeLists.txt @@ -30,11 +30,9 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__mathlib - COMPILE_FLAGS - SRCS - math/test/test.cpp - math/matrix_alg.cpp - math/filter/LowPassFilter2p.cpp - ) + +px4_add_library(mathlib + math/test/test.cpp + math/matrix_alg.cpp + math/filter/LowPassFilter2p.cpp +) diff --git a/src/lib/mixer/CMakeLists.txt b/src/lib/mixer/CMakeLists.txt index e0432aa2e6..44b819c63e 100644 --- a/src/lib/mixer/CMakeLists.txt +++ b/src/lib/mixer/CMakeLists.txt @@ -83,20 +83,14 @@ add_custom_command( ) add_custom_target(mixer_gen_6dof DEPENDS mixer_multirotor_6dof.generated.h) +add_library(mixer + mixer.cpp + mixer_group.cpp + mixer_helicopter.cpp + mixer_load.c + mixer_multirotor.cpp + mixer_simple.cpp +) +target_include_directories(mixer PRIVATE ${PX4_BINARY_DIR}/src/lib/mixer) -px4_add_module( - MODULE lib__mixer - INCLUDES - ${CMAKE_CURRENT_BINARY_DIR} - SRCS - mixer.cpp - mixer_group.cpp - mixer_helicopter.cpp - mixer_load.c - mixer_multirotor.cpp - mixer_simple.cpp - DEPENDS - mixer_gen - mixer_gen_6dof - platforms__common - ) +add_dependencies(mixer mixer_gen mixer_gen_6dof prebuild_targets) diff --git a/src/modules/systemlib/param/CMakeLists.txt b/src/lib/parameters/CMakeLists.txt similarity index 83% rename from src/modules/systemlib/param/CMakeLists.txt rename to src/lib/parameters/CMakeLists.txt index ab9e244a5f..5b3d889b27 100644 --- a/src/modules/systemlib/param/CMakeLists.txt +++ b/src/lib/parameters/CMakeLists.txt @@ -31,24 +31,14 @@ # ############################################################################ -set(SRCS) -if ("${CONFIG_SHMEM}" STREQUAL "1") - message(STATUS "parameters shared memory enabled") - list(APPEND SRCS - param_shmem.c - ) -else() - list(APPEND SRCS - param.c - ) -endif() +add_subdirectory(tinybson) if (NOT PARAM_DEFAULT_OVERRIDES) set(PARAM_DEFAULT_OVERRIDES "{}") endif() # get full path for each module -set(module_list) +get_property(module_list GLOBAL PROPERTY PX4_MODULE_PATHS) if (DISABLE_PARAMS_MODULE_SCOPING) # search all directories with .c files (potentially containing parameters) file(GLOB_RECURSE new_list @@ -95,6 +85,7 @@ add_custom_command(OUTPUT ${parameters_xml} px4params/srcscanner.py px4params/xmlout.py px_process_params.py + parameters_injected.xml COMMENT "Generating parameters.xml" ) add_custom_target(parameters_xml DEPENDS ${parameters_xml}) @@ -111,19 +102,38 @@ add_custom_command(OUTPUT px4_parameters.c px4_parameters.h px4_parameters_publi templates/px4_parameters_public.h.jinja ) -add_custom_target(parameter_headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/px4_parameters_public.h) -add_dependencies(prebuild_targets parameter_headers) +set(SRCS) +if ("${CONFIG_SHMEM}" STREQUAL "1") + message(STATUS "parameters shared memory enabled") + list(APPEND SRCS param_shmem.c) +else() + list(APPEND SRCS param.c) +endif() -px4_add_module( - MODULE modules__systemlib__param - COMPILE_FLAGS - -Wno-sign-compare # TODO: fix all sign-compare - INCLUDES - ${CMAKE_CURRENT_BINARY_DIR} - SRCS +if(${OS} STREQUAL "nuttx") + add_subdirectory(flashparams) +endif() + +# TODO: find a better way to do this +if (NOT "${CONFIG}" MATCHES "px4io") + add_library(parameters ${SRCS} px4_parameters.c px4_parameters.h - DEPENDS - platforms__common - ) + px4_parameters_public.h + ) + add_dependencies(parameters prebuild_targets) + + if ("${CONFIG_SHMEM}" STREQUAL "1") + target_link_libraries(parameters PRIVATE px4_layer) + endif() + + target_link_libraries(parameters PRIVATE perf tinybson) + target_compile_options(parameters PRIVATE -Wno-sign-compare) # TODO: fix this +else() + add_library(parameters ${PX4_SOURCE_DIR}/src/platforms/empty.c) +endif() + +if(${OS} STREQUAL "nuttx") + target_link_libraries(parameters PRIVATE flashparams) +endif() diff --git a/src/lib/parameters/flashparams/CMakeLists.txt b/src/lib/parameters/flashparams/CMakeLists.txt new file mode 100644 index 0000000000..c9819eb48a --- /dev/null +++ b/src/lib/parameters/flashparams/CMakeLists.txt @@ -0,0 +1,40 @@ +############################################################################ +# +# Copyright (c) 2017 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +add_library(flashparams + flashfs.c + flashparams.c +) +add_dependencies(flashparams prebuild_targets) +target_compile_options(flashparams PRIVATE -Wno-sign-compare) # TODO: fix this +target_link_libraries(flashparams PRIVATE nuttx_arch) \ No newline at end of file diff --git a/src/modules/systemlib/flashparams/flashfs.c b/src/lib/parameters/flashparams/flashfs.c similarity index 99% rename from src/modules/systemlib/flashparams/flashfs.c rename to src/lib/parameters/flashparams/flashfs.c index 6d532bb34c..bce8336c15 100644 --- a/src/modules/systemlib/flashparams/flashfs.c +++ b/src/lib/parameters/flashparams/flashfs.c @@ -651,7 +651,7 @@ static int erase_sector(sector_descriptor_t *sm, flash_entry_header_t *pf) last_erased = sm->page; ssize_t size = up_progmem_erasepage(page); - if (size < 0 || size != sm->size) { + if (size < 0 || size != (ssize_t)sm->size) { rv = size; } } diff --git a/src/modules/systemlib/flashparams/flashfs.h b/src/lib/parameters/flashparams/flashfs.h similarity index 100% rename from src/modules/systemlib/flashparams/flashfs.h rename to src/lib/parameters/flashparams/flashfs.h diff --git a/src/modules/systemlib/flashparams/flashparams.c b/src/lib/parameters/flashparams/flashparams.c similarity index 99% rename from src/modules/systemlib/flashparams/flashparams.c rename to src/lib/parameters/flashparams/flashparams.c index f74d2adb36..874493c9ee 100644 --- a/src/modules/systemlib/flashparams/flashparams.c +++ b/src/lib/parameters/flashparams/flashparams.c @@ -49,9 +49,10 @@ #include #include -#include "systemlib/param/param.h" +#include + #include "systemlib/uthash/utarray.h" -#include "systemlib/bson/tinybson.h" +#include #include "flashparams.h" #include "flashfs.h" diff --git a/src/modules/systemlib/flashparams/flashparams.h b/src/lib/parameters/flashparams/flashparams.h similarity index 100% rename from src/modules/systemlib/flashparams/flashparams.h rename to src/lib/parameters/flashparams/flashparams.h diff --git a/src/modules/systemlib/param/param.c b/src/lib/parameters/param.c similarity index 97% rename from src/modules/systemlib/param/param.c rename to src/lib/parameters/param.c index 3cddd4e9dc..759bca05fc 100644 --- a/src/modules/systemlib/param/param.c +++ b/src/lib/parameters/param.c @@ -42,7 +42,8 @@ */ #include "param.h" -#include "px4_parameters.h" +#include +#include "tinybson/tinybson.h" #include #include @@ -54,8 +55,8 @@ #include #include #include -#include -#include + +#include #include //#define PARAM_NO_ORB ///< if defined, avoid uorb dependency. This disables publication of parameter_update on param change @@ -69,7 +70,7 @@ #if !defined(FLASH_BASED_PARAMS) # define FLASH_PARAMS_EXPOSE #else -# include "systemlib/flashparams/flashparams.h" +# include "flashparams/flashparams.h" #endif static const char *param_default_file = PX4_ROOTFSDIR"/eeprom/parameters"; @@ -392,8 +393,8 @@ param_count_used(void) // ensure the allocation has been done if (get_param_info_count()) { - for (unsigned i = 0; i < size_param_changed_storage_bytes; i++) { - for (unsigned j = 0; j < bits_per_allocation_unit; j++) { + for (int i = 0; i < size_param_changed_storage_bytes; i++) { + for (int j = 0; j < bits_per_allocation_unit; j++) { if (param_changed_storage[i] & (1 << j)) { count++; } @@ -421,12 +422,12 @@ param_for_used_index(unsigned index) { int count = get_param_info_count(); - if (count && index < count) { + if (count && (int)index < count) { /* walk all params and count used params */ unsigned used_count = 0; - for (unsigned i = 0; i < (unsigned)size_param_changed_storage_bytes; i++) { - for (unsigned j = 0; j < bits_per_allocation_unit; j++) { + for (int i = 0; i < size_param_changed_storage_bytes; i++) { + for (int j = 0; j < bits_per_allocation_unit; j++) { if (param_changed_storage[i] & (1 << j)) { /* we found the right used count, @@ -466,11 +467,11 @@ param_get_used_index(param_t param) /* walk all params and count, now knowing that it has a valid index */ int used_count = 0; - for (unsigned i = 0; i < (unsigned)size_param_changed_storage_bytes; i++) { - for (unsigned j = 0; j < bits_per_allocation_unit; j++) { + for (int i = 0; i < size_param_changed_storage_bytes; i++) { + for (int j = 0; j < bits_per_allocation_unit; j++) { if (param_changed_storage[i] & (1 << j)) { - if ((unsigned)param == i * bits_per_allocation_unit + j) { + if ((int)param == i * bits_per_allocation_unit + j) { return used_count; } @@ -544,7 +545,6 @@ param_size(param_t param) return 0; } - /** * Obtain a pointer to the storage allocated for a parameter. * @@ -965,7 +965,7 @@ param_save_default(void) if (fd < 0) { PX4_ERR("failed to open param file: %s", filename); - return ERROR; + return PX4_ERROR; } int attempts = 5; @@ -1007,7 +1007,7 @@ param_load_default(void) if (fd_load < 0) { /* no parameter file is OK, otherwise this is an error */ if (errno != ENOENT) { - warn("open '%s' for reading failed", param_get_default_file()); + PX4_ERR("open '%s' for reading failed", param_get_default_file()); return -1; } @@ -1018,7 +1018,7 @@ param_load_default(void) PARAM_CLOSE(fd_load); if (result != 0) { - warn("error reading parameters from '%s'", param_get_default_file()); + PX4_ERR("error reading parameters from '%s'", param_get_default_file()); return -2; } @@ -1280,7 +1280,7 @@ param_import_internal(int fd, bool mark_saved) int result = -1; if (bson_decoder_init_file(&decoder, fd, param_import_callback, &state)) { - PX4_WARN("decoder init failed"); + PX4_ERR("decoder init failed"); return -ENODATA; } diff --git a/src/modules/systemlib/param/param.h b/src/lib/parameters/param.h similarity index 100% rename from src/modules/systemlib/param/param.h rename to src/lib/parameters/param.h diff --git a/src/modules/systemlib/param/param_shmem.c b/src/lib/parameters/param_shmem.c similarity index 99% rename from src/modules/systemlib/param/param_shmem.c rename to src/lib/parameters/param_shmem.c index 350194b046..d201e27e47 100644 --- a/src/modules/systemlib/param/param_shmem.c +++ b/src/lib/parameters/param_shmem.c @@ -58,13 +58,13 @@ #include -#include "systemlib/param/param.h" +#include "param.h" #include "systemlib/uthash/utarray.h" -#include "systemlib/bson/tinybson.h" +#include "tinybson/tinybson.h" #include "uORB/uORB.h" #include "uORB/topics/parameter_update.h" -#include "px4_parameters.h" +#include #include diff --git a/src/modules/systemlib/param/parameters_injected.xml b/src/lib/parameters/parameters_injected.xml similarity index 100% rename from src/modules/systemlib/param/parameters_injected.xml rename to src/lib/parameters/parameters_injected.xml diff --git a/src/modules/systemlib/param/px4params/README.md b/src/lib/parameters/px4params/README.md similarity index 100% rename from src/modules/systemlib/param/px4params/README.md rename to src/lib/parameters/px4params/README.md diff --git a/src/modules/systemlib/param/px4params/__init__.py b/src/lib/parameters/px4params/__init__.py similarity index 100% rename from src/modules/systemlib/param/px4params/__init__.py rename to src/lib/parameters/px4params/__init__.py diff --git a/src/modules/systemlib/param/px4params/dokuwikiout.py b/src/lib/parameters/px4params/dokuwikiout.py similarity index 100% rename from src/modules/systemlib/param/px4params/dokuwikiout.py rename to src/lib/parameters/px4params/dokuwikiout.py diff --git a/src/modules/systemlib/param/px4params/dokuwikirpc.py b/src/lib/parameters/px4params/dokuwikirpc.py similarity index 100% rename from src/modules/systemlib/param/px4params/dokuwikirpc.py rename to src/lib/parameters/px4params/dokuwikirpc.py diff --git a/src/modules/systemlib/param/px4params/markdownout.py b/src/lib/parameters/px4params/markdownout.py similarity index 100% rename from src/modules/systemlib/param/px4params/markdownout.py rename to src/lib/parameters/px4params/markdownout.py diff --git a/src/modules/systemlib/param/px4params/scope.py b/src/lib/parameters/px4params/scope.py similarity index 100% rename from src/modules/systemlib/param/px4params/scope.py rename to src/lib/parameters/px4params/scope.py diff --git a/src/modules/systemlib/param/px4params/srcparser.py b/src/lib/parameters/px4params/srcparser.py similarity index 100% rename from src/modules/systemlib/param/px4params/srcparser.py rename to src/lib/parameters/px4params/srcparser.py diff --git a/src/modules/systemlib/param/px4params/srcscanner.py b/src/lib/parameters/px4params/srcscanner.py similarity index 100% rename from src/modules/systemlib/param/px4params/srcscanner.py rename to src/lib/parameters/px4params/srcscanner.py diff --git a/src/modules/systemlib/param/px4params/xmlout.py b/src/lib/parameters/px4params/xmlout.py similarity index 100% rename from src/modules/systemlib/param/px4params/xmlout.py rename to src/lib/parameters/px4params/xmlout.py diff --git a/src/modules/systemlib/param/px_generate_params.py b/src/lib/parameters/px_generate_params.py similarity index 100% rename from src/modules/systemlib/param/px_generate_params.py rename to src/lib/parameters/px_generate_params.py diff --git a/src/modules/systemlib/param/px_process_params.py b/src/lib/parameters/px_process_params.py similarity index 100% rename from src/modules/systemlib/param/px_process_params.py rename to src/lib/parameters/px_process_params.py diff --git a/src/modules/systemlib/param/templates/px4_parameters.c.jinja b/src/lib/parameters/templates/px4_parameters.c.jinja similarity index 96% rename from src/modules/systemlib/param/templates/px4_parameters.c.jinja rename to src/lib/parameters/templates/px4_parameters.c.jinja index e13eb962d0..6cf47754b2 100644 --- a/src/modules/systemlib/param/templates/px4_parameters.c.jinja +++ b/src/lib/parameters/templates/px4_parameters.c.jinja @@ -1,5 +1,5 @@ {# jinja syntax: http://jinja.pocoo.org/docs/2.9/templates/ #} -#include +#include "px4_parameters.h" // DO NOT EDIT // This file is autogenerated from paramaters.xml diff --git a/src/modules/systemlib/param/templates/px4_parameters.h.jinja b/src/lib/parameters/templates/px4_parameters.h.jinja similarity index 93% rename from src/modules/systemlib/param/templates/px4_parameters.h.jinja rename to src/lib/parameters/templates/px4_parameters.h.jinja index bf6758e7c9..807aa21c82 100644 --- a/src/modules/systemlib/param/templates/px4_parameters.h.jinja +++ b/src/lib/parameters/templates/px4_parameters.h.jinja @@ -1,6 +1,6 @@ {# jinja syntax: http://jinja.pocoo.org/docs/2.9/templates/ #} #include -#include +#include // DO NOT EDIT // This file is autogenerated from parameters.xml diff --git a/src/modules/systemlib/param/templates/px4_parameters_public.h.jinja b/src/lib/parameters/templates/px4_parameters_public.h.jinja similarity index 96% rename from src/modules/systemlib/param/templates/px4_parameters_public.h.jinja rename to src/lib/parameters/templates/px4_parameters_public.h.jinja index 433ee8e218..f3f22cd013 100644 --- a/src/modules/systemlib/param/templates/px4_parameters_public.h.jinja +++ b/src/lib/parameters/templates/px4_parameters_public.h.jinja @@ -1,6 +1,6 @@ {# jinja syntax: http://jinja.pocoo.org/docs/2.9/templates/ #} #include -#include +#include // DO NOT EDIT // This file is autogenerated from parameters.xml diff --git a/src/lib/parameters/tinybson/CMakeLists.txt b/src/lib/parameters/tinybson/CMakeLists.txt new file mode 100644 index 0000000000..15c45008cf --- /dev/null +++ b/src/lib/parameters/tinybson/CMakeLists.txt @@ -0,0 +1,36 @@ +############################################################################ +# +# Copyright (c) 2018 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +add_library(tinybson tinybson.c) +target_compile_options(tinybson PRIVATE -Wno-sign-compare) # TODO: fix this +add_dependencies(tinybson prebuild_targets) diff --git a/src/modules/systemlib/bson/tinybson.c b/src/lib/parameters/tinybson/tinybson.c similarity index 99% rename from src/modules/systemlib/bson/tinybson.c rename to src/lib/parameters/tinybson/tinybson.c index fa6f6924d0..8fc2eace46 100644 --- a/src/modules/systemlib/bson/tinybson.c +++ b/src/lib/parameters/tinybson/tinybson.c @@ -64,7 +64,7 @@ read_x(bson_decoder_t decoder, void *p, size_t s) CODER_CHECK(decoder); if (decoder->fd > -1) { - return (BSON_READ(decoder->fd, p, s) == (int)s) ? 0 : -1; + return (BSON_READ(decoder->fd, p, s) == s) ? 0 : -1; } if (decoder->buf != NULL) { @@ -352,7 +352,7 @@ write_x(bson_encoder_t encoder, const void *p, size_t s) debug("writing buffer (%d) to disk", encoder->bufpos); int ret = BSON_WRITE(encoder->fd, encoder->buf, encoder->bufpos); - if (ret == encoder->bufpos) { + if (ret == (int)encoder->bufpos) { // reset buffer to beginning and continue encoder->bufpos = 0; @@ -493,7 +493,7 @@ bson_encoder_fini(bson_encoder_t encoder) /* write final buffer to disk */ int ret = BSON_WRITE(encoder->fd, encoder->buf, encoder->bufpos); - if (ret != encoder->bufpos) { + if (ret != (int)encoder->bufpos) { CODER_KILL(encoder, "write error"); } diff --git a/src/modules/systemlib/bson/tinybson.h b/src/lib/parameters/tinybson/tinybson.h similarity index 100% rename from src/modules/systemlib/bson/tinybson.h rename to src/lib/parameters/tinybson/tinybson.h diff --git a/src/lib/perf/CMakeLists.txt b/src/lib/perf/CMakeLists.txt new file mode 100644 index 0000000000..70849ad3f2 --- /dev/null +++ b/src/lib/perf/CMakeLists.txt @@ -0,0 +1,35 @@ +############################################################################ +# +# Copyright (c) 2017 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +add_library(perf perf_counter.c) +add_dependencies(perf prebuild_targets) \ No newline at end of file diff --git a/src/modules/systemlib/perf_counter.c b/src/lib/perf/perf_counter.c similarity index 100% rename from src/modules/systemlib/perf_counter.c rename to src/lib/perf/perf_counter.c diff --git a/src/modules/systemlib/perf_counter.h b/src/lib/perf/perf_counter.h similarity index 100% rename from src/modules/systemlib/perf_counter.h rename to src/lib/perf/perf_counter.h diff --git a/src/lib/rc/CMakeLists.txt b/src/lib/rc/CMakeLists.txt index 21059b9ac4..02cf806752 100644 --- a/src/lib/rc/CMakeLists.txt +++ b/src/lib/rc/CMakeLists.txt @@ -30,17 +30,13 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__rc - COMPILE_FLAGS - -Wno-unused-result - SRCS - st24.cpp - sumd.cpp - sbus.cpp - dsm.cpp - common_rc.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +add_library(rc + st24.cpp + sumd.cpp + sbus.cpp + dsm.cpp + common_rc.cpp +) +target_compile_options(rc PRIVATE -Wno-unused-result) +target_link_libraries(rc PRIVATE prebuild_targets) diff --git a/src/lib/rc/rc_tests/CMakeLists.txt b/src/lib/rc/rc_tests/CMakeLists.txt index 8a5be79ec2..61cf326748 100644 --- a/src/lib/rc/rc_tests/CMakeLists.txt +++ b/src/lib/rc/rc_tests/CMakeLists.txt @@ -30,6 +30,7 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( MODULE lib__rc__rc_tests MAIN rc_tests @@ -38,7 +39,5 @@ px4_add_module( SRCS RCTest.cpp DEPENDS - platforms__common + rc ) - -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/lib/terrain_estimation/CMakeLists.txt b/src/lib/terrain_estimation/CMakeLists.txt index 80656bc44c..89b4d534a2 100644 --- a/src/lib/terrain_estimation/CMakeLists.txt +++ b/src/lib/terrain_estimation/CMakeLists.txt @@ -30,13 +30,5 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__terrain_estimation - STACK_MAIN 1024 - COMPILE_FLAGS - SRCS - terrain_estimator.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(terrain_estimation terrain_estimator.cpp) diff --git a/src/lib/tunes/CMakeLists.txt b/src/lib/tunes/CMakeLists.txt index 97b4c15dc9..deeb8f3139 100644 --- a/src/lib/tunes/CMakeLists.txt +++ b/src/lib/tunes/CMakeLists.txt @@ -30,13 +30,8 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -px4_add_module( - MODULE lib__tunes - SRCS - tunes.cpp - default_tunes.cpp - DEPENDS - platforms__common - modules__uORB - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + +px4_add_library(tunes + tunes.cpp + default_tunes.cpp +) \ No newline at end of file diff --git a/src/lib/version/CMakeLists.txt b/src/lib/version/CMakeLists.txt index edb7750478..e5cb87b792 100644 --- a/src/lib/version/CMakeLists.txt +++ b/src/lib/version/CMakeLists.txt @@ -64,13 +64,13 @@ add_custom_command(OUTPUT ${px4_git_ver_header} set_source_files_properties(${px4_git_ver_header} PROPERTIES GENERATED TRUE) add_custom_target(ver_gen ALL DEPENDS ${px4_git_ver_header}) -px4_add_module( - MODULE lib__version - COMPILE_FLAGS - SRCS - version.c - DEPENDS - ver_gen - platforms__common - ) +# The URL for the elf file for crash logging +if (DEFINED ENV{BUILD_URI}) + set(BUILD_URI $ENV{BUILD_URI}) +else() + set(BUILD_URI "localhost") +endif() +add_definitions(-DBUILD_URI=${BUILD_URI}) + +px4_add_library(version version.c ${px4_git_ver_header}) diff --git a/src/modules/attitude_estimator_q/CMakeLists.txt b/src/modules/attitude_estimator_q/CMakeLists.txt index 22405a1d64..188c481ead 100644 --- a/src/modules/attitude_estimator_q/CMakeLists.txt +++ b/src/modules/attitude_estimator_q/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( SRCS attitude_estimator_q_main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp b/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp index da59a63c65..4a17a09391 100644 --- a/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp +++ b/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp @@ -48,8 +48,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/modules/attitude_estimator_q/attitude_estimator_q_params.c b/src/modules/attitude_estimator_q/attitude_estimator_q_params.c index 0d84016e0a..ef1e9e7d99 100644 --- a/src/modules/attitude_estimator_q/attitude_estimator_q_params.c +++ b/src/modules/attitude_estimator_q/attitude_estimator_q_params.c @@ -39,7 +39,7 @@ * @author Anton Babushkin */ -#include +#include /** * Complimentary filter accelerometer weight diff --git a/src/modules/camera_feedback/CMakeLists.txt b/src/modules/camera_feedback/CMakeLists.txt index ca2b089103..cd168449fe 100644 --- a/src/modules/camera_feedback/CMakeLists.txt +++ b/src/modules/camera_feedback/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS camera_feedback.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/camera_feedback/camera_feedback.hpp b/src/modules/camera_feedback/camera_feedback.hpp index 7efeffbdbc..6b4f30f247 100644 --- a/src/modules/camera_feedback/camera_feedback.hpp +++ b/src/modules/camera_feedback/camera_feedback.hpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/commander/CMakeLists.txt b/src/modules/commander/CMakeLists.txt index 44d84bca1c..aa0aab7fa8 100644 --- a/src/modules/commander/CMakeLists.txt +++ b/src/modules/commander/CMakeLists.txt @@ -52,6 +52,5 @@ px4_add_module( PreflightCheck.cpp arm_auth.cpp DEPENDS - platforms__common + df_driver_framework ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/commander/PreflightCheck.cpp b/src/modules/commander/PreflightCheck.cpp index de4abe9a33..ec4d7f73aa 100644 --- a/src/modules/commander/PreflightCheck.cpp +++ b/src/modules/commander/PreflightCheck.cpp @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/commander/accelerometer_calibration.cpp b/src/modules/commander/accelerometer_calibration.cpp index bbf504b45b..b2777609bf 100644 --- a/src/modules/commander/accelerometer_calibration.cpp +++ b/src/modules/commander/accelerometer_calibration.cpp @@ -143,7 +143,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/commander/airspeed_calibration.cpp b/src/modules/commander/airspeed_calibration.cpp index 93dc0eed52..d172a2a8f3 100644 --- a/src/modules/commander/airspeed_calibration.cpp +++ b/src/modules/commander/airspeed_calibration.cpp @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/commander/baro_calibration.cpp b/src/modules/commander/baro_calibration.cpp index e71068e024..acd0cf71e8 100644 --- a/src/modules/commander/baro_calibration.cpp +++ b/src/modules/commander/baro_calibration.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include int do_baro_calibration(orb_advert_t *mavlink_log_pub) { diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 58a5fd7c51..a7b5fba32e 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -76,7 +76,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/commander/commander_helper.cpp b/src/modules/commander/commander_helper.cpp index e4158a6059..418de3d920 100644 --- a/src/modules/commander/commander_helper.cpp +++ b/src/modules/commander/commander_helper.cpp @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/commander/commander_params.c b/src/modules/commander/commander_params.c index c43df2b144..d582b3974c 100644 --- a/src/modules/commander/commander_params.c +++ b/src/modules/commander/commander_params.c @@ -42,7 +42,7 @@ */ #include -#include +#include /** * Roll trim diff --git a/src/modules/commander/commander_tests/CMakeLists.txt b/src/modules/commander/commander_tests/CMakeLists.txt index 1a604136ad..692b95f106 100644 --- a/src/modules/commander/commander_tests/CMakeLists.txt +++ b/src/modules/commander/commander_tests/CMakeLists.txt @@ -39,6 +39,4 @@ px4_add_module( ../state_machine_helper.cpp ../PreflightCheck.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/commander/gyro_calibration.cpp b/src/modules/commander/gyro_calibration.cpp index 05aefd0ead..2e5e33a04e 100644 --- a/src/modules/commander/gyro_calibration.cpp +++ b/src/modules/commander/gyro_calibration.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include static const char *sensor_name = "gyro"; diff --git a/src/modules/commander/mag_calibration.cpp b/src/modules/commander/mag_calibration.cpp index 08047441e6..e05ee2d227 100644 --- a/src/modules/commander/mag_calibration.cpp +++ b/src/modules/commander/mag_calibration.cpp @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/commander/rc_calibration.cpp b/src/modules/commander/rc_calibration.cpp index bbc8bd7789..cbcd8ece3f 100644 --- a/src/modules/commander/rc_calibration.cpp +++ b/src/modules/commander/rc_calibration.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include int do_trim_calibration(orb_advert_t *mavlink_log_pub) diff --git a/src/modules/dataman/CMakeLists.txt b/src/modules/dataman/CMakeLists.txt index 73667d9dd8..1b9d3a300c 100644 --- a/src/modules/dataman/CMakeLists.txt +++ b/src/modules/dataman/CMakeLists.txt @@ -38,7 +38,4 @@ px4_add_module( -Wno-sign-compare # TODO: fix all sign-compare SRCS dataman.cpp - DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/dataman/dataman.cpp b/src/modules/dataman/dataman.cpp index a252648b2d..050163b4b1 100644 --- a/src/modules/dataman/dataman.cpp +++ b/src/modules/dataman/dataman.cpp @@ -60,7 +60,7 @@ #include #include "dataman.h" -#include +#include #if defined(FLASH_BASED_DATAMAN) #include diff --git a/src/modules/events/CMakeLists.txt b/src/modules/events/CMakeLists.txt index 13c5b16f99..1ae991d766 100644 --- a/src/modules/events/CMakeLists.txt +++ b/src/modules/events/CMakeLists.txt @@ -47,7 +47,6 @@ px4_add_module( status_display.cpp set_leds.cpp DEPENDS - platforms__common modules__uORB ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/fw_att_control/CMakeLists.txt b/src/modules/fw_att_control/CMakeLists.txt index 90846f8714..da0d301af4 100644 --- a/src/modules/fw_att_control/CMakeLists.txt +++ b/src/modules/fw_att_control/CMakeLists.txt @@ -36,7 +36,6 @@ px4_add_module( SRCS FixedwingAttitudeControl.cpp DEPENDS - platforms__common git_ecl ecl ) diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.hpp b/src/modules/fw_att_control/FixedwingAttitudeControl.hpp index a66e1ebdae..32a51e76f8 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.hpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.hpp @@ -43,8 +43,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp b/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp index 1706e1b825..898eebad7b 100644 --- a/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp +++ b/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp b/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp index 918f0e5ec3..5a7a9d9ef8 100644 --- a/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp +++ b/src/modules/gnd_att_control/GroundRoverAttitudeControl.hpp @@ -48,9 +48,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp b/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp index 47cc6f8093..fdd4872c00 100644 --- a/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp +++ b/src/modules/gnd_pos_control/GroundRoverPositionControl.hpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/gpio_led/CMakeLists.txt b/src/modules/gpio_led/CMakeLists.txt index 34184020ff..8467a1fe7a 100644 --- a/src/modules/gpio_led/CMakeLists.txt +++ b/src/modules/gpio_led/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS gpio_led.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/land_detector/CMakeLists.txt b/src/modules/land_detector/CMakeLists.txt index 4f10a0c382..ea357092b3 100644 --- a/src/modules/land_detector/CMakeLists.txt +++ b/src/modules/land_detector/CMakeLists.txt @@ -43,6 +43,5 @@ px4_add_module( VtolLandDetector.cpp RoverLandDetector.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/land_detector/LandDetector.h b/src/modules/land_detector/LandDetector.h index 08d5c61322..d0a2e55a7d 100644 --- a/src/modules/land_detector/LandDetector.h +++ b/src/modules/land_detector/LandDetector.h @@ -45,8 +45,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/modules/land_detector/MulticopterLandDetector.h b/src/modules/land_detector/MulticopterLandDetector.h index 38d6aa53d0..3c3a3e2fa7 100644 --- a/src/modules/land_detector/MulticopterLandDetector.h +++ b/src/modules/land_detector/MulticopterLandDetector.h @@ -44,8 +44,7 @@ #include "LandDetector.h" -#include -#include +#include #include #include #include diff --git a/src/modules/landing_target_estimator/CMakeLists.txt b/src/modules/landing_target_estimator/CMakeLists.txt index a9e13267c1..b8b8c40755 100644 --- a/src/modules/landing_target_estimator/CMakeLists.txt +++ b/src/modules/landing_target_estimator/CMakeLists.txt @@ -30,6 +30,7 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( MODULE modules__landing_target_estimator MAIN landing_target_estimator @@ -40,6 +41,5 @@ px4_add_module( LandingTargetEstimator.cpp KalmanFilter.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/landing_target_estimator/LandingTargetEstimator.h b/src/modules/landing_target_estimator/LandingTargetEstimator.h index be43df3d10..1180f04009 100644 --- a/src/modules/landing_target_estimator/LandingTargetEstimator.h +++ b/src/modules/landing_target_estimator/LandingTargetEstimator.h @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/modules/load_mon/CMakeLists.txt b/src/modules/load_mon/CMakeLists.txt index fcaaf65af3..7686770292 100644 --- a/src/modules/load_mon/CMakeLists.txt +++ b/src/modules/load_mon/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS load_mon.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/load_mon/load_mon.cpp b/src/modules/load_mon/load_mon.cpp index 2c6d9dec1e..29233e0144 100644 --- a/src/modules/load_mon/load_mon.cpp +++ b/src/modules/load_mon/load_mon.cpp @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/local_position_estimator/CMakeLists.txt b/src/modules/local_position_estimator/CMakeLists.txt index 93db848e28..6c27bde13a 100644 --- a/src/modules/local_position_estimator/CMakeLists.txt +++ b/src/modules/local_position_estimator/CMakeLists.txt @@ -50,6 +50,5 @@ px4_add_module( sensors/land.cpp sensors/landing_target.cpp DEPENDS - platforms__common + controllib ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/local_position_estimator/params.c b/src/modules/local_position_estimator/params.c index e9b37e49a0..c6a78446a8 100644 --- a/src/modules/local_position_estimator/params.c +++ b/src/modules/local_position_estimator/params.c @@ -1,4 +1,4 @@ -#include +#include // 16 is max name length diff --git a/src/modules/logger/CMakeLists.txt b/src/modules/logger/CMakeLists.txt index 881a38c74c..217f2f73f3 100644 --- a/src/modules/logger/CMakeLists.txt +++ b/src/modules/logger/CMakeLists.txt @@ -44,7 +44,5 @@ px4_add_module( log_writer_file.cpp log_writer_mavlink.cpp DEPENDS - platforms__common - modules__uORB + version ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/logger/log_writer_file.h b/src/modules/logger/log_writer_file.h index 7bd8b33bde..ef4d86f4c7 100644 --- a/src/modules/logger/log_writer_file.h +++ b/src/modules/logger/log_writer_file.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include namespace px4 { diff --git a/src/modules/logger/logger.h b/src/modules/logger/logger.h index d808f0f4aa..e71c14d952 100644 --- a/src/modules/logger/logger.h +++ b/src/modules/logger/logger.h @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/mavlink/CMakeLists.txt b/src/modules/mavlink/CMakeLists.txt index dfab7951dc..03b3e2a913 100644 --- a/src/modules/mavlink/CMakeLists.txt +++ b/src/modules/mavlink/CMakeLists.txt @@ -61,6 +61,6 @@ px4_add_module( mavlink_stream.cpp mavlink_ulog.cpp DEPENDS - platforms__common git_mavlink_v2 + conversion ) diff --git a/src/modules/mavlink/mavlink.c b/src/modules/mavlink/mavlink.c index ec4b71bf4d..176ae95919 100644 --- a/src/modules/mavlink/mavlink.c +++ b/src/modules/mavlink/mavlink.c @@ -44,7 +44,7 @@ #include #include #include "mavlink_bridge_header.h" -#include +#include mavlink_system_t mavlink_system = { 1, diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index 1db2ad813e..32161117bd 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -64,9 +64,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/src/modules/mavlink/mavlink_main.h b/src/modules/mavlink/mavlink_main.h index 49afcb5392..4905a33663 100644 --- a/src/modules/mavlink/mavlink_main.h +++ b/src/modules/mavlink/mavlink_main.h @@ -53,8 +53,8 @@ #include #include #endif -#include -#include +#include +#include #include #include #include diff --git a/src/modules/mavlink/mavlink_parameters.h b/src/modules/mavlink/mavlink_parameters.h index 973182b9f0..0838a33795 100644 --- a/src/modules/mavlink/mavlink_parameters.h +++ b/src/modules/mavlink/mavlink_parameters.h @@ -42,7 +42,7 @@ #pragma once -#include +#include #include "mavlink_bridge_header.h" #include diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index a4a10b585d..d889c6c610 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -75,7 +75,7 @@ #include -#include +#include #include #include #include diff --git a/src/modules/mavlink/mavlink_receiver.h b/src/modules/mavlink/mavlink_receiver.h index 81321b7a39..1721c5f549 100644 --- a/src/modules/mavlink/mavlink_receiver.h +++ b/src/modules/mavlink/mavlink_receiver.h @@ -41,7 +41,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/modules/mavlink/mavlink_tests/CMakeLists.txt b/src/modules/mavlink/mavlink_tests/CMakeLists.txt index 622e83a084..de90dd0a3d 100644 --- a/src/modules/mavlink/mavlink_tests/CMakeLists.txt +++ b/src/modules/mavlink/mavlink_tests/CMakeLists.txt @@ -51,6 +51,5 @@ px4_add_module( ../mavlink_ftp.cpp ../mavlink.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/mc_att_control/CMakeLists.txt b/src/modules/mc_att_control/CMakeLists.txt index 9df8e86732..f254cbafa0 100644 --- a/src/modules/mc_att_control/CMakeLists.txt +++ b/src/modules/mc_att_control/CMakeLists.txt @@ -39,4 +39,6 @@ px4_add_module( COMPILE_FLAGS SRCS mc_att_control_main.cpp + DEPENDS + mathlib ) diff --git a/src/modules/mc_att_control/mc_att_control.hpp b/src/modules/mc_att_control/mc_att_control.hpp index 25f1c3297d..178d83ac53 100644 --- a/src/modules/mc_att_control/mc_att_control.hpp +++ b/src/modules/mc_att_control/mc_att_control.hpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/mc_pos_control/CMakeLists.txt b/src/modules/mc_pos_control/CMakeLists.txt index 226874734c..f8e4bfb612 100644 --- a/src/modules/mc_pos_control/CMakeLists.txt +++ b/src/modules/mc_pos_control/CMakeLists.txt @@ -40,6 +40,8 @@ px4_add_module( PositionControl.cpp Utility/ControlMath.cpp DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + controllib + flight_tasks + git_ecl + ecl + ) \ No newline at end of file diff --git a/src/modules/mc_pos_control/PositionControl.hpp b/src/modules/mc_pos_control/PositionControl.hpp index c694d91b3e..62905137aa 100644 --- a/src/modules/mc_pos_control/PositionControl.hpp +++ b/src/modules/mc_pos_control/PositionControl.hpp @@ -43,7 +43,7 @@ #include #include -#include +#include #pragma once diff --git a/src/modules/mc_pos_control/mc_pos_control_tests/CMakeLists.txt b/src/modules/mc_pos_control/mc_pos_control_tests/CMakeLists.txt index a82bdb18f1..88064d3394 100644 --- a/src/modules/mc_pos_control/mc_pos_control_tests/CMakeLists.txt +++ b/src/modules/mc_pos_control/mc_pos_control_tests/CMakeLists.txt @@ -39,6 +39,4 @@ px4_add_module( test_controlmath.cpp ../Utility/ControlMath.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/micrortps_bridge/CMakeLists.txt b/src/modules/micrortps_bridge/CMakeLists.txt index a24e98dc98..83ab0bd9ca 100644 --- a/src/modules/micrortps_bridge/CMakeLists.txt +++ b/src/modules/micrortps_bridge/CMakeLists.txt @@ -104,7 +104,7 @@ if (GENERATE_RTPS_BRIDGE) WORKING_DIRECTORY ${PX4_SOURCE_DIR}/msg/ VERBATIM ) - add_custom_target(uorb_headers_microcdr DEPENDS ${uorb_headers_microcdr}) + add_custom_target(uorb_headers_microcdr_gen DEPENDS ${uorb_headers_microcdr}) # Generate uORB serialization sources add_custom_command(OUTPUT ${uorb_sources_microcdr} @@ -122,7 +122,11 @@ if (GENERATE_RTPS_BRIDGE) VERBATIM ) px4_add_library(uorb_msgs_microcdr ${uorb_sources_microcdr}) - add_dependencies(uorb_msgs_microcdr uorb_headers_microcdr uorb_headers uorb_msgs git_micro_cdr lib__micro-CDR) + add_dependencies(uorb_msgs_microcdr + uorb_headers_microcdr_gen + git_micro_cdr + lib__micro-CDR + ) target_link_libraries(uorb_msgs_microcdr PRIVATE lib__micro-CDR) diff --git a/src/modules/micrortps_bridge/micrortps_client/CMakeLists.txt b/src/modules/micrortps_bridge/micrortps_client/CMakeLists.txt index 49400bff26..aa0273ed1e 100644 --- a/src/modules/micrortps_bridge/micrortps_client/CMakeLists.txt +++ b/src/modules/micrortps_bridge/micrortps_client/CMakeLists.txt @@ -85,21 +85,19 @@ if (NOT "${config_rtps_send_topics}" STREQUAL "" OR NOT "${config_rtps_receive_t ) add_custom_target(topic_bridge_files DEPENDS ${topic_bridge_files_out}) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - include_directories(${CMAKE_CURRENT_BINARY_DIR}/micrortps_client) - px4_add_module( MODULE modules__micrortps_bridge__micrortps_client MAIN micrortps_client STACK_MAIN 4096 + INCLUDES + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/micrortps_client SRCS microRTPS_client_main.cpp ${msg_out_path}/micrortps_client/microRTPS_client.cpp ${msg_out_path}/micrortps_client/microRTPS_transport.cpp DEPENDS - platforms__common topic_bridge_files - uorb_headers_microcdr ) target_link_libraries(modules__micrortps_bridge__micrortps_client PRIVATE uorb_msgs_microcdr) endif() \ No newline at end of file diff --git a/src/modules/muorb/adsp/CMakeLists.txt b/src/modules/muorb/adsp/CMakeLists.txt index 08a191b864..7da84aa170 100644 --- a/src/modules/muorb/adsp/CMakeLists.txt +++ b/src/modules/muorb/adsp/CMakeLists.txt @@ -31,14 +31,8 @@ # ############################################################################ -px4_add_module( - MODULE modules__muorb__adsp - INCLUDES - ${PX4_SOURCE_DIR}/src/modules/uORB - SRCS - px4muorb.cpp - uORBFastRpcChannel.cpp - DEPENDS - generate_px4muorb_stubs - platforms__common - ) +px4_add_library(modules__muorb__adsp + px4muorb.cpp + uORBFastRpcChannel.cpp +) +target_include_directories(modules__muorb__adsp PRIVATE ${PX4_SOURCE_DIR}/src/modules/uORB) diff --git a/src/modules/muorb/adsp/px4muorb.cpp b/src/modules/muorb/adsp/px4muorb.cpp index 6b351062dd..e85b9973ea 100644 --- a/src/modules/muorb/adsp/px4muorb.cpp +++ b/src/modules/muorb/adsp/px4muorb.cpp @@ -42,7 +42,7 @@ #include "px4_log.h" #include "uORB/topics/sensor_combined.h" #include "uORB.h" -#include "systemlib/param/param.h" +#include #include __BEGIN_DECLS diff --git a/src/modules/muorb/krait/CMakeLists.txt b/src/modules/muorb/krait/CMakeLists.txt index ee2281d283..270c4d6b81 100644 --- a/src/modules/muorb/krait/CMakeLists.txt +++ b/src/modules/muorb/krait/CMakeLists.txt @@ -30,7 +30,6 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon") include(hexagon_sdk) px4_add_module( @@ -43,7 +42,4 @@ px4_add_module( uORBKraitFastRpcChannel.cpp px4muorb_KraitRpcWrapper.cpp muorb_main.cpp - DEPENDS - platforms__common - generate_px4muorb_stubs ) diff --git a/src/modules/muorb/krait/px4muorb_KraitRpcWrapper.cpp b/src/modules/muorb/krait/px4muorb_KraitRpcWrapper.cpp index d4aee21d50..52003b557e 100644 --- a/src/modules/muorb/krait/px4muorb_KraitRpcWrapper.cpp +++ b/src/modules/muorb/krait/px4muorb_KraitRpcWrapper.cpp @@ -36,7 +36,7 @@ #include #include "px4muorb_KraitRpcWrapper.hpp" #include -#include "px4muorb.h" +#include #include "px4_log.h" #include #include diff --git a/src/modules/navigator/CMakeLists.txt b/src/modules/navigator/CMakeLists.txt index 6955a2542e..4344f5f826 100644 --- a/src/modules/navigator/CMakeLists.txt +++ b/src/modules/navigator/CMakeLists.txt @@ -54,6 +54,6 @@ px4_add_module( gpsfailure.cpp follow_target.cpp DEPENDS - platforms__common + git_ecl + ecl ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/navigator/navigator.h b/src/modules/navigator/navigator.h index 662cbe5e50..44019c65fe 100644 --- a/src/modules/navigator/navigator.h +++ b/src/modules/navigator/navigator.h @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/position_estimator_inav/CMakeLists.txt b/src/modules/position_estimator_inav/CMakeLists.txt index 8388d371bc..91fd1416a0 100644 --- a/src/modules/position_estimator_inav/CMakeLists.txt +++ b/src/modules/position_estimator_inav/CMakeLists.txt @@ -41,6 +41,5 @@ px4_add_module( position_estimator_inav_main.cpp inertial_filter.cpp DEPENDS - platforms__common + terrain_estimation ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/position_estimator_inav/position_estimator_inav_params.h b/src/modules/position_estimator_inav/position_estimator_inav_params.h index 81932dc200..d8e6de7a16 100644 --- a/src/modules/position_estimator_inav/position_estimator_inav_params.h +++ b/src/modules/position_estimator_inav/position_estimator_inav_params.h @@ -41,7 +41,7 @@ #pragma once -#include +#include struct position_estimator_inav_params { float w_z_baro; diff --git a/src/modules/px4iofirmware/CMakeLists.txt b/src/modules/px4iofirmware/CMakeLists.txt index 37a7e5e9a8..0569cf462c 100644 --- a/src/modules/px4iofirmware/CMakeLists.txt +++ b/src/modules/px4iofirmware/CMakeLists.txt @@ -31,19 +31,25 @@ # ############################################################################ -px4_add_module( - MODULE modules__px4iofirmware - SRCS - ../systemlib/hx_stream.c - ../systemlib/perf_counter.c - ../systemlib/pwm_limit/pwm_limit.c - adc.c - controls.c - mixer.cpp - px4io.c - registers.c - safety.c - serial.c - DEPENDS - platforms__common +add_library(px4iofirmware + hx_stream.c + ../systemlib/pwm_limit/pwm_limit.c + adc.c + controls.c + mixer.cpp + px4io.c + registers.c + safety.c + serial.c ) + +set_property(GLOBAL APPEND PROPERTY PX4_MODULE_LIBRARIES px4iofirmware) +target_link_libraries(px4iofirmware + PUBLIC + nuttx_apps + nuttx_arch + nuttx_c + mixer + rc + perf +) \ No newline at end of file diff --git a/src/modules/px4iofirmware/adc.c b/src/modules/px4iofirmware/adc.c index 63e563d107..459508c3ad 100644 --- a/src/modules/px4iofirmware/adc.c +++ b/src/modules/px4iofirmware/adc.c @@ -44,7 +44,7 @@ #include #include -#include +#include #define DEBUG #include "px4io.h" diff --git a/src/modules/px4iofirmware/controls.c b/src/modules/px4iofirmware/controls.c index 690477f16b..d126f6c28f 100644 --- a/src/modules/px4iofirmware/controls.c +++ b/src/modules/px4iofirmware/controls.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/modules/systemlib/hx_stream.c b/src/modules/px4iofirmware/hx_stream.c similarity index 99% rename from src/modules/systemlib/hx_stream.c rename to src/modules/px4iofirmware/hx_stream.c index 8f388e4078..e8f0b01474 100644 --- a/src/modules/systemlib/hx_stream.c +++ b/src/modules/px4iofirmware/hx_stream.c @@ -47,7 +47,7 @@ #include #include -#include "perf_counter.h" +#include #include "hx_stream.h" diff --git a/src/modules/systemlib/hx_stream.h b/src/modules/px4iofirmware/hx_stream.h similarity index 99% rename from src/modules/systemlib/hx_stream.h rename to src/modules/px4iofirmware/hx_stream.h index b674f192d5..f951e9ee5e 100644 --- a/src/modules/systemlib/hx_stream.h +++ b/src/modules/px4iofirmware/hx_stream.h @@ -43,7 +43,7 @@ #include -#include "perf_counter.h" +#include struct hx_stream; typedef struct hx_stream *hx_stream_t; diff --git a/src/modules/px4iofirmware/px4io.c b/src/modules/px4iofirmware/px4io.c index d3ad58c050..b3e9425bc5 100644 --- a/src/modules/px4iofirmware/px4io.c +++ b/src/modules/px4iofirmware/px4io.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/px4iofirmware/serial.c b/src/modules/px4iofirmware/serial.c index 306d5fe44d..d7dbf35118 100644 --- a/src/modules/px4iofirmware/serial.c +++ b/src/modules/px4iofirmware/serial.c @@ -51,7 +51,7 @@ #include #include #include -#include +#include //#define DEBUG #include "px4io.h" diff --git a/src/modules/replay/CMakeLists.txt b/src/modules/replay/CMakeLists.txt index 76506ec89f..02ba5e40a5 100644 --- a/src/modules/replay/CMakeLists.txt +++ b/src/modules/replay/CMakeLists.txt @@ -40,6 +40,4 @@ px4_add_module( SRCS replay_main.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/sdlog2/CMakeLists.txt b/src/modules/sdlog2/CMakeLists.txt index 2b3447ea45..a7e3091681 100644 --- a/src/modules/sdlog2/CMakeLists.txt +++ b/src/modules/sdlog2/CMakeLists.txt @@ -42,6 +42,5 @@ px4_add_module( sdlog2.c logbuffer.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/sdlog2/logbuffer.h b/src/modules/sdlog2/logbuffer.h index b6503568cd..ba3935513b 100644 --- a/src/modules/sdlog2/logbuffer.h +++ b/src/modules/sdlog2/logbuffer.h @@ -44,7 +44,7 @@ #define SDLOG2_RINGBUFFER_H_ #include -#include +#include struct logbuffer_s { // pointers and size are in bytes diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index 61bc67def5..8c84f187b8 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -103,8 +103,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/modules/sensors/CMakeLists.txt b/src/modules/sensors/CMakeLists.txt index 8bc280d084..30b6572ff5 100644 --- a/src/modules/sensors/CMakeLists.txt +++ b/src/modules/sensors/CMakeLists.txt @@ -46,6 +46,8 @@ px4_add_module( temperature_compensation.cpp DEPENDS - platforms__common + drivers__device + battery + git_ecl + ecl ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/sensors/parameters.h b/src/modules/sensors/parameters.h index b769c12edd..b01b75a19c 100644 --- a/src/modules/sensors/parameters.h +++ b/src/modules/sensors/parameters.h @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index bdaf5a7cf5..8a932dbda1 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -70,10 +70,10 @@ #include #include -#include +#include #include -#include -#include +#include +#include #include diff --git a/src/modules/sensors/temperature_compensation.cpp b/src/modules/sensors/temperature_compensation.cpp index 75264b086f..aa4820f4c7 100644 --- a/src/modules/sensors/temperature_compensation.cpp +++ b/src/modules/sensors/temperature_compensation.cpp @@ -40,7 +40,7 @@ */ #include "temperature_compensation.h" -#include +#include #include #include diff --git a/src/modules/sensors/temperature_compensation.h b/src/modules/sensors/temperature_compensation.h index 64a7836825..986dfa38a2 100644 --- a/src/modules/sensors/temperature_compensation.h +++ b/src/modules/sensors/temperature_compensation.h @@ -42,7 +42,7 @@ #pragma once -#include +#include #include #include "common.h" diff --git a/src/modules/simulator/CMakeLists.txt b/src/modules/simulator/CMakeLists.txt index 1a9dc06334..610eebff12 100644 --- a/src/modules/simulator/CMakeLists.txt +++ b/src/modules/simulator/CMakeLists.txt @@ -53,6 +53,8 @@ if (NOT ${OS} STREQUAL "qurt") simulator_mavlink.cpp) endif() +add_subdirectory(ledsim) + px4_add_module( MODULE modules__simulator MAIN simulator @@ -63,5 +65,14 @@ px4_add_module( ${SIMULATOR_SRCS} DEPENDS git_mavlink_v2 - platforms__common + battery + conversion + drivers__ledsim ) +target_include_directories(modules__simulator INTERFACE ${PX4_SOURCE_DIR}/mavlink/include/mavlink) + +add_subdirectory(accelsim) +add_subdirectory(airspeedsim) +add_subdirectory(barosim) +add_subdirectory(gpssim) +add_subdirectory(gyrosim) diff --git a/src/platforms/posix/drivers/accelsim/CMakeLists.txt b/src/modules/simulator/accelsim/CMakeLists.txt similarity index 90% rename from src/platforms/posix/drivers/accelsim/CMakeLists.txt rename to src/modules/simulator/accelsim/CMakeLists.txt index 3b53503804..d57e2740f8 100644 --- a/src/platforms/posix/drivers/accelsim/CMakeLists.txt +++ b/src/modules/simulator/accelsim/CMakeLists.txt @@ -31,15 +31,11 @@ # ############################################################################ -include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) - px4_add_module( - MODULE platforms__posix__drivers__accelsim + MODULE drivers__accelsim MAIN accelsim - COMPILE_FLAGS SRCS accelsim.cpp DEPENDS - platforms__common + modules__simulator ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/accelsim/accelsim.cpp b/src/modules/simulator/accelsim/accelsim.cpp similarity index 99% rename from src/platforms/posix/drivers/accelsim/accelsim.cpp rename to src/modules/simulator/accelsim/accelsim.cpp index c852dc5417..736d4c4c4e 100644 --- a/src/platforms/posix/drivers/accelsim/accelsim.cpp +++ b/src/modules/simulator/accelsim/accelsim.cpp @@ -51,7 +51,7 @@ #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/ledsim/CMakeLists.txt b/src/modules/simulator/airspeedsim/CMakeLists.txt similarity index 93% rename from src/platforms/posix/drivers/ledsim/CMakeLists.txt rename to src/modules/simulator/airspeedsim/CMakeLists.txt index be7662a830..e6f79e4aee 100644 --- a/src/platforms/posix/drivers/ledsim/CMakeLists.txt +++ b/src/modules/simulator/airspeedsim/CMakeLists.txt @@ -30,12 +30,14 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE platforms__posix__drivers__ledsim + MODULE drivers__airspeedsim + MAIN measairspeedsim COMPILE_FLAGS SRCS - led.cpp + airspeedsim.cpp + meas_airspeed_sim.cpp DEPENDS - platforms__common + modules__simulator ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/airspeedsim/airspeedsim.cpp b/src/modules/simulator/airspeedsim/airspeedsim.cpp similarity index 99% rename from src/platforms/posix/drivers/airspeedsim/airspeedsim.cpp rename to src/modules/simulator/airspeedsim/airspeedsim.cpp index 723170da10..48af005016 100644 --- a/src/platforms/posix/drivers/airspeedsim/airspeedsim.cpp +++ b/src/modules/simulator/airspeedsim/airspeedsim.cpp @@ -56,8 +56,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/src/platforms/posix/drivers/airspeedsim/airspeedsim.h b/src/modules/simulator/airspeedsim/airspeedsim.h similarity index 98% rename from src/platforms/posix/drivers/airspeedsim/airspeedsim.h rename to src/modules/simulator/airspeedsim/airspeedsim.h index f673b2f8d6..01e9286f1f 100644 --- a/src/platforms/posix/drivers/airspeedsim/airspeedsim.h +++ b/src/modules/simulator/airspeedsim/airspeedsim.h @@ -59,8 +59,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/src/platforms/posix/drivers/airspeedsim/meas_airspeed_sim.cpp b/src/modules/simulator/airspeedsim/meas_airspeed_sim.cpp similarity index 99% rename from src/platforms/posix/drivers/airspeedsim/meas_airspeed_sim.cpp rename to src/modules/simulator/airspeedsim/meas_airspeed_sim.cpp index d3f2a15b03..31e2291da6 100644 --- a/src/platforms/posix/drivers/airspeedsim/meas_airspeed_sim.cpp +++ b/src/modules/simulator/airspeedsim/meas_airspeed_sim.cpp @@ -61,8 +61,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/src/drivers/airspeed/CMakeLists.txt b/src/modules/simulator/barosim/CMakeLists.txt similarity index 95% rename from src/drivers/airspeed/CMakeLists.txt rename to src/modules/simulator/barosim/CMakeLists.txt index 4887b2de66..2935706ac8 100644 --- a/src/drivers/airspeed/CMakeLists.txt +++ b/src/modules/simulator/barosim/CMakeLists.txt @@ -30,11 +30,13 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__airspeed + MODULE drivers__barosim + MAIN barosim COMPILE_FLAGS SRCS - airspeed.cpp + baro.cpp DEPENDS - platforms__common - ) \ No newline at end of file + modules__simulator + ) diff --git a/src/platforms/posix/drivers/barosim/baro.cpp b/src/modules/simulator/barosim/baro.cpp similarity index 99% rename from src/platforms/posix/drivers/barosim/baro.cpp rename to src/modules/simulator/barosim/baro.cpp index 158475fe22..1576d05fef 100644 --- a/src/platforms/posix/drivers/barosim/baro.cpp +++ b/src/modules/simulator/barosim/baro.cpp @@ -64,7 +64,7 @@ #include -#include +#include #include #include "barosim.h" diff --git a/src/platforms/posix/drivers/barosim/barosim.h b/src/modules/simulator/barosim/barosim.h similarity index 100% rename from src/platforms/posix/drivers/barosim/barosim.h rename to src/modules/simulator/barosim/barosim.h diff --git a/src/drivers/led/CMakeLists.txt b/src/modules/simulator/gpssim/CMakeLists.txt similarity index 94% rename from src/drivers/led/CMakeLists.txt rename to src/modules/simulator/gpssim/CMakeLists.txt index 8264c72df9..c80d1c2ced 100644 --- a/src/drivers/led/CMakeLists.txt +++ b/src/modules/simulator/gpssim/CMakeLists.txt @@ -30,12 +30,13 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ + px4_add_module( - MODULE drivers__led + MODULE drivers__gpssim + MAIN gpssim COMPILE_FLAGS SRCS - led.cpp + gpssim.cpp DEPENDS - platforms__common + modules__simulator ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/gpssim/gpssim.cpp b/src/modules/simulator/gpssim/gpssim.cpp similarity index 100% rename from src/platforms/posix/drivers/gpssim/gpssim.cpp rename to src/modules/simulator/gpssim/gpssim.cpp diff --git a/src/platforms/posix/drivers/gpssim/ubx_sim.cpp b/src/modules/simulator/gpssim/ubx_sim.cpp similarity index 100% rename from src/platforms/posix/drivers/gpssim/ubx_sim.cpp rename to src/modules/simulator/gpssim/ubx_sim.cpp diff --git a/src/platforms/posix/drivers/gpssim/ubx_sim.h b/src/modules/simulator/gpssim/ubx_sim.h similarity index 100% rename from src/platforms/posix/drivers/gpssim/ubx_sim.h rename to src/modules/simulator/gpssim/ubx_sim.h diff --git a/src/platforms/posix/drivers/barosim/CMakeLists.txt b/src/modules/simulator/gyrosim/CMakeLists.txt similarity index 89% rename from src/platforms/posix/drivers/barosim/CMakeLists.txt rename to src/modules/simulator/gyrosim/CMakeLists.txt index c40350c556..740b282318 100644 --- a/src/platforms/posix/drivers/barosim/CMakeLists.txt +++ b/src/modules/simulator/gyrosim/CMakeLists.txt @@ -31,14 +31,12 @@ # ############################################################################ -include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) - px4_add_module( - MODULE platforms__posix__drivers__barosim - MAIN barosim + MODULE drivers__gyrosim + MAIN gyrosim + STACK_MAIN 1200 SRCS - baro.cpp + gyrosim.cpp DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + modules__simulator +) diff --git a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp b/src/modules/simulator/gyrosim/gyrosim.cpp similarity index 99% rename from src/platforms/posix/drivers/gyrosim/gyrosim.cpp rename to src/modules/simulator/gyrosim/gyrosim.cpp index 82dec6f961..f4fde25985 100644 --- a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp +++ b/src/modules/simulator/gyrosim/gyrosim.cpp @@ -61,7 +61,7 @@ #include -#include +#include #include #include diff --git a/src/modules/simulator/ledsim/CMakeLists.txt b/src/modules/simulator/ledsim/CMakeLists.txt new file mode 100644 index 0000000000..c8f9cbc012 --- /dev/null +++ b/src/modules/simulator/ledsim/CMakeLists.txt @@ -0,0 +1,35 @@ +############################################################################ +# +# Copyright (c) 2015 PX4 Development Team. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name PX4 nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +px4_add_library(drivers__ledsim led.cpp) +target_link_libraries(drivers__ledsim PRIVATE drivers__led drivers_board) diff --git a/src/platforms/posix/drivers/ledsim/led.cpp b/src/modules/simulator/ledsim/led.cpp similarity index 100% rename from src/platforms/posix/drivers/ledsim/led.cpp rename to src/modules/simulator/ledsim/led.cpp diff --git a/src/modules/simulator/simulator.h b/src/modules/simulator/simulator.h index 689e24697c..fafc61baf6 100644 --- a/src/modules/simulator/simulator.h +++ b/src/modules/simulator/simulator.h @@ -54,8 +54,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/modules/simulator/simulator_params.c b/src/modules/simulator/simulator_params.c index 7a39320d2c..1df3ec7e63 100644 --- a/src/modules/simulator/simulator_params.c +++ b/src/modules/simulator/simulator_params.c @@ -38,7 +38,7 @@ * * @author Mohamed Abdelkader */ -#include +#include /** * Simulator UDP port diff --git a/src/modules/syslink/CMakeLists.txt b/src/modules/syslink/CMakeLists.txt index 047240966d..1385ee645d 100644 --- a/src/modules/syslink/CMakeLists.txt +++ b/src/modules/syslink/CMakeLists.txt @@ -41,6 +41,5 @@ px4_add_module( syslink_params.c syslink.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/syslink/syslink_main.h b/src/modules/syslink/syslink_main.h index b335396dd5..c71bc4ff8d 100644 --- a/src/modules/syslink/syslink_main.h +++ b/src/modules/syslink/syslink_main.h @@ -35,7 +35,7 @@ #include -#include +#include #include #include diff --git a/src/modules/syslink/syslink_params.c b/src/modules/syslink/syslink_params.c index 96e239aef2..bb310d254b 100644 --- a/src/modules/syslink/syslink_params.c +++ b/src/modules/syslink/syslink_params.c @@ -40,7 +40,7 @@ */ #include -#include +#include /** diff --git a/src/modules/systemlib/CMakeLists.txt b/src/modules/systemlib/CMakeLists.txt index 1f67c29aad..675cdeb4de 100644 --- a/src/modules/systemlib/CMakeLists.txt +++ b/src/modules/systemlib/CMakeLists.txt @@ -33,9 +33,7 @@ set(SRCS airspeed.cpp - battery.cpp board_serial.c - bson/tinybson.c circuit_breaker.cpp conversions.c cpuload.c @@ -43,7 +41,6 @@ set(SRCS hysteresis/hysteresis.cpp mavlink_log.c otp.c - perf_counter.c pid/pid.c pwm_limit/pwm_limit.c rc_check.c @@ -53,8 +50,6 @@ if(${OS} STREQUAL "nuttx") list(APPEND SRCS err.c printload.c - flashparams/flashparams.c - flashparams/flashfs.c ) elseif ("${CONFIG_SHMEM}" STREQUAL "1") list(APPEND SRCS @@ -66,18 +61,11 @@ else() ) endif() -if(NOT ${OS} STREQUAL "qurt") - list(APPEND SRCS - hx_stream.c - ) +# TODO: find a better way to do this +if (NOT "${CONFIG}" MATCHES "px4io") + px4_add_library(systemlib ${SRCS}) + target_compile_options(systemlib PRIVATE -Wno-sign-compare) +else() + add_library(systemlib ${PX4_SOURCE_DIR}/src/platforms/empty.c) + add_dependencies(systemlib prebuild_targets) endif() - -px4_add_module( - MODULE modules__systemlib - COMPILE_FLAGS - -Wno-sign-compare - SRCS ${SRCS} - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/modules/systemlib/rc_check.c b/src/modules/systemlib/rc_check.c index 142baef39a..f6f25cce8c 100644 --- a/src/modules/systemlib/rc_check.c +++ b/src/modules/systemlib/rc_check.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/uORB/CMakeLists.txt b/src/modules/uORB/CMakeLists.txt index 50187b7715..27e6a52c58 100644 --- a/src/modules/uORB/CMakeLists.txt +++ b/src/modules/uORB/CMakeLists.txt @@ -47,5 +47,5 @@ px4_add_module( uORBManager.cpp uORBUtils.cpp DEPENDS - platforms__common + uorb_msgs ) \ No newline at end of file diff --git a/src/modules/uORB/uORB_tests/CMakeLists.txt b/src/modules/uORB/uORB_tests/CMakeLists.txt index 6c6a9a4399..73bbdaf78b 100644 --- a/src/modules/uORB/uORB_tests/CMakeLists.txt +++ b/src/modules/uORB/uORB_tests/CMakeLists.txt @@ -48,6 +48,5 @@ px4_add_module( -Wno-sign-compare # TODO: fix all sign-compare SRCS ${SRCS} DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/uavcan/CMakeLists.txt b/src/modules/uavcan/CMakeLists.txt index 596e09c9b7..1051ef0fd1 100644 --- a/src/modules/uavcan/CMakeLists.txt +++ b/src/modules/uavcan/CMakeLists.txt @@ -89,5 +89,3 @@ px4_add_module( uavcan uavcan_stm32_driver ) - -target_link_libraries(modules__uavcan uavcan uavcan_stm32_driver) diff --git a/src/modules/uavcan/actuators/esc.hpp b/src/modules/uavcan/actuators/esc.hpp index 16caf9b63b..071dbc190c 100644 --- a/src/modules/uavcan/actuators/esc.hpp +++ b/src/modules/uavcan/actuators/esc.hpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/uavcan/actuators/hardpoint.hpp b/src/modules/uavcan/actuators/hardpoint.hpp index f1be4e507f..9587b60a3e 100644 --- a/src/modules/uavcan/actuators/hardpoint.hpp +++ b/src/modules/uavcan/actuators/hardpoint.hpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include /** * @brief The UavcanHardpointController class diff --git a/src/modules/uavcan/uavcan_main.cpp b/src/modules/uavcan/uavcan_main.cpp index f3e8276cea..49f742b63c 100644 --- a/src/modules/uavcan/uavcan_main.cpp +++ b/src/modules/uavcan/uavcan_main.cpp @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/uavcan/uavcan_main.hpp b/src/modules/uavcan/uavcan_main.hpp index 69cc732a87..e72d388b9c 100644 --- a/src/modules/uavcan/uavcan_main.hpp +++ b/src/modules/uavcan/uavcan_main.hpp @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/uavcan/uavcan_params.c b/src/modules/uavcan/uavcan_params.c index 3791694f6c..4b9f622b32 100644 --- a/src/modules/uavcan/uavcan_params.c +++ b/src/modules/uavcan/uavcan_params.c @@ -36,7 +36,7 @@ */ #include -#include +#include /** * UAVCAN mode diff --git a/src/modules/uavcan/uavcan_servers.cpp b/src/modules/uavcan/uavcan_servers.cpp index 198c600fad..0377553eca 100644 --- a/src/modules/uavcan/uavcan_servers.cpp +++ b/src/modules/uavcan/uavcan_servers.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/uavcan/uavcan_servers.hpp b/src/modules/uavcan/uavcan_servers.hpp index acf12c6bbc..9aabed8a2c 100644 --- a/src/modules/uavcan/uavcan_servers.hpp +++ b/src/modules/uavcan/uavcan_servers.hpp @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include diff --git a/src/modules/uavcanesc/CMakeLists.txt b/src/modules/uavcanesc/CMakeLists.txt index a151b6ad7c..d0028349b4 100644 --- a/src/modules/uavcanesc/CMakeLists.txt +++ b/src/modules/uavcanesc/CMakeLists.txt @@ -77,9 +77,8 @@ px4_add_module( indication_controller.cpp led.cpp uavcanesc_params.c - ${PX4_SOURCE_DIR}/src/modules/systemlib/flashparams/flashparams.c - ${PX4_SOURCE_DIR}/src/modules/systemlib/flashparams/flashfs.c DEPENDS + drivers_bootloaders git_uavcan # within libuavcan @@ -87,5 +86,3 @@ px4_add_module( uavcan uavcan_stm32_driver ) - -target_link_libraries(modules__uavcanesc uavcan uavcan_stm32_driver) diff --git a/src/modules/uavcanesc/commands/cfg/CMakeLists.txt b/src/modules/uavcanesc/commands/cfg/CMakeLists.txt index 0dd126c55d..ee31b76554 100644 --- a/src/modules/uavcanesc/commands/cfg/CMakeLists.txt +++ b/src/modules/uavcanesc/commands/cfg/CMakeLists.txt @@ -42,7 +42,6 @@ px4_add_module( esc_cfg.cpp DEPENDS - platforms__common ) -## vim: set noet ft=cmake fenc=utf-8 ff=unix : +# diff --git a/src/modules/uavcanesc/commands/dc/CMakeLists.txt b/src/modules/uavcanesc/commands/dc/CMakeLists.txt index bc60d562df..6e2dad1bbe 100644 --- a/src/modules/uavcanesc/commands/dc/CMakeLists.txt +++ b/src/modules/uavcanesc/commands/dc/CMakeLists.txt @@ -42,7 +42,6 @@ px4_add_module( esc_dc.cpp DEPENDS - platforms__common ) -## vim: set noet ft=cmake fenc=utf-8 ff=unix : +# diff --git a/src/modules/uavcanesc/commands/rpm/CMakeLists.txt b/src/modules/uavcanesc/commands/rpm/CMakeLists.txt index 2934f2b2af..b15b6d3605 100644 --- a/src/modules/uavcanesc/commands/rpm/CMakeLists.txt +++ b/src/modules/uavcanesc/commands/rpm/CMakeLists.txt @@ -42,7 +42,6 @@ px4_add_module( esc_rpm.cpp DEPENDS - platforms__common ) -## vim: set noet ft=cmake fenc=utf-8 ff=unix : +# diff --git a/src/modules/uavcanesc/commands/selftest/CMakeLists.txt b/src/modules/uavcanesc/commands/selftest/CMakeLists.txt index 35d3285476..22968c31fd 100644 --- a/src/modules/uavcanesc/commands/selftest/CMakeLists.txt +++ b/src/modules/uavcanesc/commands/selftest/CMakeLists.txt @@ -42,7 +42,6 @@ px4_add_module( esc_selftest.cpp DEPENDS - platforms__common ) -## vim: set noet ft=cmake fenc=utf-8 ff=unix : +# diff --git a/src/modules/uavcanesc/commands/stat/CMakeLists.txt b/src/modules/uavcanesc/commands/stat/CMakeLists.txt index 2ec3bd9908..74256c260c 100644 --- a/src/modules/uavcanesc/commands/stat/CMakeLists.txt +++ b/src/modules/uavcanesc/commands/stat/CMakeLists.txt @@ -41,7 +41,6 @@ px4_add_module( SRCS esc_stat.cpp DEPENDS - platforms__common ) -## vim: set noet ft=cmake fenc=utf-8 ff=unix : +# diff --git a/src/modules/uavcanesc/nshterm/CMakeLists.txt b/src/modules/uavcanesc/nshterm/CMakeLists.txt index c3362d12f3..3e4bcfc1f3 100644 --- a/src/modules/uavcanesc/nshterm/CMakeLists.txt +++ b/src/modules/uavcanesc/nshterm/CMakeLists.txt @@ -41,7 +41,6 @@ px4_add_module( nshterm.c PRIORITY "SCHED_PRIORITY_DEFAULT-30" DEPENDS - platforms__common ) -## vim: set noet ft=cmake fenc=utf-8 ff=unix : +# diff --git a/src/modules/uavcanesc/uavcanesc_main.cpp b/src/modules/uavcanesc/uavcanesc_main.cpp index 9a0eeb4e88..6566da2d65 100644 --- a/src/modules/uavcanesc/uavcanesc_main.cpp +++ b/src/modules/uavcanesc/uavcanesc_main.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/uavcanesc/uavcanesc_params.c b/src/modules/uavcanesc/uavcanesc_params.c index 6bb2d1c0d4..c3a9143eaa 100644 --- a/src/modules/uavcanesc/uavcanesc_params.c +++ b/src/modules/uavcanesc/uavcanesc_params.c @@ -36,7 +36,7 @@ */ #include -#include +#include /** * UAVCAN Node ID. diff --git a/src/modules/uavcannode/CMakeLists.txt b/src/modules/uavcannode/CMakeLists.txt index 044849cde0..bf6373edbf 100644 --- a/src/modules/uavcannode/CMakeLists.txt +++ b/src/modules/uavcannode/CMakeLists.txt @@ -55,17 +55,15 @@ set(LIBUAVCAN_DIR ${PX4_SOURCE_DIR}/src/modules/uavcan/libuavcan) add_subdirectory(${LIBUAVCAN_DIR} uavcannode_libuavcan) add_dependencies(uavcan prebuild_targets) -include_directories(${LIBUAVCAN_DIR}/libuavcan/include) -include_directories(${LIBUAVCAN_DIR}/libuavcan/include/dsdlc_generated) -include_directories(${LIBUAVCAN_DIR}/libuavcan_drivers/posix/include) -include_directories(${LIBUAVCAN_DIR}/libuavcan_drivers/stm32/driver/include) - -include_directories(${PX4_SOURCE_DIR}/src/drivers/bootloaders) - px4_add_module( MODULE modules__uavcannode MAIN uavcannode STACK_MAIN 1048 + INCLUDES + ${LIBUAVCAN_DIR}/libuavcan/include + ${LIBUAVCAN_DIR}/libuavcan/include/dsdlc_generated + ${LIBUAVCAN_DIR}/libuavcan_drivers/posix/include + ${LIBUAVCAN_DIR}/libuavcan_drivers/stm32/driver/include COMPILE_FLAGS -Wframe-larger-than=1500 -Wno-deprecated-declarations @@ -77,8 +75,8 @@ px4_add_module( led.cpp resources.cpp uavcannode_params.c - DEPENDS + drivers_bootloaders git_uavcan # within libuavcan @@ -87,6 +85,4 @@ px4_add_module( uavcan_stm32_driver ) -target_link_libraries(modules__uavcannode PUBLIC uavcan uavcan_stm32_driver) - -set_property(GLOBAL APPEND PROPERTY PX4_LIBRARIES uavcan_stm32_driver) +set_property(GLOBAL APPEND PROPERTY PX4_MODULE_LIBRARIES uavcan_stm32_driver) diff --git a/src/modules/uavcannode/uavcannode_main.cpp b/src/modules/uavcannode/uavcannode_main.cpp index e85febdf99..1cffd53e99 100644 --- a/src/modules/uavcannode/uavcannode_main.cpp +++ b/src/modules/uavcannode/uavcannode_main.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/modules/uavcannode/uavcannode_params.c b/src/modules/uavcannode/uavcannode_params.c index 071e4600e9..ee1cf43ca8 100644 --- a/src/modules/uavcannode/uavcannode_params.c +++ b/src/modules/uavcannode/uavcannode_params.c @@ -36,7 +36,7 @@ */ #include -#include +#include /** * UAVCAN Node ID. diff --git a/src/modules/vtol_att_control/CMakeLists.txt b/src/modules/vtol_att_control/CMakeLists.txt index 17d8dd242e..b26c00baaf 100644 --- a/src/modules/vtol_att_control/CMakeLists.txt +++ b/src/modules/vtol_att_control/CMakeLists.txt @@ -42,6 +42,5 @@ px4_add_module( tailsitter.cpp standard.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/modules/vtol_att_control/standard.cpp b/src/modules/vtol_att_control/standard.cpp index c2b721fe05..4f2b72c14e 100644 --- a/src/modules/vtol_att_control/standard.cpp +++ b/src/modules/vtol_att_control/standard.cpp @@ -370,7 +370,7 @@ void Standard::update_mc_state() // rotate the vector into a new frame which is rotated in z by the desired heading // with respect to the earh frame. - float yaw_error = _wrap_pi(euler_sp(2) - euler(2)); + float yaw_error = matrix::wrap_pi(euler_sp(2) - euler(2)); matrix::Dcmf R_yaw_correction = matrix::Eulerf(0.0f, 0.0f, -yaw_error); tilt_new = R_yaw_correction * tilt_new; diff --git a/src/modules/vtol_att_control/standard.h b/src/modules/vtol_att_control/standard.h index 30ffdfc1ef..c53f608500 100644 --- a/src/modules/vtol_att_control/standard.h +++ b/src/modules/vtol_att_control/standard.h @@ -46,7 +46,7 @@ #ifndef STANDARD_H #define STANDARD_H #include "vtol_type.h" -#include +#include #include class Standard : public VtolType diff --git a/src/modules/vtol_att_control/tailsitter.h b/src/modules/vtol_att_control/tailsitter.h index 1b2b47d0ce..2fca09b9c9 100644 --- a/src/modules/vtol_att_control/tailsitter.h +++ b/src/modules/vtol_att_control/tailsitter.h @@ -43,8 +43,8 @@ #define TAILSITTER_H #include "vtol_type.h" -#include /** is it necsacery? **/ -#include +#include /** is it necsacery? **/ +#include #include class Tailsitter : public VtolType diff --git a/src/modules/vtol_att_control/tiltrotor.h b/src/modules/vtol_att_control/tiltrotor.h index 53a8f27659..6ba94c2b94 100644 --- a/src/modules/vtol_att_control/tiltrotor.h +++ b/src/modules/vtol_att_control/tiltrotor.h @@ -41,7 +41,7 @@ #ifndef TILTROTOR_H #define TILTROTOR_H #include "vtol_type.h" -#include +#include #include class Tiltrotor : public VtolType diff --git a/src/modules/vtol_att_control/vtol_att_control_main.h b/src/modules/vtol_att_control/vtol_att_control_main.h index 61409be88c..ca169e9d68 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.h +++ b/src/modules/vtol_att_control/vtol_att_control_main.h @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/modules/wind_estimator/wind_estimator_main.cpp b/src/modules/wind_estimator/wind_estimator_main.cpp index cc64bfa652..f6088a9a4b 100644 --- a/src/modules/wind_estimator/wind_estimator_main.cpp +++ b/src/modules/wind_estimator/wind_estimator_main.cpp @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/platforms/common/CMakeLists.txt b/src/platforms/common/CMakeLists.txt index eae2128b09..7aa4c9b1dd 100644 --- a/src/platforms/common/CMakeLists.txt +++ b/src/platforms/common/CMakeLists.txt @@ -39,17 +39,11 @@ if (NOT "${OS}" MATCHES "qurt") ) endif() -px4_add_module( - MODULE platforms__common - SRCS - module.cpp - px4_getopt.c - shutdown.cpp - ${SRCS} - DEPENDS - prebuild_targets - uorb_headers - uorb_msgs +px4_add_library(platforms__common + module.cpp + px4_getopt.c + shutdown.cpp + ${SRCS} ) add_subdirectory(work_queue) diff --git a/src/platforms/common/px4_log.c b/src/platforms/common/px4_log.c index 0e1d50d4ad..fefdb84034 100644 --- a/src/platforms/common/px4_log.c +++ b/src/platforms/common/px4_log.c @@ -61,7 +61,9 @@ void px4_log_initialize(void) log_message.severity = 6; //info strcpy((char *)log_message.text, "initialized uORB logging"); +#if !defined(PARAM_NO_ORB) orb_log_message_pub = orb_advertise_queue(ORB_ID(log_message), &log_message, 2); +#endif /* !PARAM_NO_ORB */ if (!orb_log_message_pub) { PX4_ERR("failed to advertise log_message"); @@ -127,6 +129,8 @@ __EXPORT void px4_log_modulename(int level, const char *moduleName, const char * va_end(argptr); log_message.text[max_length - 1] = 0; //ensure 0-termination +#if !defined(PARAM_NO_ORB) orb_publish(ORB_ID(log_message), orb_log_message_pub, &log_message); +#endif /* !PARAM_NO_ORB */ } } diff --git a/src/platforms/common/work_queue/CMakeLists.txt b/src/platforms/common/work_queue/CMakeLists.txt index 6a6dd1b735..7026bd6b45 100644 --- a/src/platforms/common/work_queue/CMakeLists.txt +++ b/src/platforms/common/work_queue/CMakeLists.txt @@ -33,25 +33,23 @@ # nuttx uses internal work queue currently if (NOT "${OS}" MATCHES "nuttx") - px4_add_module( - MODULE platforms__posix__work_queue - COMPILE_FLAGS - SRCS - hrt_thread.c - hrt_queue.c - hrt_work_cancel.c - work_thread.c - work_lock.c - work_queue.c - work_cancel.c - queue.c - dq_addlast.c - dq_remfirst.c - sq_addlast.c - sq_remfirst.c - sq_addafter.c - dq_rem.c - DEPENDS - platforms__common - ) + + add_library(work_queue + dq_addlast.c + dq_rem.c + dq_remfirst.c + hrt_queue.c + hrt_thread.c + hrt_work_cancel.c + queue.c + sq_addafter.c + sq_addlast.c + sq_remfirst.c + work_cancel.c + work_lock.c + work_queue.c + work_thread.c + ) + add_dependencies(work_queue prebuild_targets) + endif() diff --git a/src/platforms/common/work_queue/wqueue_test/CMakeLists.txt b/src/platforms/common/work_queue/wqueue_test/CMakeLists.txt index 6efd698949..d83583faa1 100644 --- a/src/platforms/common/work_queue/wqueue_test/CMakeLists.txt +++ b/src/platforms/common/work_queue/wqueue_test/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( wqueue_start_posix.cpp wqueue_test.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/adcsim/CMakeLists.txt b/src/platforms/posix/drivers/adcsim/CMakeLists.txt index 2f69d6a726..52131f1446 100644 --- a/src/platforms/posix/drivers/adcsim/CMakeLists.txt +++ b/src/platforms/posix/drivers/adcsim/CMakeLists.txt @@ -37,13 +37,6 @@ px4_add_module( SRCS adcsim.cpp DEPENDS - platforms__common git_driverframework df_driver_framework - ) - -target_link_libraries(platforms__posix__drivers__adcsim - df_driver_framework ) - -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/adcsim/adcsim.cpp b/src/platforms/posix/drivers/adcsim/adcsim.cpp index cc191b9628..f31ce495a7 100644 --- a/src/platforms/posix/drivers/adcsim/adcsim.cpp +++ b/src/platforms/posix/drivers/adcsim/adcsim.cpp @@ -60,7 +60,7 @@ #include #include -#include +#include #include diff --git a/src/platforms/posix/drivers/bebop_flow/CMakeLists.txt b/src/platforms/posix/drivers/bebop_flow/CMakeLists.txt index eb2c8ebaa0..412a9e66ce 100644 --- a/src/platforms/posix/drivers/bebop_flow/CMakeLists.txt +++ b/src/platforms/posix/drivers/bebop_flow/CMakeLists.txt @@ -41,8 +41,7 @@ px4_add_module( video_device.cpp dump_pgm.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_mt9v117 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_ak8963_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_ak8963_wrapper/CMakeLists.txt index 9ac1b2ef75..50967ea90f 100644 --- a/src/platforms/posix/drivers/df_ak8963_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_ak8963_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_ak8963_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_ak8963 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp b/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp index e652b28f84..4fc75abc1e 100644 --- a/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp +++ b/src/platforms/posix/drivers/df_ak8963_wrapper/df_ak8963_wrapper.cpp @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_bebop_bus_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_bebop_bus_wrapper/CMakeLists.txt index 8d69fe932b..9972619715 100644 --- a/src/platforms/posix/drivers/df_bebop_bus_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_bebop_bus_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_bebop_bus_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_bebop_bus ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_bebop_bus_wrapper/df_bebop_bus_wrapper.cpp b/src/platforms/posix/drivers/df_bebop_bus_wrapper/df_bebop_bus_wrapper.cpp index 29d639546d..e07c827c06 100644 --- a/src/platforms/posix/drivers/df_bebop_bus_wrapper/df_bebop_bus_wrapper.cpp +++ b/src/platforms/posix/drivers/df_bebop_bus_wrapper/df_bebop_bus_wrapper.cpp @@ -54,7 +54,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/CMakeLists.txt index 0dd83e8726..4ce56a3813 100644 --- a/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_bebop_rangefinder_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_bebop_rangefinder ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/df_bebop_rangefinder_wrapper.cpp b/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/df_bebop_rangefinder_wrapper.cpp index 22c0a7f648..389b87ba57 100644 --- a/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/df_bebop_rangefinder_wrapper.cpp +++ b/src/platforms/posix/drivers/df_bebop_rangefinder_wrapper/df_bebop_rangefinder_wrapper.cpp @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_bmp280_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_bmp280_wrapper/CMakeLists.txt index 2889e74f27..de214f4616 100644 --- a/src/platforms/posix/drivers/df_bmp280_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_bmp280_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_bmp280_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_bmp280 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp b/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp index 5f1be27da3..6ff773786b 100644 --- a/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp +++ b/src/platforms/posix/drivers/df_bmp280_wrapper/df_bmp280_wrapper.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_hmc5883_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_hmc5883_wrapper/CMakeLists.txt index 276771ab9a..03c76ed090 100644 --- a/src/platforms/posix/drivers/df_hmc5883_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_hmc5883_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_hmc5883_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_hmc5883 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp index a5e36e6ca4..937106047f 100644 --- a/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp +++ b/src/platforms/posix/drivers/df_hmc5883_wrapper/df_hmc5883_wrapper.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_isl29501_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_isl29501_wrapper/CMakeLists.txt index 0b11914169..373d1db61b 100644 --- a/src/platforms/posix/drivers/df_isl29501_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_isl29501_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_isl29501_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_isl29501 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_isl29501_wrapper/df_isl29501_wrapper.cpp b/src/platforms/posix/drivers/df_isl29501_wrapper/df_isl29501_wrapper.cpp index 1cba72b106..8c3989468c 100644 --- a/src/platforms/posix/drivers/df_isl29501_wrapper/df_isl29501_wrapper.cpp +++ b/src/platforms/posix/drivers/df_isl29501_wrapper/df_isl29501_wrapper.cpp @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/CMakeLists.txt index 8a514ad8e3..732421a255 100644 --- a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_lsm9ds1_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_lsm9ds1 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp index 79d6d98ce2..2fdff30580 100644 --- a/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp +++ b/src/platforms/posix/drivers/df_lsm9ds1_wrapper/df_lsm9ds1_wrapper.cpp @@ -53,7 +53,7 @@ #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_ltc2946_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_ltc2946_wrapper/CMakeLists.txt index fe7e9d4f6f..6095aa793e 100644 --- a/src/platforms/posix/drivers/df_ltc2946_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_ltc2946_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_ltc2946_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_ltc2946 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_ltc2946_wrapper/df_ltc2946_wrapper.cpp b/src/platforms/posix/drivers/df_ltc2946_wrapper/df_ltc2946_wrapper.cpp index 1bdd8f9678..12eb382b0f 100644 --- a/src/platforms/posix/drivers/df_ltc2946_wrapper/df_ltc2946_wrapper.cpp +++ b/src/platforms/posix/drivers/df_ltc2946_wrapper/df_ltc2946_wrapper.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_mpu6050_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_mpu6050_wrapper/CMakeLists.txt index 3c5514e600..4147bf78db 100644 --- a/src/platforms/posix/drivers/df_mpu6050_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_mpu6050_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_mpu6050_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_mpu6050 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp b/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp index 256693fa36..8870fd851e 100644 --- a/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp +++ b/src/platforms/posix/drivers/df_mpu6050_wrapper/df_mpu6050_wrapper.cpp @@ -50,7 +50,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_mpu9250_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_mpu9250_wrapper/CMakeLists.txt index fad1e71a1e..9f60ac1312 100644 --- a/src/platforms/posix/drivers/df_mpu9250_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_mpu9250_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_mpu9250_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_mpu9250 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp b/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp index 170b7fe182..1efe2a93ff 100644 --- a/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp +++ b/src/platforms/posix/drivers/df_mpu9250_wrapper/df_mpu9250_wrapper.cpp @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_ms5607_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_ms5607_wrapper/CMakeLists.txt index d75c46884d..9756a6d164 100644 --- a/src/platforms/posix/drivers/df_ms5607_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_ms5607_wrapper/CMakeLists.txt @@ -39,8 +39,7 @@ px4_add_module( SRCS df_ms5607_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_ms5607 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/df_ms5607_wrapper/df_ms5607_wrapper.cpp b/src/platforms/posix/drivers/df_ms5607_wrapper/df_ms5607_wrapper.cpp index eb2658a569..a5eca6d105 100644 --- a/src/platforms/posix/drivers/df_ms5607_wrapper/df_ms5607_wrapper.cpp +++ b/src/platforms/posix/drivers/df_ms5607_wrapper/df_ms5607_wrapper.cpp @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_ms5611_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_ms5611_wrapper/CMakeLists.txt index a84bd5114b..d21aa5733c 100644 --- a/src/platforms/posix/drivers/df_ms5611_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_ms5611_wrapper/CMakeLists.txt @@ -39,8 +39,8 @@ px4_add_module( SRCS df_ms5611_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_ms5611 ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/platforms/posix/drivers/df_ms5611_wrapper/df_ms5611_wrapper.cpp b/src/platforms/posix/drivers/df_ms5611_wrapper/df_ms5611_wrapper.cpp index 9830d0738a..12d8be2a81 100644 --- a/src/platforms/posix/drivers/df_ms5611_wrapper/df_ms5611_wrapper.cpp +++ b/src/platforms/posix/drivers/df_ms5611_wrapper/df_ms5611_wrapper.cpp @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/df_trone_wrapper/CMakeLists.txt b/src/platforms/posix/drivers/df_trone_wrapper/CMakeLists.txt index 792fa723f1..30b9974c02 100644 --- a/src/platforms/posix/drivers/df_trone_wrapper/CMakeLists.txt +++ b/src/platforms/posix/drivers/df_trone_wrapper/CMakeLists.txt @@ -39,8 +39,8 @@ px4_add_module( SRCS df_trone_wrapper.cpp DEPENDS - platforms__common + git_driverframework df_driver_framework df_trone ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/platforms/posix/drivers/df_trone_wrapper/df_trone_wrapper.cpp b/src/platforms/posix/drivers/df_trone_wrapper/df_trone_wrapper.cpp index acb800b5a0..fd9ce8259e 100644 --- a/src/platforms/posix/drivers/df_trone_wrapper/df_trone_wrapper.cpp +++ b/src/platforms/posix/drivers/df_trone_wrapper/df_trone_wrapper.cpp @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/src/platforms/posix/drivers/gpssim/CMakeLists.txt b/src/platforms/posix/drivers/gpssim/CMakeLists.txt deleted file mode 100644 index 11bcb8c871..0000000000 --- a/src/platforms/posix/drivers/gpssim/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################ -# -# Copyright (c) 2015 PX4 Development Team. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name PX4 nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) - -px4_add_module( - MODULE platforms__posix__drivers__gpssim - MAIN gpssim - COMPILE_FLAGS - SRCS - gpssim.cpp - DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/gyrosim/CMakeLists.txt b/src/platforms/posix/drivers/gyrosim/CMakeLists.txt deleted file mode 100644 index 58c99b564b..0000000000 --- a/src/platforms/posix/drivers/gyrosim/CMakeLists.txt +++ /dev/null @@ -1,53 +0,0 @@ -############################################################################ -# -# Copyright (c) 2015 PX4 Development Team. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name PX4 nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -include_directories(${PX4_SOURCE_DIR}/mavlink/include/mavlink) - -px4_add_module( - MODULE platforms__posix__drivers__gyrosim - MAIN gyrosim - STACK_MAIN 1200 - COMPILE_FLAGS - SRCS - gyrosim.cpp - DEPENDS - platforms__common - git_driverframework - df_driver_framework - ) - -target_link_libraries(platforms__posix__drivers__gyrosim - df_driver_framework -) - -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/drivers/tonealrmsim/CMakeLists.txt b/src/platforms/posix/drivers/tonealrmsim/CMakeLists.txt index 858c9e6f3c..0724a7dd4c 100644 --- a/src/platforms/posix/drivers/tonealrmsim/CMakeLists.txt +++ b/src/platforms/posix/drivers/tonealrmsim/CMakeLists.txt @@ -37,6 +37,6 @@ px4_add_module( SRCS tone_alarm.cpp DEPENDS - platforms__common + git_driverframework ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/platforms/posix/tests/hello/CMakeLists.txt b/src/platforms/posix/tests/hello/CMakeLists.txt index f19e4eb872..77c4c8058b 100644 --- a/src/platforms/posix/tests/hello/CMakeLists.txt +++ b/src/platforms/posix/tests/hello/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( hello_start_posix.cpp hello_example.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/tests/hrt_test/CMakeLists.txt b/src/platforms/posix/tests/hrt_test/CMakeLists.txt index 59c967247d..931260bf21 100644 --- a/src/platforms/posix/tests/hrt_test/CMakeLists.txt +++ b/src/platforms/posix/tests/hrt_test/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( hrt_test_start_posix.cpp hrt_test.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/tests/muorb/CMakeLists.txt b/src/platforms/posix/tests/muorb/CMakeLists.txt index 967a598cb4..7912c5365f 100644 --- a/src/platforms/posix/tests/muorb/CMakeLists.txt +++ b/src/platforms/posix/tests/muorb/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( muorb_test_start_posix.cpp muorb_test_example.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/posix/tests/vcdev_test/CMakeLists.txt b/src/platforms/posix/tests/vcdev_test/CMakeLists.txt index ea28bb36c6..9953de1c9d 100644 --- a/src/platforms/posix/tests/vcdev_test/CMakeLists.txt +++ b/src/platforms/posix/tests/vcdev_test/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( vcdevtest_start_posix.cpp vcdevtest_example.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/px4_defines.h b/src/platforms/px4_defines.h index b6d8695060..5f62fe2af6 100644 --- a/src/platforms/px4_defines.h +++ b/src/platforms/px4_defines.h @@ -94,7 +94,7 @@ #define PX4_MAIN_FUNCTION(_prefix) int _prefix##_task_main(int argc, char *argv[]) /* Parameter handle datatype */ -#include +#include typedef param_t px4_param_t; /* Get value of parameter by name */ diff --git a/src/platforms/px4_includes.h b/src/platforms/px4_includes.h index 85dda1979d..7eb6251ab5 100644 --- a/src/platforms/px4_includes.h +++ b/src/platforms/px4_includes.h @@ -52,7 +52,7 @@ #include #include -#include +#include #include #elif defined(__PX4_POSIX) && !defined(__PX4_QURT) @@ -66,7 +66,7 @@ #define ASSERT(x) assert(x) #include -#include +#include #include #elif defined(__PX4_QURT) @@ -80,7 +80,7 @@ #define ASSERT(x) assert(x) #include -#include +#include #include #else diff --git a/src/platforms/px4_param.h b/src/platforms/px4_param.h index 3a0dfa10ca..e526defd95 100644 --- a/src/platforms/px4_param.h +++ b/src/platforms/px4_param.h @@ -41,7 +41,7 @@ #include "px4_param_macros.h" -#include +#include /** * get the parameter handle from a parameter enum diff --git a/src/platforms/qurt/fc_addon/mpu_spi/CMakeLists.txt b/src/platforms/qurt/fc_addon/mpu_spi/CMakeLists.txt index 137e50351a..60b553491f 100644 --- a/src/platforms/qurt/fc_addon/mpu_spi/CMakeLists.txt +++ b/src/platforms/qurt/fc_addon/mpu_spi/CMakeLists.txt @@ -54,6 +54,5 @@ px4_add_module( mpu9x50_main.cpp mpu9x50_params.c DEPENDS - platforms__common ) target_link_libraries(platforms__qurt__fc_addon__mpu_spi PRIVATE mpu9x50) diff --git a/src/platforms/qurt/fc_addon/mpu_spi/mpu9x50_params.c b/src/platforms/qurt/fc_addon/mpu_spi/mpu9x50_params.c index 4352c10185..7f1603d630 100644 --- a/src/platforms/qurt/fc_addon/mpu_spi/mpu9x50_params.c +++ b/src/platforms/qurt/fc_addon/mpu_spi/mpu9x50_params.c @@ -38,7 +38,7 @@ */ #include -#include +#include /** * Low pass filter frequency for Gyro diff --git a/src/platforms/qurt/fc_addon/rc_receiver/rc_receiver_params.c b/src/platforms/qurt/fc_addon/rc_receiver/rc_receiver_params.c index d7a43550e0..18204592ef 100644 --- a/src/platforms/qurt/fc_addon/rc_receiver/rc_receiver_params.c +++ b/src/platforms/qurt/fc_addon/rc_receiver/rc_receiver_params.c @@ -38,7 +38,7 @@ */ #include -#include +#include /** * RC receiver type diff --git a/src/platforms/qurt/fc_addon/uart_esc/CMakeLists.txt b/src/platforms/qurt/fc_addon/uart_esc/CMakeLists.txt index 89dc40c27a..9694951655 100644 --- a/src/platforms/qurt/fc_addon/uart_esc/CMakeLists.txt +++ b/src/platforms/qurt/fc_addon/uart_esc/CMakeLists.txt @@ -54,6 +54,5 @@ px4_add_module( uart_esc_main.cpp uart_esc_params.c DEPENDS - platforms__common ) target_link_libraries(platforms__qurt__fc_addon__uart_esc PRIVATE uart_esc) diff --git a/src/platforms/qurt/fc_addon/uart_esc/uart_esc_main.cpp b/src/platforms/qurt/fc_addon/uart_esc/uart_esc_main.cpp index 6f46bb1e03..01ca2a0295 100644 --- a/src/platforms/qurt/fc_addon/uart_esc/uart_esc_main.cpp +++ b/src/platforms/qurt/fc_addon/uart_esc/uart_esc_main.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/platforms/qurt/fc_addon/uart_esc/uart_esc_params.c b/src/platforms/qurt/fc_addon/uart_esc/uart_esc_params.c index ca1ca273b7..bcac46f73b 100644 --- a/src/platforms/qurt/fc_addon/uart_esc/uart_esc_params.c +++ b/src/platforms/qurt/fc_addon/uart_esc/uart_esc_params.c @@ -37,7 +37,7 @@ * Parameters defined for the uart esc driver */ #include -#include +#include /** * ESC model diff --git a/src/platforms/qurt/tests/hello/CMakeLists.txt b/src/platforms/qurt/tests/hello/CMakeLists.txt index 4664b35f89..d0e41237b5 100644 --- a/src/platforms/qurt/tests/hello/CMakeLists.txt +++ b/src/platforms/qurt/tests/hello/CMakeLists.txt @@ -38,6 +38,4 @@ px4_add_module( hello_start_qurt.cpp hello_example.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/qurt/tests/muorb/CMakeLists.txt b/src/platforms/qurt/tests/muorb/CMakeLists.txt index ac233a1202..c894349f07 100644 --- a/src/platforms/qurt/tests/muorb/CMakeLists.txt +++ b/src/platforms/qurt/tests/muorb/CMakeLists.txt @@ -37,6 +37,4 @@ px4_add_module( muorb_test_start_qurt.cpp muorb_test_example.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/platforms/ros/perf_counter.cpp b/src/platforms/ros/perf_counter.cpp index d23532422e..6655dc3c3c 100755 --- a/src/platforms/ros/perf_counter.cpp +++ b/src/platforms/ros/perf_counter.cpp @@ -41,7 +41,7 @@ */ #include #include -#include +#include diff --git a/src/systemcmds/bl_update/CMakeLists.txt b/src/systemcmds/bl_update/CMakeLists.txt index 623f5da933..c4d54e296f 100644 --- a/src/systemcmds/bl_update/CMakeLists.txt +++ b/src/systemcmds/bl_update/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS bl_update.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/config/CMakeLists.txt b/src/systemcmds/config/CMakeLists.txt index 5fd0edbcf5..1865c83ab0 100644 --- a/src/systemcmds/config/CMakeLists.txt +++ b/src/systemcmds/config/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS config.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/config/config.c b/src/systemcmds/config/config.c index 09c074bef9..c89fe28adf 100644 --- a/src/systemcmds/config/config.c +++ b/src/systemcmds/config/config.c @@ -59,7 +59,7 @@ #include #include "systemlib/systemlib.h" -#include "systemlib/param/param.h" +#include __EXPORT int config_main(int argc, char *argv[]); diff --git a/src/systemcmds/dumpfile/CMakeLists.txt b/src/systemcmds/dumpfile/CMakeLists.txt index bd0d1d0a69..28b589b2d2 100644 --- a/src/systemcmds/dumpfile/CMakeLists.txt +++ b/src/systemcmds/dumpfile/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS dumpfile.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/esc_calib/CMakeLists.txt b/src/systemcmds/esc_calib/CMakeLists.txt index 8073712b54..80c1764049 100644 --- a/src/systemcmds/esc_calib/CMakeLists.txt +++ b/src/systemcmds/esc_calib/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS esc_calib.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/hardfault_log/CMakeLists.txt b/src/systemcmds/hardfault_log/CMakeLists.txt index b5e768a18f..34a0474381 100644 --- a/src/systemcmds/hardfault_log/CMakeLists.txt +++ b/src/systemcmds/hardfault_log/CMakeLists.txt @@ -38,5 +38,4 @@ px4_add_module( SRCS hardfault_log.c DEPENDS - platforms__common ) diff --git a/src/systemcmds/led_control/CMakeLists.txt b/src/systemcmds/led_control/CMakeLists.txt index 39ab44847f..46be8140e4 100644 --- a/src/systemcmds/led_control/CMakeLists.txt +++ b/src/systemcmds/led_control/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS led_control.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/mixer/CMakeLists.txt b/src/systemcmds/mixer/CMakeLists.txt index afc8697744..56ece05f0a 100644 --- a/src/systemcmds/mixer/CMakeLists.txt +++ b/src/systemcmds/mixer/CMakeLists.txt @@ -40,6 +40,5 @@ px4_add_module( SRCS mixer.cpp DEPENDS - platforms__common - ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + mixer + ) \ No newline at end of file diff --git a/src/systemcmds/motor_ramp/CMakeLists.txt b/src/systemcmds/motor_ramp/CMakeLists.txt index 56ef2b70c5..755f033b3a 100644 --- a/src/systemcmds/motor_ramp/CMakeLists.txt +++ b/src/systemcmds/motor_ramp/CMakeLists.txt @@ -42,4 +42,3 @@ px4_add_module( DEPENDS platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/systemcmds/motor_test/CMakeLists.txt b/src/systemcmds/motor_test/CMakeLists.txt index 2e408be3dd..27605cef54 100644 --- a/src/systemcmds/motor_test/CMakeLists.txt +++ b/src/systemcmds/motor_test/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS motor_test.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/mtd/24xxxx_mtd.c b/src/systemcmds/mtd/24xxxx_mtd.c index 6263829ff0..8c476e91f8 100644 --- a/src/systemcmds/mtd/24xxxx_mtd.c +++ b/src/systemcmds/mtd/24xxxx_mtd.c @@ -66,7 +66,7 @@ #include #include -#include "systemlib/perf_counter.h" +#include /************************************************************************************ * Pre-processor Definitions diff --git a/src/systemcmds/mtd/CMakeLists.txt b/src/systemcmds/mtd/CMakeLists.txt index 19ef57fc3f..5e077f91eb 100644 --- a/src/systemcmds/mtd/CMakeLists.txt +++ b/src/systemcmds/mtd/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( mtd.c 24xxxx_mtd.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/mtd/mtd.c b/src/systemcmds/mtd/mtd.c index 3470af4cd9..ce296009fe 100644 --- a/src/systemcmds/mtd/mtd.c +++ b/src/systemcmds/mtd/mtd.c @@ -63,7 +63,7 @@ #include "systemlib/px4_macros.h" #include "systemlib/systemlib.h" -#include "systemlib/param/param.h" +#include #include diff --git a/src/systemcmds/nshterm/CMakeLists.txt b/src/systemcmds/nshterm/CMakeLists.txt index 1a7249ccc3..bed8206351 100644 --- a/src/systemcmds/nshterm/CMakeLists.txt +++ b/src/systemcmds/nshterm/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( SRCS nshterm.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/param/CMakeLists.txt b/src/systemcmds/param/CMakeLists.txt index a8b315c313..91a2640ca8 100644 --- a/src/systemcmds/param/CMakeLists.txt +++ b/src/systemcmds/param/CMakeLists.txt @@ -39,6 +39,4 @@ px4_add_module( SRCS param.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/systemcmds/param/param.cpp b/src/systemcmds/param/param.cpp index 6ea4c3259a..650d517921 100644 --- a/src/systemcmds/param/param.cpp +++ b/src/systemcmds/param/param.cpp @@ -58,10 +58,7 @@ #include #include "systemlib/systemlib.h" -#include "systemlib/param/param.h" -#if defined(FLASH_BASED_PARAMS) -# include "systemlib/flashparams/flashparams.h" -#endif +#include #include "systemlib/err.h" __BEGIN_DECLS diff --git a/src/systemcmds/perf/CMakeLists.txt b/src/systemcmds/perf/CMakeLists.txt index 708ead93cb..adecec55c2 100644 --- a/src/systemcmds/perf/CMakeLists.txt +++ b/src/systemcmds/perf/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS perf.c DEPENDS - platforms__common + perf ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/systemcmds/perf/perf.c b/src/systemcmds/perf/perf.c index b030ee8df1..8daa4a6bba 100644 --- a/src/systemcmds/perf/perf.c +++ b/src/systemcmds/perf/perf.c @@ -39,7 +39,7 @@ #include #include -#include "systemlib/perf_counter.h" +#include __EXPORT int perf_main(int argc, char *argv[]); diff --git a/src/systemcmds/pwm/CMakeLists.txt b/src/systemcmds/pwm/CMakeLists.txt index 60eac71ac1..98d5603bb8 100644 --- a/src/systemcmds/pwm/CMakeLists.txt +++ b/src/systemcmds/pwm/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( SRCS pwm.cpp DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/pwm/pwm.cpp b/src/systemcmds/pwm/pwm.cpp index 14d6fae1c9..3c487c13c8 100644 --- a/src/systemcmds/pwm/pwm.cpp +++ b/src/systemcmds/pwm/pwm.cpp @@ -63,7 +63,7 @@ #include "systemlib/systemlib.h" #include "systemlib/err.h" -#include "systemlib/param/param.h" +#include #include "drivers/drv_pwm_output.h" static void usage(const char *reason); diff --git a/src/systemcmds/reboot/CMakeLists.txt b/src/systemcmds/reboot/CMakeLists.txt index bb8837f396..ea30185f39 100644 --- a/src/systemcmds/reboot/CMakeLists.txt +++ b/src/systemcmds/reboot/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS reboot.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/reflect/CMakeLists.txt b/src/systemcmds/reflect/CMakeLists.txt index 7045a7c2bf..19241deaec 100644 --- a/src/systemcmds/reflect/CMakeLists.txt +++ b/src/systemcmds/reflect/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS reflect.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/sd_bench/CMakeLists.txt b/src/systemcmds/sd_bench/CMakeLists.txt index 8b74dedc6a..12134ca677 100644 --- a/src/systemcmds/sd_bench/CMakeLists.txt +++ b/src/systemcmds/sd_bench/CMakeLists.txt @@ -39,6 +39,5 @@ px4_add_module( SRCS sd_bench.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/tests/CMakeLists.txt b/src/systemcmds/tests/CMakeLists.txt index b6f015a3f5..f6e0000768 100644 --- a/src/systemcmds/tests/CMakeLists.txt +++ b/src/systemcmds/tests/CMakeLists.txt @@ -87,8 +87,10 @@ px4_add_module( -Wno-missing-declarations -Wno-double-promotion -Wno-unknown-warning-option - SRCS ${srcs} + SRCS + ${srcs} DEPENDS - platforms__common + modules__mc_pos_control__mc_pos_control_tests + git_ecl + ecl ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/systemcmds/tests/test_bson.c b/src/systemcmds/tests/test_bson.c index fd17025670..7dc2bd44ce 100644 --- a/src/systemcmds/tests/test_bson.c +++ b/src/systemcmds/tests/test_bson.c @@ -47,7 +47,7 @@ #include #include -#include +#include #include "tests_main.h" diff --git a/src/systemcmds/tests/test_file.c b/src/systemcmds/tests/test_file.c index 06329a06d4..782b932f97 100644 --- a/src/systemcmds/tests/test_file.c +++ b/src/systemcmds/tests/test_file.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/systemcmds/tests/test_file2.c b/src/systemcmds/tests/test_file2.c index b5339d79bd..f9b92a2507 100644 --- a/src/systemcmds/tests/test_file2.c +++ b/src/systemcmds/tests/test_file2.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/systemcmds/tests/test_mount.c b/src/systemcmds/tests/test_mount.c index bf0cd95f49..ec599c460c 100644 --- a/src/systemcmds/tests/test_mount.c +++ b/src/systemcmds/tests/test_mount.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/systemcmds/tests/test_param.c b/src/systemcmds/tests/test_param.c index 72c054edf8..466bea1cb9 100644 --- a/src/systemcmds/tests/test_param.c +++ b/src/systemcmds/tests/test_param.c @@ -40,7 +40,7 @@ #include #include #include "systemlib/err.h" -#include "systemlib/param/param.h" +#include #include "tests_main.h" #define PARAM_MAGIC1 12345678 diff --git a/src/systemcmds/tests/test_perf.c b/src/systemcmds/tests/test_perf.c index 7fee2be093..776397093a 100644 --- a/src/systemcmds/tests/test_perf.c +++ b/src/systemcmds/tests/test_perf.c @@ -34,7 +34,7 @@ #include #include -#include +#include #include "tests_main.h" diff --git a/src/systemcmds/top/CMakeLists.txt b/src/systemcmds/top/CMakeLists.txt index 356ecad455..080618fb20 100644 --- a/src/systemcmds/top/CMakeLists.txt +++ b/src/systemcmds/top/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS top.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/topic_listener/CMakeLists.txt b/src/systemcmds/topic_listener/CMakeLists.txt index cf3fc41093..014991b6c7 100644 --- a/src/systemcmds/topic_listener/CMakeLists.txt +++ b/src/systemcmds/topic_listener/CMakeLists.txt @@ -51,7 +51,6 @@ px4_add_module( SRCS topic_listener.cpp DEPENDS - platforms__common generate_topic_listener ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/tune_control/CMakeLists.txt b/src/systemcmds/tune_control/CMakeLists.txt index 8ef9b5055a..38a8ea1d2f 100644 --- a/src/systemcmds/tune_control/CMakeLists.txt +++ b/src/systemcmds/tune_control/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS tune_control.cpp DEPENDS - platforms__common + tunes ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/systemcmds/usb_connected/CMakeLists.txt b/src/systemcmds/usb_connected/CMakeLists.txt index ba80c9d848..fc56f45ab8 100644 --- a/src/systemcmds/usb_connected/CMakeLists.txt +++ b/src/systemcmds/usb_connected/CMakeLists.txt @@ -37,6 +37,5 @@ px4_add_module( SRCS usb_connected.c DEPENDS - platforms__common ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : + diff --git a/src/systemcmds/ver/CMakeLists.txt b/src/systemcmds/ver/CMakeLists.txt index 98823770e5..574d87926a 100644 --- a/src/systemcmds/ver/CMakeLists.txt +++ b/src/systemcmds/ver/CMakeLists.txt @@ -38,6 +38,5 @@ px4_add_module( SRCS ver.c DEPENDS - platforms__common + version ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/templates/module/CMakeLists.txt b/src/templates/module/CMakeLists.txt index b21e9bfc8a..75dfa2a6a8 100644 --- a/src/templates/module/CMakeLists.txt +++ b/src/templates/module/CMakeLists.txt @@ -38,7 +38,6 @@ px4_add_module( SRCS module.cpp DEPENDS - platforms__common modules__uORB )