mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
boards organization
This commit is contained in:
committed by
David Sidrane
parent
c1f851a600
commit
f692ad04d0
@@ -1,4 +1,5 @@
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
|
||||
include(toolchain/Toolchain-qurt)
|
||||
include(fastrpc)
|
||||
include(qurt_lib)
|
||||
|
||||
101
platforms/qurt/cmake/px4_add_board_os.cmake
Normal file
101
platforms/qurt/cmake/px4_add_board_os.cmake
Normal file
@@ -0,0 +1,101 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2018 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
# Defined functions in this file
|
||||
#
|
||||
# utility functions
|
||||
#
|
||||
# * px4_add_board_os
|
||||
#
|
||||
|
||||
include(px4_base)
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
# px4_add_board_os
|
||||
#
|
||||
# This function creates a PX4 board.
|
||||
#
|
||||
# Usage:
|
||||
# px4_add_board_os(
|
||||
# BOARD <string>
|
||||
# OS <string>
|
||||
# [ TOOLCHAIN ] <string>
|
||||
# )
|
||||
#
|
||||
# Input:
|
||||
# BOARD : name of board
|
||||
# OS : posix, nuttx, qurt
|
||||
#
|
||||
#
|
||||
# Example:
|
||||
# px4_add_board_os(
|
||||
# BOARD px4fmu-v2_default
|
||||
# OS nuttx
|
||||
# )
|
||||
#
|
||||
function(px4_add_board_os)
|
||||
|
||||
px4_parse_function_args(
|
||||
NAME px4_add_board_os
|
||||
ONE_VALUE
|
||||
VENDOR
|
||||
MODEL
|
||||
LABEL
|
||||
PLATFORM
|
||||
TOOLCHAIN
|
||||
ARCH
|
||||
ROMFSROOT
|
||||
IO
|
||||
BOOTLOADER
|
||||
UAVCAN_INTERFACES
|
||||
MULTI_VALUE
|
||||
DRIVERS
|
||||
MODULES
|
||||
SYSTEMCMDS
|
||||
EXAMPLES
|
||||
SERIAL_PORTS
|
||||
DF_DRIVERS # DriverFramework drivers
|
||||
OPTIONS
|
||||
CONSTRAINED_FLASH
|
||||
ROMFS
|
||||
TESTING
|
||||
REQUIRED
|
||||
ARGN ${ARGN})
|
||||
|
||||
include(px4_impl_os)
|
||||
px4_os_prebuild_targets(OUT prebuild_targets BOARD ${PX4_BOARD})
|
||||
|
||||
endfunction()
|
||||
@@ -49,8 +49,7 @@
|
||||
# * px4_os_prebuild_targets
|
||||
#
|
||||
|
||||
include(common/px4_base)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/qurt)
|
||||
include(px4_base)
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
@@ -152,7 +151,7 @@ function(px4_os_add_flags)
|
||||
ARGN ${ARGN})
|
||||
|
||||
px4_add_common_flags(
|
||||
BOARD ${BOARD}
|
||||
BOARD ${PX4_BOARD}
|
||||
C_FLAGS ${C_FLAGS}
|
||||
CXX_FLAGS ${CXX_FLAGS}
|
||||
OPTIMIZATION_FLAGS ${OPTIMIZATION_FLAGS}
|
||||
@@ -205,7 +204,6 @@ function(px4_os_add_flags)
|
||||
foreach(var ${inout_vars})
|
||||
string(TOLOWER ${var} lower_var)
|
||||
set(${${var}} ${${${var}}} ${added_${lower_var}} PARENT_SCOPE)
|
||||
#message(STATUS "qurt: set(${${var}} ${${${var}}} ${added_${lower_var}} PARENT_SCOPE)")
|
||||
endforeach()
|
||||
|
||||
endfunction()
|
||||
@@ -223,7 +221,7 @@ endfunction()
|
||||
# )
|
||||
#
|
||||
# Input:
|
||||
# BOARD : board
|
||||
# BOARD : board
|
||||
#
|
||||
# Output:
|
||||
# OUT : the target list
|
||||
@@ -235,9 +233,10 @@ function(px4_os_prebuild_targets)
|
||||
px4_parse_function_args(
|
||||
NAME px4_os_prebuild_targets
|
||||
ONE_VALUE OUT BOARD
|
||||
REQUIRED OUT BOARD
|
||||
REQUIRED OUT
|
||||
ARGN ${ARGN})
|
||||
|
||||
add_library(${OUT} INTERFACE)
|
||||
add_dependencies(${OUT} DEPENDS uorb_headers)
|
||||
add_library(prebuild_targets INTERFACE)
|
||||
add_dependencies(prebuild_targets DEPENDS uorb_headers)
|
||||
|
||||
endfunction()
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
#define BOARD_HAS_NO_RESET
|
||||
#define BOARD_HAS_NO_BOOTLOADER
|
||||
|
||||
#include "../common/board_common.h"
|
||||
#include <drivers/boards/common/board_common.h>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
|
||||
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
|
||||
include(hexagon_sdk)
|
||||
|
||||
include_directories(${HEXAGON_8074_INCLUDES})
|
||||
|
||||
Reference in New Issue
Block a user