cmake remove need for platform px4_add_board_os

- explicitly set TOOLCHAIN on all NuttX targets
This commit is contained in:
Daniel Agar 2018-11-23 10:01:03 -05:00 committed by David Sidrane
parent f22f331e4a
commit fa0fe4cac6
40 changed files with 80 additions and 373 deletions

View File

@ -5,7 +5,7 @@ px4_add_board(
LABEL ubuntu LABEL ubuntu
PLATFORM posix PLATFORM posix
ARCH cortex-a9 ARCH cortex-a9
TOOLCHAIN Toolchain-arm-linux-gnueabihf TOOLCHAIN arm-linux-gnueabihf
TESTING TESTING
DRIVERS DRIVERS

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR airmind VENDOR airmind
MODEL mindpx-v2 MODEL mindpx-v2
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -3,7 +3,10 @@
include(px4_git) include(px4_git)
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon") px4_add_git_submodule(TARGET git_cmake_hexagon PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon") list(APPEND CMAKE_MODULE_PATH
"${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon"
"${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon/toolchain"
)
# Get $QC_SOC_TARGET from environment if existing. # Get $QC_SOC_TARGET from environment if existing.
if (DEFINED ENV{QC_SOC_TARGET}) if (DEFINED ENV{QC_SOC_TARGET})
@ -32,8 +35,7 @@ px4_add_board(
MODEL eagle MODEL eagle
LABEL default LABEL default
TESTING TESTING
TOOLCHAIN TOOLCHAIN arm-linux-gnueabihf
toolchain/Toolchain-arm-linux-gnueabihf
DRIVERS DRIVERS
#barometer # all available barometer drivers #barometer # all available barometer drivers

View File

@ -3,7 +3,10 @@
include(px4_git) include(px4_git)
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon") px4_add_git_submodule(TARGET git_cmake_hexagon PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon") list(APPEND CMAKE_MODULE_PATH
"${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon"
"${PX4_SOURCE_DIR}/boards/atlflight/cmake_hexagon/toolchain"
)
# Get $QC_SOC_TARGET from environment if existing. # Get $QC_SOC_TARGET from environment if existing.
if (DEFINED ENV{QC_SOC_TARGET}) if (DEFINED ENV{QC_SOC_TARGET})
@ -32,8 +35,7 @@ px4_add_board(
MODEL excelsior MODEL excelsior
LABEL default LABEL default
TESTING TESTING
TOOLCHAIN TOOLCHAIN arm-oemllib32-linux-gnueabi
toolchain/Toolchain-arm-oemllib32-linux-gnueabi
DRIVERS DRIVERS
#barometer # all available barometer drivers #barometer # all available barometer drivers

View File

@ -1,3 +1,4 @@
# Excelsior is the code name of a board currently in development. # Excelsior is the code name of a board currently in development.
# #
# This cmake config builds for QURT which is the operating system running on # This cmake config builds for QURT which is the operating system running on

View File

@ -40,6 +40,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR auav VENDOR auav
MODEL esc35-v1 MODEL esc35-v1
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
DRIVERS DRIVERS

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR auav VENDOR auav
MODEL x21 MODEL x21
LABEL default LABEL default
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -5,7 +5,7 @@ px4_add_board(
LABEL cross LABEL cross
PLATFORM posix PLATFORM posix
ARCH cortex-a8 ARCH cortex-a8
TOOLCHAIN Toolchain-arm-linux-gnueabihf TOOLCHAIN arm-linux-gnueabihf
TESTING TESTING
DRIVERS DRIVERS

View File

@ -4,7 +4,6 @@ px4_add_board(
MODEL blue MODEL blue
LABEL native LABEL native
PLATFORM posix PLATFORM posix
TOOLCHAIN Toolchain-native
TESTING TESTING
DRIVERS DRIVERS

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR bitcraze VENDOR bitcraze
MODEL crazyflie MODEL crazyflie
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -5,7 +5,7 @@ px4_add_board(
LABEL cross LABEL cross
PLATFORM posix PLATFORM posix
ARCH cortex-a53 ARCH cortex-a53
TOOLCHAIN Toolchain-arm-linux-gnueabihf TOOLCHAIN arm-linux-gnueabihf
TESTING TESTING
DRIVERS DRIVERS

View File

@ -4,7 +4,6 @@ px4_add_board(
MODEL navio2 MODEL navio2
LABEL native LABEL native
PLATFORM posix PLATFORM posix
TOOLCHAIN Toolchain-native
TESTING TESTING
DRIVERS DRIVERS

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR gumstix VENDOR gumstix
MODEL aerocore2 MODEL aerocore2
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR intel VENDOR intel
MODEL aerofc-v1 MODEL aerofc-v1
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR intel VENDOR intel
MODEL aerofc-v1 MODEL aerofc-v1
LABEL rtsp LABEL rtsp
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR nxp VENDOR nxp
MODEL hlite-v3 MODEL hlite-v3
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR omnibus VENDOR omnibus
MODEL f4sd MODEL f4sd
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,7 +4,7 @@ px4_add_board(
MODEL bebop MODEL bebop
PLATFORM posix PLATFORM posix
ARCH cortex-a53 ARCH cortex-a53
TOOLCHAIN Toolchain-arm-linux-gnueabihf TOOLCHAIN arm-linux-gnueabihf
DRIVERS DRIVERS
gps gps

View File

@ -38,6 +38,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR px4 VENDOR px4
MODEL cannode-v1 MODEL cannode-v1
TOOLCHAIN arm-none-eabi
ARCH cortex-m3 ARCH cortex-m3
DRIVERS DRIVERS

View File

@ -40,6 +40,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR px4 VENDOR px4
MODEL esc-v1 MODEL esc-v1
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
DRIVERS DRIVERS

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v2 MODEL fmu-v2
LABEL default LABEL default
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v2 MODEL fmu-v2
LABEL lpe LABEL lpe
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v2 MODEL fmu-v2
LABEL test LABEL test
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_test ROMFSROOT px4fmu_test

View File

@ -6,6 +6,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v3 MODEL fmu-v3
LABEL default LABEL default
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -6,6 +6,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v3 MODEL fmu-v3
LABEL rtps LABEL rtps
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -6,6 +6,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v3 MODEL fmu-v3
LABEL stackcheck LABEL stackcheck
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v4 MODEL fmu-v4
LABEL default LABEL default
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v4 MODEL fmu-v4
LABEL rtps LABEL rtps
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v4 MODEL fmu-v4
LABEL stackcheck LABEL stackcheck
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v4pro MODEL fmu-v4pro
LABEL default LABEL default
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -4,6 +4,7 @@ px4_add_board(
VENDOR px4 VENDOR px4
MODEL fmu-v4pro MODEL fmu-v4pro
LABEL default LABEL default
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR px4 VENDOR px4
MODEL io-v2 MODEL io-v2
TOOLCHAIN arm-none-eabi
ARCH cortex-m3 ARCH cortex-m3
DRIVERS DRIVERS
stm32 stm32

View File

@ -4,7 +4,6 @@ px4_add_board(
MODEL raspberrypi MODEL raspberrypi
LABEL native LABEL native
PLATFORM posix PLATFORM posix
TOOLCHAIN Toolchain-native
TESTING TESTING
DRIVERS DRIVERS

View File

@ -3,6 +3,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR stm VENDOR stm
MODEL 32f4discovery MODEL 32f4discovery
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
ROMFS ROMFS
ROMFSROOT px4fmu_common ROMFSROOT px4fmu_common

View File

@ -31,6 +31,7 @@ px4_add_board(
PLATFORM nuttx PLATFORM nuttx
VENDOR thiemar VENDOR thiemar
MODEL s2740vc-v1 MODEL s2740vc-v1
TOOLCHAIN arm-none-eabi
ARCH cortex-m4 ARCH cortex-m4
DRIVERS DRIVERS

View File

@ -1,6 +1,6 @@
############################################################################ ############################################################################
# #
# Copyright (c) 2017 PX4 Development Team. All rights reserved. # Copyright (c) 2018 PX4 Development Team. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
@ -31,15 +31,6 @@
# #
############################################################################ ############################################################################
#=============================================================================
#
# Defined functions in this file
#
# utility functions
#
# * px4_add_board
#
include(px4_base) include(px4_base)
#============================================================================= #=============================================================================
@ -128,7 +119,7 @@ function(px4_add_board)
endif() endif()
if(TOOLCHAIN) if(TOOLCHAIN)
set(CMAKE_TOOLCHAIN_FILE ${TOOLCHAIN} CACHE INTERNAL "toolchain file" FORCE) set(CMAKE_TOOLCHAIN_FILE Toolchain-${TOOLCHAIN} CACHE INTERNAL "toolchain file" FORCE)
endif() endif()
if(BOOTLOADER) if(BOOTLOADER)
@ -139,10 +130,40 @@ function(px4_add_board)
set(board_serial_ports ${SERIAL_PORTS} PARENT_SCOPE) set(board_serial_ports ${SERIAL_PORTS} PARENT_SCOPE)
endif() endif()
include(px4_add_board_os) # ROMFS
px4_add_board_os(${ARGV}) if(ROMFS)
if (PX4_PLATFORM MATCHES "NuttX" AND NOT DEFINED ROMFSROOT)
set(config_romfs_root px4fmu_common)
else()
set(config_romfs_root ${ROMFSROOT})
endif()
set(config_romfs_root ${config_romfs_root} CACHE INTERNAL "ROMFS root" FORCE)
endif()
# IO board (placed in ROMFS)
if(IO)
set(config_io_board ${IO} CACHE INTERNAL "IO" FORCE)
endif()
if(UAVCAN_INTERFACES)
set(config_uavcan_num_ifaces ${UAVCAN_INTERFACES} CACHE INTERNAL "UAVCAN interfaces" FORCE)
endif()
# OPTIONS
if(CONSTRAINED_FLASH)
set(px4_constrained_flash_build "1" CACHE INTERNAL "constrained flash build" FORCE)
endif()
if(TESTING)
set(PX4_TESTING "1" CACHE INTERNAL "testing enabled" FORCE)
endif()
include(px4_impl_os)
px4_os_prebuild_targets(OUT prebuild_targets BOARD ${PX4_BOARD})
###########################################################################
# Modules (includes drivers, examples, modules, systemcmds) # Modules (includes drivers, examples, modules, systemcmds)
set(config_module_list) set(config_module_list)
@ -187,14 +208,4 @@ function(px4_add_board)
set(config_module_list ${config_module_list} PARENT_SCOPE) set(config_module_list ${config_module_list} PARENT_SCOPE)
# OPTIONS
if(CONSTRAINED_FLASH)
set(px4_constrained_flash_build "1" CACHE INTERNAL "constrained flash build" FORCE)
endif()
if(TESTING)
set(PX4_TESTING "1" CACHE INTERNAL "testing enabled" FORCE)
endif()
endfunction() endfunction()

View File

@ -1,130 +0,0 @@
############################################################################
#
# 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 px4_fmu-v2_default
# OS nuttx
# )
#
function(px4_add_board_os)
px4_parse_function_args(
NAME px4_add_board_os
ONE_VALUE
VENDOR
MODEL
LABEL
BOARD_OVERRIDE
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
ARGN ${ARGN})
if(NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE Toolchain-arm-none-eabi CACHE INTERNAL "toolchain file" FORCE)
endif()
if(LABEL MATCHES "stackcheck")
set(NUTTX_CONFIG "stackcheck" CACHE INTERNAL "NuttX config" FORCE)
else()
set(NUTTX_CONFIG "nsh" CACHE INTERNAL "NuttX config" FORCE)
endif()
# ROMFS
if(ROMFS)
if (NOT DEFINED ROMFSROOT)
set(config_romfs_root px4fmu_common)
else()
set(config_romfs_root ${ROMFSROOT})
endif()
set(config_romfs_root ${config_romfs_root} CACHE INTERNAL "ROMFS root" FORCE)
endif()
# IO board placed in ROMFS
if(IO)
set(config_io_board ${IO} CACHE INTERNAL "IO" FORCE)
endif()
if(UAVCAN_INTERFACES)
set(config_uavcan_num_ifaces ${UAVCAN_INTERFACES} CACHE INTERNAL "UAVCAN interfaces" FORCE)
endif()
include(px4_impl_os)
px4_os_prebuild_targets(OUT prebuild_targets BOARD ${PX4_BOARD})
endfunction()

View File

@ -168,6 +168,12 @@ function(px4_os_prebuild_targets)
REQUIRED OUT REQUIRED OUT
ARGN ${ARGN}) ARGN ${ARGN})
if(PX4_BOARD_LABEL MATCHES "stackcheck")
set(NUTTX_CONFIG "stackcheck" CACHE INTERNAL "NuttX config" FORCE)
else()
set(NUTTX_CONFIG "nsh" CACHE INTERNAL "NuttX config" FORCE)
endif()
add_library(prebuild_targets INTERFACE) add_library(prebuild_targets INTERFACE)
target_link_libraries(prebuild_targets INTERFACE nuttx_cxx nuttx_c nuttx_fs nuttx_mm nuttx_sched m gcc) target_link_libraries(prebuild_targets INTERFACE nuttx_cxx nuttx_c nuttx_fs nuttx_mm nuttx_sched m gcc)
add_dependencies(prebuild_targets DEPENDS nuttx_context uorb_headers) add_dependencies(prebuild_targets DEPENDS nuttx_context uorb_headers)

View File

@ -1,106 +0,0 @@
############################################################################
#
# 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 px4_fmu-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})
if(NOT CMAKE_TOOLCHAIN_FILE)
# default to native toolchain
set(CMAKE_TOOLCHAIN_FILE Toolchain-native CACHE INTERNAL "toolchain file" FORCE)
endif()
include(px4_impl_os)
px4_os_prebuild_targets(OUT prebuild_targets BOARD ${PX4_BOARD})
endfunction()

View File

@ -1,101 +0,0 @@
############################################################################
#
# 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 px4_fmu-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()