mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 07:03:33 +08:00
Don't add DriverFramework dir for NuttX
I am unable to get the nuttx build dependencies set up so that it builds the export dir before it builds df_driver_framework. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
+2
-3
@@ -335,10 +335,9 @@ foreach(module ${config_module_list})
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
add_subdirectory(src/firmware/${OS})
|
add_subdirectory(src/firmware/${OS})
|
||||||
add_subdirectory(src/lib/DriverFramework)
|
|
||||||
|
|
||||||
if("${OS}" STREQUAL "nuttx")
|
if (NOT "${OS}" STREQUAL "nuttx")
|
||||||
add_dependencies(df_driver_framework nuttx_export_${BOARD})
|
add_subdirectory(src/lib/DriverFramework)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (config_io_board)
|
if (config_io_board)
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ function(px4_os_add_flags)
|
|||||||
${nuttx_export_dir}/include/cxx
|
${nuttx_export_dir}/include/cxx
|
||||||
${nuttx_export_dir}/arch/chip
|
${nuttx_export_dir}/arch/chip
|
||||||
${nuttx_export_dir}/arch/common
|
${nuttx_export_dir}/arch/common
|
||||||
|
src/lib/DriverFramework/framework/include
|
||||||
)
|
)
|
||||||
set(added_link_dirs
|
set(added_link_dirs
|
||||||
${nuttx_export_dir}/libs
|
${nuttx_export_dir}/libs
|
||||||
@@ -440,7 +441,7 @@ function(px4_os_add_flags)
|
|||||||
-nostdlib
|
-nostdlib
|
||||||
)
|
)
|
||||||
|
|
||||||
set(added_exe_linker_flags) # none currently
|
set(added_exe_linker_flags -lstdc++) # none currently
|
||||||
|
|
||||||
set(cpu_flags)
|
set(cpu_flags)
|
||||||
if (${BOARD} STREQUAL "px4fmu-v1")
|
if (${BOARD} STREQUAL "px4fmu-v1")
|
||||||
@@ -490,6 +491,8 @@ function(px4_os_add_flags)
|
|||||||
#message(STATUS "nuttx: set(${${var}} ${${${var}}} ${added_${lower_var}} PARENT_SCOPE)")
|
#message(STATUS "nuttx: set(${${var}} ${${${var}}} ${added_${lower_var}} PARENT_SCOPE)")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
set(DF_TARGET "nuttx" PARENT_SCOPE)
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ function(px4_os_add_flags)
|
|||||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||||
|
|
||||||
set(DF_TARGET "qurt")
|
set(DF_TARGET "qurt" PARENT_SCOPE)
|
||||||
|
|
||||||
# output
|
# output
|
||||||
foreach(var ${inout_vars})
|
foreach(var ${inout_vars})
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ add_executable(firmware_nuttx
|
|||||||
set(nuttx_export_dir ${CMAKE_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
|
set(nuttx_export_dir ${CMAKE_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
|
||||||
|
|
||||||
set(link_libs
|
set(link_libs
|
||||||
romfs apps nuttx m gcc
|
romfs apps nuttx m gcc df_driver_framework
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT ${BOARD} STREQUAL "sim")
|
if(NOT ${BOARD} STREQUAL "sim")
|
||||||
|
|||||||
+1
-1
Submodule src/lib/DriverFramework updated: 737d2cbf2c...a759ad3142
@@ -197,7 +197,7 @@ static bool accelerometerCheck(int mavlink_fd, unsigned instance, bool optional,
|
|||||||
if (dynamic) {
|
if (dynamic) {
|
||||||
/* check measurement result range */
|
/* check measurement result range */
|
||||||
struct accel_report acc;
|
struct accel_report acc;
|
||||||
ret = px4_read(fd, &acc, sizeof(acc));
|
ret = h.read(&acc, sizeof(acc));
|
||||||
|
|
||||||
if (ret == sizeof(acc)) {
|
if (ret == sizeof(acc)) {
|
||||||
/* evaluate values */
|
/* evaluate values */
|
||||||
@@ -219,9 +219,7 @@ static bool accelerometerCheck(int mavlink_fd, unsigned instance, bool optional,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
out:
|
out:
|
||||||
#ifdef __PX4_NUTTX
|
DevMgr::releaseHandle(h);
|
||||||
px4_close(fd);
|
|
||||||
#endif
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user