Browse Source

platforms/posix/src: move to platforms/posix/src/px4/common

sbg
Beat Küng 6 years ago
parent
commit
fa8165a1c3
  1. 6
      platforms/posix/CMakeLists.txt
  2. 2
      platforms/posix/cmake/px4_impl_os.cmake
  3. 38
      platforms/posix/src/CMakeLists.txt
  4. 41
      platforms/posix/src/px4/common/CMakeLists.txt
  5. 0
      platforms/posix/src/px4/common/drv_hrt.cpp
  6. 0
      platforms/posix/src/px4/common/lib_crc32.c
  7. 0
      platforms/posix/src/px4/common/lockstep_scheduler/.gitignore
  8. 0
      platforms/posix/src/px4/common/lockstep_scheduler/CMakeLists.txt
  9. 0
      platforms/posix/src/px4/common/lockstep_scheduler/build-and-test.sh
  10. 0
      platforms/posix/src/px4/common/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h
  11. 0
      platforms/posix/src/px4/common/lockstep_scheduler/src/lockstep_scheduler.cpp
  12. 0
      platforms/posix/src/px4/common/lockstep_scheduler/test/CMakeLists.txt
  13. 0
      platforms/posix/src/px4/common/lockstep_scheduler/test/src/lockstep_scheduler_test.cpp
  14. 0
      platforms/posix/src/px4/common/main.cpp
  15. 0
      platforms/posix/src/px4/common/px4-alias.sh_in
  16. 0
      platforms/posix/src/px4/common/px4_daemon/CMakeLists.txt
  17. 0
      platforms/posix/src/px4/common/px4_daemon/client.cpp
  18. 0
      platforms/posix/src/px4/common/px4_daemon/client.h
  19. 0
      platforms/posix/src/px4/common/px4_daemon/history.cpp
  20. 0
      platforms/posix/src/px4/common/px4_daemon/history.h
  21. 0
      platforms/posix/src/px4/common/px4_daemon/pxh.cpp
  22. 0
      platforms/posix/src/px4/common/px4_daemon/pxh.h
  23. 0
      platforms/posix/src/px4/common/px4_daemon/server.cpp
  24. 0
      platforms/posix/src/px4/common/px4_daemon/server.h
  25. 0
      platforms/posix/src/px4/common/px4_daemon/server_io.cpp
  26. 0
      platforms/posix/src/px4/common/px4_daemon/sock_protocol.cpp
  27. 0
      platforms/posix/src/px4/common/px4_daemon/sock_protocol.h
  28. 0
      platforms/posix/src/px4/common/px4_init.cpp
  29. 0
      platforms/posix/src/px4/common/px4_posix_impl.cpp
  30. 0
      platforms/posix/src/px4/common/px4_posix_tasks.cpp
  31. 0
      platforms/posix/src/px4/common/px4_sem.cpp
  32. 0
      platforms/posix/src/px4/common/shmem_posix.cpp
  33. 68
      platforms/posix/src/px4_layer/CMakeLists.txt

6
platforms/posix/CMakeLists.txt

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
add_subdirectory(src)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
get_property(module_libraries GLOBAL PROPERTY PX4_MODULE_LIBRARIES)
@ -37,7 +35,7 @@ if (("${PX4_BOARD}" MATCHES "atlflight_eagle") OR ("${PX4_BOARD}" MATCHES "atlfl @@ -37,7 +35,7 @@ if (("${PX4_BOARD}" MATCHES "atlflight_eagle") OR ("${PX4_BOARD}" MATCHES "atlfl
APPS_DEST "/home/linaro"
SOURCES
px4muorb_stub.c
src/main.cpp
src/px4/common/main.cpp
apps.cpp
LINK_LIBS
-Wl,--start-group
@ -52,7 +50,7 @@ if (("${PX4_BOARD}" MATCHES "atlflight_eagle") OR ("${PX4_BOARD}" MATCHES "atlfl @@ -52,7 +50,7 @@ if (("${PX4_BOARD}" MATCHES "atlflight_eagle") OR ("${PX4_BOARD}" MATCHES "atlfl
else()
add_executable(px4
src/main.cpp
src/px4/common/main.cpp
apps.cpp
)

2
platforms/posix/cmake/px4_impl_os.cmake

@ -150,7 +150,7 @@ function(px4_posix_generate_alias) @@ -150,7 +150,7 @@ function(px4_posix_generate_alias)
)
endif()
endforeach()
configure_file(${PX4_SOURCE_DIR}/platforms/posix/src/px4-alias.sh_in ${OUT})
configure_file(${PX4_SOURCE_DIR}/platforms/posix/src/px4/common/px4-alias.sh_in ${OUT})
endfunction()

38
platforms/posix/src/CMakeLists.txt

@ -1,38 +0,0 @@ @@ -1,38 +0,0 @@
############################################################################
#
# 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(px4_daemon)
add_subdirectory(px4_layer)
add_subdirectory(lockstep_scheduler)

41
platforms/posix/src/px4/common/CMakeLists.txt

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2019 PX4 Development Team. All rights reserved.
# 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
@ -31,3 +31,42 @@ @@ -31,3 +31,42 @@
#
############################################################################
add_subdirectory(px4_daemon)
add_subdirectory(lockstep_scheduler)
set(EXTRA_DEPENDS)
if("${CONFIG_SHMEM}" STREQUAL "1")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
include(hexagon_sdk)
include_directories(${HEXAGON_SDK_INCLUDES})
include_directories(${PX4_BINARY_DIR}/platforms/posix)
list(APPEND SHMEM_SRCS
shmem_posix.cpp
)
add_definitions(-DCONFIG_SHMEM=1)
set(EXTRA_DEPENDS generate_px4muorb_stubs)
endif()
add_library(px4_layer
px4_posix_impl.cpp
px4_posix_tasks.cpp
px4_sem.cpp
px4_init.cpp
lib_crc32.c
drv_hrt.cpp
${SHMEM_SRCS}
)
target_compile_definitions(px4_layer PRIVATE MODULE_NAME="px4")
target_compile_options(px4_layer PRIVATE -Wno-cast-align) # TODO: fix and enable
target_link_libraries(px4_layer PRIVATE work_queue px4_work_queue)
target_link_libraries(px4_layer PRIVATE px4_daemon drivers_board)
if(ENABLE_LOCKSTEP_SCHEDULER)
target_link_libraries(px4_layer PRIVATE lockstep_scheduler)
endif()
if (EXTRA_DEPENDS)
add_dependencies(px4_layer ${EXTRA_DEPENDS})
endif()

0
platforms/posix/src/px4_layer/drv_hrt.cpp → platforms/posix/src/px4/common/drv_hrt.cpp

0
platforms/posix/src/px4_layer/lib_crc32.c → platforms/posix/src/px4/common/lib_crc32.c

0
platforms/posix/src/lockstep_scheduler/.gitignore → platforms/posix/src/px4/common/lockstep_scheduler/.gitignore vendored

0
platforms/posix/src/lockstep_scheduler/CMakeLists.txt → platforms/posix/src/px4/common/lockstep_scheduler/CMakeLists.txt

0
platforms/posix/src/lockstep_scheduler/build-and-test.sh → platforms/posix/src/px4/common/lockstep_scheduler/build-and-test.sh

0
platforms/posix/src/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h → platforms/posix/src/px4/common/lockstep_scheduler/include/lockstep_scheduler/lockstep_scheduler.h

0
platforms/posix/src/lockstep_scheduler/src/lockstep_scheduler.cpp → platforms/posix/src/px4/common/lockstep_scheduler/src/lockstep_scheduler.cpp

0
platforms/posix/src/lockstep_scheduler/test/CMakeLists.txt → platforms/posix/src/px4/common/lockstep_scheduler/test/CMakeLists.txt

0
platforms/posix/src/lockstep_scheduler/test/src/lockstep_scheduler_test.cpp → platforms/posix/src/px4/common/lockstep_scheduler/test/src/lockstep_scheduler_test.cpp

0
platforms/posix/src/main.cpp → platforms/posix/src/px4/common/main.cpp

0
platforms/posix/src/px4-alias.sh_in → platforms/posix/src/px4/common/px4-alias.sh_in

0
platforms/posix/src/px4_daemon/CMakeLists.txt → platforms/posix/src/px4/common/px4_daemon/CMakeLists.txt

0
platforms/posix/src/px4_daemon/client.cpp → platforms/posix/src/px4/common/px4_daemon/client.cpp

0
platforms/posix/src/px4_daemon/client.h → platforms/posix/src/px4/common/px4_daemon/client.h

0
platforms/posix/src/px4_daemon/history.cpp → platforms/posix/src/px4/common/px4_daemon/history.cpp

0
platforms/posix/src/px4_daemon/history.h → platforms/posix/src/px4/common/px4_daemon/history.h

0
platforms/posix/src/px4_daemon/pxh.cpp → platforms/posix/src/px4/common/px4_daemon/pxh.cpp

0
platforms/posix/src/px4_daemon/pxh.h → platforms/posix/src/px4/common/px4_daemon/pxh.h

0
platforms/posix/src/px4_daemon/server.cpp → platforms/posix/src/px4/common/px4_daemon/server.cpp

0
platforms/posix/src/px4_daemon/server.h → platforms/posix/src/px4/common/px4_daemon/server.h

0
platforms/posix/src/px4_daemon/server_io.cpp → platforms/posix/src/px4/common/px4_daemon/server_io.cpp

0
platforms/posix/src/px4_daemon/sock_protocol.cpp → platforms/posix/src/px4/common/px4_daemon/sock_protocol.cpp

0
platforms/posix/src/px4_daemon/sock_protocol.h → platforms/posix/src/px4/common/px4_daemon/sock_protocol.h

0
platforms/posix/src/px4_layer/px4_init.cpp → platforms/posix/src/px4/common/px4_init.cpp

0
platforms/posix/src/px4_layer/px4_posix_impl.cpp → platforms/posix/src/px4/common/px4_posix_impl.cpp

0
platforms/posix/src/px4_layer/px4_posix_tasks.cpp → platforms/posix/src/px4/common/px4_posix_tasks.cpp

0
platforms/posix/src/px4_layer/px4_sem.cpp → platforms/posix/src/px4/common/px4_sem.cpp

0
platforms/posix/src/px4_layer/shmem_posix.cpp → platforms/posix/src/px4/common/shmem_posix.cpp

68
platforms/posix/src/px4_layer/CMakeLists.txt

@ -1,68 +0,0 @@ @@ -1,68 +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.
#
############################################################################
set(EXTRA_DEPENDS)
if("${CONFIG_SHMEM}" STREQUAL "1")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
include(hexagon_sdk)
include_directories(${HEXAGON_SDK_INCLUDES})
include_directories(${PX4_BINARY_DIR}/platforms/posix)
list(APPEND SHMEM_SRCS
shmem_posix.cpp
)
add_definitions(-DCONFIG_SHMEM=1)
set(EXTRA_DEPENDS generate_px4muorb_stubs)
endif()
add_library(px4_layer
px4_posix_impl.cpp
px4_posix_tasks.cpp
px4_sem.cpp
px4_init.cpp
lib_crc32.c
drv_hrt.cpp
${SHMEM_SRCS}
)
target_compile_definitions(px4_layer PRIVATE MODULE_NAME="px4")
target_compile_options(px4_layer PRIVATE -Wno-cast-align) # TODO: fix and enable
target_link_libraries(px4_layer PRIVATE work_queue px4_work_queue)
target_link_libraries(px4_layer PRIVATE px4_daemon drivers_board)
if(ENABLE_LOCKSTEP_SCHEDULER)
target_link_libraries(px4_layer PRIVATE lockstep_scheduler)
endif()
if (EXTRA_DEPENDS)
add_dependencies(px4_layer ${EXTRA_DEPENDS})
endif()
Loading…
Cancel
Save