boards organization

This commit is contained in:
Daniel Agar
2018-11-26 14:40:14 -08:00
committed by David Sidrane
parent c1f851a600
commit f692ad04d0
507 changed files with 9976 additions and 10990 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
############################################################################
set(SRCS_PLATFORM)
if (${OS} STREQUAL "nuttx")
if (${PX4_PLATFORM} STREQUAL "nuttx")
list(APPEND SRCS_PLATFORM
nuttx/cdev_platform.cpp
)
+5 -1
View File
@@ -42,4 +42,8 @@ px4_add_library(controllib
BlockLimitSym.cpp
BlockLowPass.cpp
BlockLowPass2.cpp
)
)
if(PX4_TESTING)
add_subdirectory(controllib_test)
endif()
+2 -2
View File
@@ -32,7 +32,7 @@
############################################################################
set(SRCS_PLATFORM)
if (${OS} STREQUAL "nuttx")
if (${PX4_PLATFORM} STREQUAL "nuttx")
if ("${CONFIG_I2C}" STREQUAL "y")
list(APPEND SRCS_PLATFORM nuttx/I2C.cpp)
endif()
@@ -53,7 +53,7 @@ px4_add_library(drivers__device
${SRCS_PLATFORM}
)
if (${OS} STREQUAL "nuttx")
if (${PX4_PLATFORM} STREQUAL "nuttx")
target_link_libraries(drivers__device PRIVATE nuttx_arch)
endif()
+5 -17
View File
@@ -39,6 +39,7 @@ endif()
# get full path for each module
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
@@ -49,20 +50,7 @@ if (DISABLE_PARAMS_MODULE_SCOPING)
get_filename_component(dir_path ${file_path} PATH)
list(APPEND module_list "${dir_path}")
endforeach()
list(REMOVE_DUPLICATES module_list)
else()
foreach(module ${config_module_list})
# include all subdirectories as well
file(GLOB children RELATIVE ${PX4_SOURCE_DIR}/src/${module} ${PX4_SOURCE_DIR}/src/${module}/*)
foreach(child ${children})
if(IS_DIRECTORY ${PX4_SOURCE_DIR}/src/${module}/${child})
list(APPEND module_list ${PX4_SOURCE_DIR}/src/${module}/${child})
endif()
endforeach()
list(APPEND module_list ${PX4_SOURCE_DIR}/src/${module})
endforeach()
list(APPEND module_list ${external_module_paths})
endif()
@@ -96,7 +84,7 @@ add_custom_command(OUTPUT ${parameters_xml}
--xml ${parameters_xml}
--inject-xml ${CMAKE_CURRENT_SOURCE_DIR}/parameters_injected.xml
--overrides ${PARAM_DEFAULT_OVERRIDES}
--board ${BOARD}
--board ${PX4_BOARD}
#--verbose
DEPENDS
${param_src_files}
@@ -132,12 +120,12 @@ else()
list(APPEND SRCS parameters.cpp)
endif()
if(${OS} STREQUAL "nuttx")
if(${PX4_PLATFORM} STREQUAL "nuttx")
add_subdirectory(flashparams)
endif()
# TODO: find a better way to do this
if (NOT "${CONFIG}" MATCHES "px4io")
if (NOT "${PX4_BOARD}" MATCHES "px4io")
add_library(parameters
${SRCS}
px4_parameters.c
@@ -157,6 +145,6 @@ else()
endif()
add_dependencies(parameters prebuild_targets)
if(${OS} STREQUAL "nuttx")
if(${PX4_PLATFORM} STREQUAL "nuttx")
target_link_libraries(parameters PRIVATE flashparams tinybson)
endif()
+4
View File
@@ -41,3 +41,7 @@ add_library(rc
)
target_compile_options(rc PRIVATE -Wno-unused-result)
target_link_libraries(rc PRIVATE prebuild_targets)
if(PX4_TESTING AND (${PX4_PLATFORM} MATCHES "posix"))
add_subdirectory(rc_tests)
endif()
+1
View File
@@ -3,6 +3,7 @@
#include <systemlib/err.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <drivers/drv_hrt.h>