mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 05:51:36 +08:00
Integrated cmake_hexagon for qurt build
Still a WIP since the IDL file needs to be replace with the muorb IDL file. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
committed by
Lorenz Meier
parent
4b659f1995
commit
f22c574b87
@@ -266,6 +266,10 @@ function(px4_add_module)
|
||||
|
||||
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
|
||||
|
||||
if(${OS} STREQUAL "qurt" )
|
||||
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
if(MAIN)
|
||||
set_target_properties(${MODULE} PROPERTIES
|
||||
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
|
||||
|
||||
@@ -11,17 +11,18 @@ include(qurt/px4_impl_qurt)
|
||||
#include_directories(${HEXAGON_DRIVERS_ROOT}/inc)
|
||||
|
||||
# For Actual flight we need to link against the driver dynamic libraries
|
||||
set(target_libraries
|
||||
-L${HEXAGON_DRIVERS_ROOT}/libs
|
||||
#set(target_libraries
|
||||
# -L${HEXAGON_DRIVERS_ROOT}/libs
|
||||
# The plan is to replace these with our drivers
|
||||
# mpu9x50
|
||||
# uart_esc
|
||||
# csr_gps
|
||||
# rc_receiver
|
||||
)
|
||||
# )
|
||||
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
|
||||
|
||||
set(config_module_list
|
||||
#
|
||||
|
||||
@@ -172,16 +172,13 @@ function(px4_os_add_flags)
|
||||
set(added_definitions
|
||||
-D__PX4_QURT
|
||||
-D__PX4_POSIX
|
||||
-D__DF_QURT
|
||||
-include ${PX4_INCLUDE_DIR}visibility.h
|
||||
)
|
||||
|
||||
# Add the toolchain specific flags
|
||||
set(added_cflags ${QURT_CMAKE_C_FLAGS})
|
||||
set(added_cxx_flags ${QURT_CMAKE_CXX_FLAGS})
|
||||
set(added_cflags -O0)
|
||||
set(added_cxx_flags -O0)
|
||||
|
||||
# FIXME @jgoppert - how to work around issues like this?
|
||||
# Without changing global variables?
|
||||
# Clear -rdynamic flag which fails for hexagon
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
Reference in New Issue
Block a user