Skip to content

Commit

Permalink
platforms/posix/src: move to platforms/posix/src/px4/common
Browse files Browse the repository at this point in the history
  • Loading branch information
bkueng committed Aug 30, 2019
1 parent 8cbb385 commit fa8165a
Show file tree
Hide file tree
Showing 33 changed files with 43 additions and 112 deletions.
6 changes: 2 additions & 4 deletions platforms/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

add_subdirectory(src)

include_directories(${CMAKE_CURRENT_BINARY_DIR})

get_property(module_libraries GLOBAL PROPERTY PX4_MODULE_LIBRARIES)
Expand Down Expand Up @@ -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
Expand All @@ -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
)

Expand Down
2 changes: 1 addition & 1 deletion platforms/posix/cmake/px4_impl_os.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
38 changes: 0 additions & 38 deletions platforms/posix/src/CMakeLists.txt

This file was deleted.

41 changes: 40 additions & 1 deletion platforms/posix/src/px4/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 0 additions & 68 deletions platforms/posix/src/px4_layer/CMakeLists.txt

This file was deleted.

0 comments on commit fa8165a

Please sign in to comment.