mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 08:50:35 +08:00
cmake remove circular linking and reorganize
- px4_add_module now requires MAIN - px4_add_library doesn't automatically link
This commit is contained in:
@@ -37,6 +37,4 @@ px4_add_module(
|
||||
SRCS
|
||||
aerofc_adc.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -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 :
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,5 @@ px4_add_module(
|
||||
lps25h_spi.cpp
|
||||
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
#include <board_config.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_baro.h>
|
||||
|
||||
@@ -42,6 +42,5 @@ px4_add_module(
|
||||
COMPILE_FLAGS
|
||||
SRCS ${srcs}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <platforms/px4_getopt.h>
|
||||
|
||||
|
||||
@@ -43,6 +43,5 @@ px4_add_module(
|
||||
COMPILE_FLAGS
|
||||
SRCS ${srcs}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <platforms/px4_getopt.h>
|
||||
|
||||
|
||||
@@ -37,5 +37,4 @@ px4_add_module(
|
||||
SRCS
|
||||
batt_smbus.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <px4_config.h>
|
||||
#include <px4_workqueue.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <uORB/topics/battery_status.h>
|
||||
#include <uORB/topics/subsystem_info.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
@@ -37,6 +37,5 @@ px4_add_module(
|
||||
SRCS
|
||||
blinkm.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
#include <px4_workqueue.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
#include <drivers/drv_board_led.h>
|
||||
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -74,10 +74,10 @@
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/hardfault_log.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
# if defined(FLASH_BASED_PARAMS)
|
||||
# include <systemlib/flashparams/flashfs.h>
|
||||
# include <parameters/flashparams/flashfs.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -73,13 +73,13 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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()
|
||||
|
||||
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()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <errno.h>
|
||||
#include <nuttx/mm/gran.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
|
||||
@@ -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)
|
||||
add_dependencies(drivers_boards_common_arch prebuild_targets)
|
||||
target_link_libraries(drivers_boards_common_arch PRIVATE nuttx_arch)
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
add_dependencies(drivers_boards_common_arch prebuild_targets)
|
||||
target_link_libraries(drivers_boards_common_arch PRIVATE nuttx_arch)
|
||||
|
||||
@@ -43,5 +43,6 @@ if (NOT ${LABEL} STREQUAL "bootloader")
|
||||
)
|
||||
endif()
|
||||
|
||||
px4_add_library(board_stm32 ${SRCS})
|
||||
add_dependencies(board_stm32 nuttx_build)
|
||||
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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/hardfault_log.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -69,14 +69,14 @@
|
||||
#include <drivers/drv_board_led.h>
|
||||
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
|
||||
#include <systemlib/systemlib.h>
|
||||
#endif
|
||||
|
||||
#if defined(FLASH_BASED_PARAMS)
|
||||
# include <systemlib/flashparams/flashfs.h>
|
||||
# if defined(FLASH_BASED_PARAMS)
|
||||
# include <parameters/flashparams/flashfs.h>
|
||||
#endif
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -74,12 +74,12 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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
|
||||
)
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#if defined(CONFIG_KINETIS_BBSRAM) //fixme:Need BBSRAM
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
#include <drivers/drv_board_led.h>
|
||||
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#include <drivers/drv_board_led.h>
|
||||
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
|
||||
#include <systemlib/systemlib.h>
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -69,14 +69,14 @@
|
||||
#include <drivers/drv_board_led.h>
|
||||
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
|
||||
#include <systemlib/systemlib.h>
|
||||
#endif
|
||||
|
||||
#if defined(FLASH_BASED_PARAMS)
|
||||
# include <systemlib/flashparams/flashfs.h>
|
||||
# if defined(FLASH_BASED_PARAMS)
|
||||
# include <parameters/flashparams/flashfs.h>
|
||||
#endif
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -73,13 +73,13 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -74,13 +74,13 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -74,13 +74,13 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -76,13 +76,13 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
/****************************************************************************
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -74,13 +74,13 @@
|
||||
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <systemlib/hardfault_log.h>
|
||||
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
/****************************************************************************
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#include <drivers/drv_board_led.h>
|
||||
|
||||
#include <systemlib/cpuload.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
|
||||
#include <systemlib/systemlib.h>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -72,13 +72,12 @@
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/hardfault_log.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
|
||||
# if defined(FLASH_BASED_PARAMS)
|
||||
# include <systemlib/flashparams/flashfs.h>
|
||||
# include <parameters/flashparams/flashfs.h>
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
@@ -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)
|
||||
@@ -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 :
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <px4_workqueue.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
#include <px4_log.h>
|
||||
|
||||
#define arraySize(a) (sizeof((a))/sizeof(((a)[0])))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#ifdef __PX4_NUTTX
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
#include <px4_log.h>
|
||||
|
||||
#include "camera_interface.h"
|
||||
|
||||
@@ -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 :
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include <drivers/drv_airspeed.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -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 :
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <parameters/param.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include <mathlib/math/filter/LowPassFilter2p.hpp>
|
||||
|
||||
|
||||
@@ -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 :
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <px4_config.h>
|
||||
#include <sys/types.h>
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
|
||||
@@ -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 :
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <px4_config.h>
|
||||
#include <sys/types.h>
|
||||
#include <systemlib/airspeed.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
|
||||
@@ -39,5 +39,4 @@ px4_add_module(
|
||||
SRCS
|
||||
hc_sr04.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -37,6 +37,4 @@ px4_add_module(
|
||||
SRCS
|
||||
leddar_one.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include <uORB/topics/distance_sensor.h>
|
||||
|
||||
|
||||
@@ -40,6 +40,5 @@ px4_add_module(
|
||||
LidarLiteI2C.cpp
|
||||
LidarLitePWM.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include <px4_workqueue.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include <drivers/device/i2c.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/topics/pwm_input.h>
|
||||
|
||||
@@ -38,6 +38,5 @@ px4_add_module(
|
||||
SRCS
|
||||
mb12xx.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -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 :
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -39,5 +39,4 @@ px4_add_module(
|
||||
SF0XTest.cpp
|
||||
../sf0x_parser.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
|
||||
@@ -39,6 +39,5 @@ px4_add_module(
|
||||
SRCS
|
||||
sf1xx.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -38,6 +38,5 @@ px4_add_module(
|
||||
SRCS
|
||||
srf02.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -38,6 +38,5 @@ px4_add_module(
|
||||
SRCS
|
||||
srf02_i2c.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -39,6 +39,5 @@ px4_add_module(
|
||||
SRCS
|
||||
teraranger.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -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 :
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
@@ -37,6 +37,5 @@ px4_add_module(
|
||||
SRCS
|
||||
ulanding.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
#include <systemlib/perf_counter.h>
|
||||
#include <perf/perf_counter.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <drivers/device/ringbuffer.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -44,6 +44,5 @@ px4_add_module(
|
||||
devices/src/ashtech.cpp
|
||||
devices/src/ubx.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
git_gps_devices
|
||||
)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
#include <mathlib/mathlib.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/param/param.h>
|
||||
#include <parameters/param.h>
|
||||
#include <drivers/drv_gps.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/topics/vehicle_gps_position.h>
|
||||
|
||||
@@ -38,6 +38,4 @@ px4_add_module(
|
||||
SRCS
|
||||
adis16448.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user