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
+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()