diff --git a/CMakeLists.txt b/CMakeLists.txt index fc5bc249a2..019984d9ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,16 +150,6 @@ list(GET config_args 1 BOARD) list(GET config_args 2 LABEL) set(target_name "${OS}-${BOARD}-${LABEL}") -if("${OS}" STREQUAL "posix") - if (APPLE) - set(DF_TARGET darwin) - else() - set(DF_TARGET linux) - endif() -else() - set(DF_TARGET ${OS}) -endif() - message(STATUS "${target_name}") # switch to ros CMake file if building ros @@ -333,12 +323,11 @@ execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/include) #============================================================================= # DriverFramework Drivers # -#message("ADDING DRIVERS") set(df_driver_libs) foreach(driver ${config_df_driver_list}) add_subdirectory(src/lib/DriverFramework/drivers/${driver}) list(APPEND df_driver_libs df_${driver}) - message("adding driver: ${driver}") + message("Adding DF driver: ${driver}") endforeach() #============================================================================= @@ -361,8 +350,6 @@ endforeach() add_subdirectory(src/firmware/${OS}) -add_subdirectory(src/lib/DriverFramework/framework/src) - #add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp) if (NOT "${OS}" STREQUAL "nuttx") endif() diff --git a/cmake/configs/nuttx_mindpx-v2_default.cmake b/cmake/configs/nuttx_mindpx-v2_default.cmake index 6b52d9ad6c..9f0626e5b7 100644 --- a/cmake/configs/nuttx_mindpx-v2_default.cmake +++ b/cmake/configs/nuttx_mindpx-v2_default.cmake @@ -130,6 +130,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework platforms/nuttx # had to add for cmake, not sure why wasn't in original config diff --git a/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake b/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake index f753853176..c71db2fc31 100644 --- a/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake +++ b/cmake/configs/nuttx_px4-stm32f4discovery_default.cmake @@ -43,6 +43,7 @@ set(config_module_list lib/external_lgpl lib/geo lib/conversion + lib/DriverFramework/framework platforms/nuttx # had to add for cmake, not sure why wasn't in original config diff --git a/cmake/configs/nuttx_px4fmu-v1_default.cmake b/cmake/configs/nuttx_px4fmu-v1_default.cmake index fa95d0b304..85c7e2f347 100644 --- a/cmake/configs/nuttx_px4fmu-v1_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v1_default.cmake @@ -115,6 +115,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework platforms/nuttx # had to add for cmake, not sure why wasn't in original config diff --git a/cmake/configs/nuttx_px4fmu-v2_default.cmake b/cmake/configs/nuttx_px4fmu-v2_default.cmake index a59d6aa065..dc0594bfec 100644 --- a/cmake/configs/nuttx_px4fmu-v2_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v2_default.cmake @@ -124,6 +124,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework platforms/nuttx # had to add for cmake, not sure why wasn't in original config diff --git a/cmake/configs/nuttx_px4fmu-v2_ekf2.cmake b/cmake/configs/nuttx_px4fmu-v2_ekf2.cmake index d91249cee0..6cc8c2d262 100644 --- a/cmake/configs/nuttx_px4fmu-v2_ekf2.cmake +++ b/cmake/configs/nuttx_px4fmu-v2_ekf2.cmake @@ -123,6 +123,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework platforms/nuttx # had to add for cmake, not sure why wasn't in original config diff --git a/cmake/configs/nuttx_px4fmu-v4_default.cmake b/cmake/configs/nuttx_px4fmu-v4_default.cmake index 91653edc8e..0db31f82d6 100644 --- a/cmake/configs/nuttx_px4fmu-v4_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v4_default.cmake @@ -125,6 +125,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework platforms/nuttx # had to add for cmake, not sure why wasn't in original config diff --git a/cmake/configs/posix_eagle_default.cmake b/cmake/configs/posix_eagle_default.cmake index d58b80d4a8..6568717e2b 100644 --- a/cmake/configs/posix_eagle_default.cmake +++ b/cmake/configs/posix_eagle_default.cmake @@ -55,6 +55,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework platforms/common platforms/posix/px4_layer diff --git a/cmake/configs/posix_eagle_hil.cmake b/cmake/configs/posix_eagle_hil.cmake index b856088b3f..3c1ce62b40 100644 --- a/cmake/configs/posix_eagle_hil.cmake +++ b/cmake/configs/posix_eagle_hil.cmake @@ -33,6 +33,7 @@ set(config_module_list lib/geo lib/geo_lookup lib/conversion + lib/DriverFramework/framework platforms/common platforms/posix/px4_layer diff --git a/cmake/configs/posix_eagle_legacy_driver_default.cmake b/cmake/configs/posix_eagle_legacy_driver_default.cmake index e36e686c24..5bf90df961 100644 --- a/cmake/configs/posix_eagle_legacy_driver_default.cmake +++ b/cmake/configs/posix_eagle_legacy_driver_default.cmake @@ -56,6 +56,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework platforms/common platforms/posix/px4_layer diff --git a/cmake/configs/posix_eagle_legacy_driver_release.cmake b/cmake/configs/posix_eagle_legacy_driver_release.cmake index 31802985a6..42b02021b9 100644 --- a/cmake/configs/posix_eagle_legacy_driver_release.cmake +++ b/cmake/configs/posix_eagle_legacy_driver_release.cmake @@ -35,6 +35,7 @@ set(config_module_list lib/geo lib/geo_lookup lib/conversion + lib/DriverFramework/framework platforms/common platforms/posix/px4_layer diff --git a/cmake/configs/posix_eagle_muorb.cmake b/cmake/configs/posix_eagle_muorb.cmake index 576ddd3193..7da73985be 100644 --- a/cmake/configs/posix_eagle_muorb.cmake +++ b/cmake/configs/posix_eagle_muorb.cmake @@ -9,6 +9,8 @@ set(config_module_list modules/uORB + lib/DriverFramework/framework + platforms/posix/px4_layer platforms/posix/work_queue diff --git a/cmake/configs/posix_eagle_release.cmake b/cmake/configs/posix_eagle_release.cmake index 998c960f2b..962517a8d4 100644 --- a/cmake/configs/posix_eagle_release.cmake +++ b/cmake/configs/posix_eagle_release.cmake @@ -29,6 +29,7 @@ set(config_module_list lib/geo lib/geo_lookup lib/conversion + lib/DriverFramework/framework platforms/common platforms/posix/px4_layer diff --git a/cmake/configs/posix_rpi2_default.cmake b/cmake/configs/posix_rpi2_default.cmake index fdc722a0e0..071466b224 100644 --- a/cmake/configs/posix_rpi2_default.cmake +++ b/cmake/configs/posix_rpi2_default.cmake @@ -44,4 +44,5 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework ) diff --git a/cmake/configs/posix_rpi2_release.cmake b/cmake/configs/posix_rpi2_release.cmake index b23b2ea58e..e42a1b8fd3 100644 --- a/cmake/configs/posix_rpi2_release.cmake +++ b/cmake/configs/posix_rpi2_release.cmake @@ -53,4 +53,5 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework ) diff --git a/cmake/configs/posix_sitl_broadcast.cmake b/cmake/configs/posix_sitl_broadcast.cmake index bd2591a6d8..2e92a2f08d 100644 --- a/cmake/configs/posix_sitl_broadcast.cmake +++ b/cmake/configs/posix_sitl_broadcast.cmake @@ -62,6 +62,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework examples/px4_simple_app ) diff --git a/cmake/configs/posix_sitl_default.cmake b/cmake/configs/posix_sitl_default.cmake index bd2591a6d8..2e92a2f08d 100644 --- a/cmake/configs/posix_sitl_default.cmake +++ b/cmake/configs/posix_sitl_default.cmake @@ -62,6 +62,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework examples/px4_simple_app ) diff --git a/cmake/configs/posix_sitl_ekf2.cmake b/cmake/configs/posix_sitl_ekf2.cmake index 26ca2fad5a..5cb53b3c22 100644 --- a/cmake/configs/posix_sitl_ekf2.cmake +++ b/cmake/configs/posix_sitl_ekf2.cmake @@ -61,6 +61,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework examples/px4_simple_app ) diff --git a/cmake/configs/posix_sitl_replay.cmake b/cmake/configs/posix_sitl_replay.cmake index e2df0b4326..959e389bdb 100644 --- a/cmake/configs/posix_sitl_replay.cmake +++ b/cmake/configs/posix_sitl_replay.cmake @@ -25,6 +25,7 @@ set(config_module_list lib/external_lgpl lib/geo lib/geo_lookup + lib/DriverFramework/framework ) set(config_extra_builtin_cmds diff --git a/cmake/configs/qurt_eagle_default.cmake b/cmake/configs/qurt_eagle_default.cmake index 69a7a6030b..50681c7d98 100644 --- a/cmake/configs/qurt_eagle_default.cmake +++ b/cmake/configs/qurt_eagle_default.cmake @@ -74,6 +74,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/configs/qurt_eagle_hil.cmake b/cmake/configs/qurt_eagle_hil.cmake index 0770c767c0..784f438b1b 100644 --- a/cmake/configs/qurt_eagle_hil.cmake +++ b/cmake/configs/qurt_eagle_hil.cmake @@ -59,6 +59,7 @@ set(config_module_list lib/runway_takeoff lib/tailsitter_recovery lib/controllib + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/configs/qurt_eagle_legacy_driver_default.cmake b/cmake/configs/qurt_eagle_legacy_driver_default.cmake index 4962896ed9..562f3583dd 100644 --- a/cmake/configs/qurt_eagle_legacy_driver_default.cmake +++ b/cmake/configs/qurt_eagle_legacy_driver_default.cmake @@ -77,6 +77,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/configs/qurt_eagle_legacy_driver_release.cmake b/cmake/configs/qurt_eagle_legacy_driver_release.cmake index 4e8d3ae774..37d7132f83 100644 --- a/cmake/configs/qurt_eagle_legacy_driver_release.cmake +++ b/cmake/configs/qurt_eagle_legacy_driver_release.cmake @@ -87,6 +87,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/configs/qurt_eagle_muorb.cmake b/cmake/configs/qurt_eagle_muorb.cmake index 285d804d70..bf836acc74 100644 --- a/cmake/configs/qurt_eagle_muorb.cmake +++ b/cmake/configs/qurt_eagle_muorb.cmake @@ -33,6 +33,7 @@ set(config_module_list lib/geo lib/geo_lookup lib/conversion + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/configs/qurt_eagle_release.cmake b/cmake/configs/qurt_eagle_release.cmake index 62619a4b15..5cab38426a 100644 --- a/cmake/configs/qurt_eagle_release.cmake +++ b/cmake/configs/qurt_eagle_release.cmake @@ -83,6 +83,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/configs/qurt_eagle_test.cmake b/cmake/configs/qurt_eagle_test.cmake index 1597d7f4f2..b80251ec6d 100644 --- a/cmake/configs/qurt_eagle_test.cmake +++ b/cmake/configs/qurt_eagle_test.cmake @@ -31,6 +31,7 @@ set(config_module_list lib/mathlib lib/mathlib/math/filter lib/conversion + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/configs/qurt_eagle_travis.cmake b/cmake/configs/qurt_eagle_travis.cmake index 332fbcb1a4..778d434bac 100644 --- a/cmake/configs/qurt_eagle_travis.cmake +++ b/cmake/configs/qurt_eagle_travis.cmake @@ -67,6 +67,7 @@ set(config_module_list lib/terrain_estimation lib/runway_takeoff lib/tailsitter_recovery + lib/DriverFramework/framework # # QuRT port diff --git a/cmake/nuttx/px4_impl_nuttx.cmake b/cmake/nuttx/px4_impl_nuttx.cmake index fb0b81711d..51e8e5e6a9 100644 --- a/cmake/nuttx/px4_impl_nuttx.cmake +++ b/cmake/nuttx/px4_impl_nuttx.cmake @@ -500,8 +500,6 @@ function(px4_os_add_flags) #message(STATUS "nuttx: set(${${var}} ${${${var}}} ${added_${lower_var}} PARENT_SCOPE)") endforeach() - set(DF_TARGET "nuttx" PARENT_SCOPE) - endfunction() #============================================================================= diff --git a/cmake/qurt/px4_impl_qurt.cmake b/cmake/qurt/px4_impl_qurt.cmake index 1171d7fd6f..efb1135d7b 100644 --- a/cmake/qurt/px4_impl_qurt.cmake +++ b/cmake/qurt/px4_impl_qurt.cmake @@ -177,8 +177,6 @@ function(px4_os_add_flags) set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") - set(DF_TARGET "qurt" PARENT_SCOPE) - # output foreach(var ${inout_vars}) string(TOLOWER ${var} lower_var) diff --git a/src/firmware/nuttx/CMakeLists.txt b/src/firmware/nuttx/CMakeLists.txt index 2b24b477b5..926d331ec1 100644 --- a/src/firmware/nuttx/CMakeLists.txt +++ b/src/firmware/nuttx/CMakeLists.txt @@ -13,7 +13,7 @@ add_executable(firmware_nuttx set(nuttx_export_dir ${CMAKE_BINARY_DIR}/${BOARD}/NuttX/nuttx-export) set(link_libs - romfs apps nuttx m gcc df_driver_framework + romfs apps nuttx m gcc ) if(NOT ${BOARD} STREQUAL "sim") @@ -29,6 +29,7 @@ endif() target_link_libraries(firmware_nuttx -Wl,--start-group ${module_libraries} + ${df_driver_libs} ${config_extra_libs} ${link_libs} -Wl,--end-group) diff --git a/src/firmware/posix/CMakeLists.txt b/src/firmware/posix/CMakeLists.txt index fd67d4f2d9..dba2359262 100644 --- a/src/firmware/posix/CMakeLists.txt +++ b/src/firmware/posix/CMakeLists.txt @@ -17,17 +17,16 @@ if ("${BOARD}" STREQUAL "eagle") IDL_NAME px4muorb APPS_DEST "/home/linaro" SOURCES - px4muorb_stub.c - ${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp - apps.h + px4muorb_stub.c + ${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp + apps.h LINK_LIBS - -Wl,--start-group - ${module_libraries} - df_driver_framework - ${df_driver_libs} - ${FASTRPC_ARM_LIBS} - pthread m rt - -Wl,--end-group + -Wl,--start-group + ${module_libraries} + ${df_driver_libs} + ${FASTRPC_ARM_LIBS} + pthread m rt + -Wl,--end-group ) px4_add_adb_push(OUT upload @@ -47,7 +46,6 @@ else() target_link_libraries(mainapp -Wl,--start-group ${module_libraries} - df_driver_framework ${df_driver_libs} pthread m rt -Wl,--end-group @@ -55,7 +53,6 @@ else() else() target_link_libraries(mainapp ${module_libraries} - df_driver_framework ${df_driver_libs} pthread m ) diff --git a/src/firmware/qurt/CMakeLists.txt b/src/firmware/qurt/CMakeLists.txt index 2d7fb8c90b..29046e54bb 100644 --- a/src/firmware/qurt/CMakeLists.txt +++ b/src/firmware/qurt/CMakeLists.txt @@ -27,7 +27,6 @@ if ("${QURT_ENABLE_STUBS}" STREQUAL "1") -Wl,--start-group ${module_libraries} ${target_libraries} - df_driver_framework ${df_driver_libs} -Wl,--end-group ) @@ -44,7 +43,6 @@ else() LINK_LIBS ${module_libraries} ${target_libraries} - df_driver_framework ${df_driver_libs} m ) diff --git a/src/lib/DriverFramework b/src/lib/DriverFramework index 3601972656..0b57c455e4 160000 --- a/src/lib/DriverFramework +++ b/src/lib/DriverFramework @@ -1 +1 @@ -Subproject commit 360197265628a79429a0c828c7ded81157a6b1cf +Subproject commit 0b57c455e4eb789f5132c46af958517eada55cb5