move posix, nuttx, qurt components into platforms

This commit is contained in:
Daniel Agar
2018-01-15 15:34:18 -05:00
committed by Lorenz Meier
parent a644ed90dd
commit 2ff81393bc
115 changed files with 251 additions and 306 deletions
+2
View File
@@ -397,6 +397,8 @@ endif()
#============================================================================= #=============================================================================
# subdirectories # subdirectories
# #
add_subdirectory(src/platforms/common)
foreach(module ${config_module_list}) foreach(module ${config_module_list})
add_subdirectory(src/${module}) add_subdirectory(src/${module})
endforeach() endforeach()
+3 -3
View File
@@ -8,9 +8,9 @@ then
PATTERN="$1" PATTERN="$1"
fi fi
exec find src \ exec find src platforms \
-path src/examples/attitude_estimator_ekf -prune -o \ -path platforms/nuttx/NuttX -prune -o \
-path src/examples/ekf_att_pos_estimator -prune -o \ -path platforms/nuttx/nuttx-configs -prune -o \
-path src/lib/DriverFramework -prune -o \ -path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \ -path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \ -path src/lib/matrix -prune -o \
@@ -126,11 +126,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
@@ -87,7 +87,4 @@ set(config_module_list
lib/rc lib/rc
lib/tailsitter_recovery lib/tailsitter_recovery
lib/version lib/version
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
) )
@@ -137,11 +137,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
@@ -93,11 +93,6 @@ set(config_module_list
lib/tailsitter_recovery lib/tailsitter_recovery
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
@@ -71,7 +71,4 @@ set(config_module_list
modules/systemlib modules/systemlib
modules/systemlib/param modules/systemlib/param
modules/uORB modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
) )
@@ -141,11 +141,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
@@ -150,13 +150,6 @@ set(config_module_list
lib/version lib/version
lib/DriverFramework/framework lib/DriverFramework/framework
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
# #
@@ -119,11 +119,6 @@ set(config_module_list
lib/tailsitter_recovery lib/tailsitter_recovery
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
@@ -43,11 +43,6 @@ set(config_module_list
lib/mathlib/math/filter lib/mathlib/math/filter
lib/mixer lib/mixer
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# Demo apps # Demo apps
@@ -63,7 +63,5 @@ set(config_module_list
modules/systemlib modules/systemlib
modules/systemlib/param modules/systemlib/param
modules/uORB modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
) )
+1 -3
View File
@@ -72,7 +72,5 @@ set(config_module_list
modules/systemlib modules/systemlib
modules/systemlib/param modules/systemlib/param
modules/uORB modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
) )
@@ -154,13 +154,6 @@ set(config_module_list
lib/tunes lib/tunes
lib/version lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
# #
-5
View File
@@ -138,11 +138,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
@@ -155,13 +155,6 @@ set(config_module_list
lib/tunes lib/tunes
lib/version lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
# #
@@ -148,13 +148,6 @@ set(config_module_list
lib/tunes lib/tunes
lib/version lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
# #
@@ -147,13 +147,6 @@ set(config_module_list
lib/tunes lib/tunes
lib/version lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
# #
@@ -149,13 +149,6 @@ set(config_module_list
lib/tunes lib/tunes
lib/version lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
# #
@@ -7,5 +7,4 @@ set(config_module_list
lib/mixer lib/mixer
lib/rc lib/rc
modules/px4iofirmware modules/px4iofirmware
platforms/common
) )
@@ -126,11 +126,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
# #
# OBC challenge # OBC challenge
@@ -60,12 +60,4 @@ set(config_module_list
modules/systemlib/param modules/systemlib/param
modules/systemlib modules/systemlib
lib/version lib/version
#
# Libraries
#
# had to add for cmake, not sure why wasn't in original config
platforms/nuttx
platforms/common
platforms/nuttx/px4_layer
) )
-5
View File
@@ -102,9 +102,4 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
) )
-7
View File
@@ -85,13 +85,6 @@ set(config_module_list
lib/tailsitter_recovery lib/tailsitter_recovery
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
#
# POSIX
#
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
) )
set(config_df_driver_list set(config_df_driver_list
-3
View File
@@ -48,9 +48,6 @@ set(config_module_list
lib/version lib/version
lib/DriverFramework/framework lib/DriverFramework/framework
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
modules/muorb/krait modules/muorb/krait
) )
-3
View File
@@ -19,9 +19,6 @@ set(config_module_list
lib/DriverFramework/framework lib/DriverFramework/framework
platforms/posix/px4_layer
platforms/posix/work_queue
modules/muorb/krait modules/muorb/krait
) )
-7
View File
@@ -96,13 +96,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
#
# POSIX
#
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
examples/px4_simple_app examples/px4_simple_app
) )
-7
View File
@@ -95,13 +95,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
#
# POSIX
#
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
examples/px4_simple_app examples/px4_simple_app
) )
-7
View File
@@ -107,13 +107,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
#
# POSIX
#
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
) )
# #
+1 -5
View File
@@ -83,8 +83,4 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
)
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)
@@ -75,8 +75,4 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/tunes lib/tunes
lib/version lib/version
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
) )
-8
View File
@@ -64,7 +64,6 @@ set(config_module_list
platforms/posix/tests/hrt_test platforms/posix/tests/hrt_test
platforms/posix/tests/muorb platforms/posix/tests/muorb
platforms/posix/tests/vcdev_test platforms/posix/tests/vcdev_test
platforms/posix/tests/wqueue
# #
# General system control # General system control
@@ -135,13 +134,6 @@ set(config_module_list
lib/tunes lib/tunes
lib/version lib/version
#
# Platform
#
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
# #
# OBC challenge # OBC challenge
# #
-3
View File
@@ -4,9 +4,6 @@ set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cma
set(config_module_list set(config_module_list
drivers/device drivers/device
drivers/boards/sitl drivers/boards/sitl
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
systemcmds/param systemcmds/param
systemcmds/ver systemcmds/ver
systemcmds/perf systemcmds/perf
-8
View File
@@ -33,13 +33,5 @@ set(config_module_list
modules/systemlib/param modules/systemlib/param
modules/systemlib modules/systemlib
modules/uORB modules/uORB
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
platforms/qurt/tests/hello
) )
-7
View File
@@ -73,13 +73,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
# #
# sources for muorb over fastrpc # sources for muorb over fastrpc
# #
-8
View File
@@ -45,14 +45,6 @@ set(config_module_list
lib/version lib/version
lib/DriverFramework/framework lib/DriverFramework/framework
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
platforms/qurt/tests/muorb
# #
# sources for muorb over fastrpc # sources for muorb over fastrpc
# #
-11
View File
@@ -42,16 +42,5 @@ set(config_module_list
lib/mathlib lib/mathlib
lib/mathlib/math/filter lib/mathlib/math/filter
lib/mixer lib/mixer
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
platforms/qurt/tests/hello
platforms/posix/tests/vcdev_test
platforms/posix/tests/hrt_test
platforms/posix/tests/wqueue
) )
-7
View File
@@ -79,13 +79,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
# #
# sources for muorb over fastrpc # sources for muorb over fastrpc
# #
@@ -97,13 +97,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
# #
# sources for muorb over fastrpc # sources for muorb over fastrpc
# #
-7
View File
@@ -96,13 +96,6 @@ set(config_module_list
lib/terrain_estimation lib/terrain_estimation
lib/version lib/version
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
# #
# sources for muorb over fastrpc # sources for muorb over fastrpc
# #
+35
View File
@@ -1,6 +1,41 @@
############################################################################
#
# 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.
#
############################################################################
include(common/px4_upload) include(common/px4_upload)
include(cygwin_cygpath) include(cygwin_cygpath)
add_subdirectory(src)
if (NOT FW_NAME) if (NOT FW_NAME)
set(FW_NAME ${CONFIG}.elf) set(FW_NAME ${CONFIG}.elf)
endif() endif()
+8 -4
View File
@@ -175,13 +175,17 @@ function(px4_os_add_flags)
LINK_DIRS ${LINK_DIRS} LINK_DIRS ${LINK_DIRS}
DEFINITIONS ${DEFINITIONS}) DEFINITIONS ${DEFINITIONS})
set(added_include_dirs include_directories(BEFORE SYSTEM
${PX4_BINARY_DIR}/NuttX/nuttx/include
${PX4_BINARY_DIR}/NuttX/nuttx/include/cxx
)
include_directories(
${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/armv7-m ${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/armv7-m
${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/chip ${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/chip
${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/common ${PX4_BINARY_DIR}/NuttX/nuttx/arch/arm/src/common
${PX4_BINARY_DIR}/NuttX/nuttx/include
${PX4_BINARY_DIR}/NuttX/nuttx/include/cxx ${PX4_BINARY_DIR}/NuttX/apps/include
${PX4_SOURCE_DIR}/platforms/nuttx/NuttX/apps/include
) )
#set(added_exe_linker_flags) #set(added_exe_linker_flags)
@@ -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 # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
@@ -30,13 +30,5 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
# #
############################################################################ ############################################################################
px4_add_module(
MODULE platforms__nuttx__px4_layer add_subdirectory(px4_layer)
COMPILE_FLAGS
SRCS
px4_nuttx_tasks.c
../../posix/px4_layer/px4_log.c
DEPENDS
platforms__common
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
@@ -30,12 +30,16 @@
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
# #
############################################################################ ############################################################################
px4_add_module(
MODULE platforms__nuttx # skip for px4_layer support on an IO board
COMPILE_FLAGS if (NOT ${BOARD} MATCHES "px4io")
px4_add_module(
MODULE platform_px4_layer
SRCS SRCS
px4_nuttx_tasks.c
px4_nuttx_impl.cpp px4_nuttx_impl.cpp
DEPENDS DEPENDS
platforms__common prebuild_targets
) )
# vim: set noet ft=cmake fenc=utf-8 ff=unix : endif()
@@ -41,7 +41,6 @@
#include <px4_middleware.h> #include <px4_middleware.h>
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
namespace px4 namespace px4
{ {
@@ -37,24 +37,22 @@
* Implementation of existing task API for NuttX * Implementation of existing task API for NuttX
*/ */
#include <px4_config.h> #include <nuttx/config.h>
#include <px4_tasks.h>
#include <unistd.h> #include <sys/wait.h>
#include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <stdlib.h>
#include <sched.h>
#include <signal.h>
#include <unistd.h> #include <unistd.h>
#include <float.h> #include <signal.h>
#include <string.h> #include <string.h>
#include <sched.h>
#include <errno.h>
#include <stdbool.h>
#include <sys/stat.h> #include <px4_config.h>
#include <sys/types.h>
#include <px4_log.h> #include <px4_log.h>
#include <systemlib/systemlib.h> #include <px4_tasks.h>
void void
px4_systemreset(bool to_bootloader) px4_systemreset(bool to_bootloader)
@@ -115,4 +113,3 @@ const char *px4_get_taskname(void)
return "app"; return "app";
#endif #endif
} }
+3 -1
View File
@@ -1,5 +1,7 @@
include (common/px4_upload) include (common/px4_upload)
add_subdirectory(src)
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
get_property(module_libraries GLOBAL PROPERTY PX4_LIBRARIES) get_property(module_libraries GLOBAL PROPERTY PX4_LIBRARIES)
@@ -10,7 +12,7 @@ px4_posix_generate_builtin_commands(
# Define build target # Define build target
set(APP_NAME px4) set(APP_NAME px4)
set(MAIN_SRC ${PX4_SOURCE_DIR}/src/platforms/posix/main.cpp) set(MAIN_SRC src/main.cpp)
set(UPLOAD_NAME upload) set(UPLOAD_NAME upload)
if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior")) if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
+1 -3
View File
@@ -165,9 +165,7 @@ function(px4_os_add_flags)
DEFINITIONS ${DEFINITIONS}) DEFINITIONS ${DEFINITIONS})
set(added_include_dirs set(added_include_dirs
src/modules/systemlib platforms/posix/include
src/platforms/posix/include
mavlink/include/mavlink
) )
# This block sets added_definitions and added_cxx_flags. # This block sets added_definitions and added_cxx_flags.
+2 -2
View File
@@ -32,7 +32,7 @@ endfunction()
# sitl run targets # sitl run targets
# #
set(SITL_RUNNER_MAIN_CPP ${PX4_SOURCE_DIR}/src/platforms/posix/main.cpp) set(SITL_RUNNER_MAIN_CPP src/main.cpp)
px4_add_sitl_app(APP_NAME px4 px4_add_sitl_app(APP_NAME px4
UPLOAD_NAME upload UPLOAD_NAME upload
MAIN_SRC ${SITL_RUNNER_MAIN_CPP} MAIN_SRC ${SITL_RUNNER_MAIN_CPP}
@@ -111,7 +111,7 @@ foreach(viewer ${viewers})
set(SITL_RUNNER_MODEL_FILE ${PX4_SOURCE_DIR}/${config_sitl_rcS_dir}/${model}) set(SITL_RUNNER_MODEL_FILE ${PX4_SOURCE_DIR}/${config_sitl_rcS_dir}/${model})
set(SITL_RUNNER_WORKING_DIRECTORY ${SITL_WORKING_DIR}) set(SITL_RUNNER_WORKING_DIRECTORY ${SITL_WORKING_DIR})
configure_file(${PX4_SOURCE_DIR}/src/platforms/posix/sitl_runner_main.cpp.in sitl_runner_main_${model}.cpp @ONLY) configure_file(src/sitl_runner_main.cpp.in sitl_runner_main_${model}.cpp @ONLY)
px4_add_sitl_app(APP_NAME px4_${model} px4_add_sitl_app(APP_NAME px4_${model}
UPLOAD_NAME upload_${model} UPLOAD_NAME upload_${model}

Some files were not shown because too many files have changed in this diff Show More