initial minimal PX4_ROS2 platform and px4_ros2_default build (#20689)

- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2
 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2
 - currently doesn't do much other than allow you to build px4 msgs interface package
This commit is contained in:
Daniel Agar
2022-12-08 23:03:44 -05:00
committed by GitHub
parent cfb670fbb3
commit 8114aad983
73 changed files with 4037 additions and 247 deletions
+12 -3
View File
@@ -64,10 +64,19 @@ function(px4_os_add_flags)
${PX4_SOURCE_DIR}/platforms/nuttx/NuttX/apps/include
)
# prevent using the toolchain's std c++ library
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-sized-deallocation>)
set(cxx_flags)
list(APPEND cxx_flags
-fno-exceptions
-fno-rtti
-fno-sized-deallocation
-fno-threadsafe-statics
-nostdinc++ # prevent using the toolchain's std c++ library
)
foreach(flag ${cxx_flags})
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${flag}>)
endforeach()
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Wbad-function-cast>)
@@ -53,7 +53,7 @@
#include <arch/board/board.h>
#include "flexcan.h"
#include <lib/systemlib/crc.h>
#include <lib/crc/crc.h>
#define CAN_TX_TIMEOUT_MS (200 /(1000/(1000000/CONFIG_USEC_PER_TICK)))
@@ -55,7 +55,7 @@
#include <arch/board/board.h>
#include <lib/systemlib/crc.h>
#include <lib/crc/crc.h>
#define INAK_TIMEOUT 65535
@@ -54,7 +54,7 @@
#include <arch/board/board.h>
#include <lib/systemlib/crc.h>
#include <lib/crc/crc.h>
#define INAK_TIMEOUT 65535
@@ -49,7 +49,7 @@
#include "uavcan.h"
#include "can.h"
#include <lib/systemlib/crc.h>
#include <lib/crc/crc.h>
#define CAN_REQUEST_TIMEOUT 1000
#define ANY_NODE_ID 0
@@ -58,7 +58,7 @@
#include <drivers/bootloaders/boot_app_shared.h>
#include <drivers/bootloaders/boot_alt_app_shared.h>
#include <drivers/drv_watchdog.h>
#include <lib/systemlib/crc.h>
#include <lib/crc/crc.h>
//#define DEBUG_APPLICATION_INPLACE 1 /* Never leave defined */
#define DEBUG_NO_FW_UPDATE 1 /* With DEBUG_APPLICATION_INPLACE
@@ -34,4 +34,4 @@
px4_add_library(arch_board_hw_info
board_hw_rev_ver.c
)
target_link_libraries(arch_board_hw_info PRIVATE arch_adc systemlib)
target_link_libraries(arch_board_hw_info PRIVATE arch_adc crc)
@@ -48,8 +48,8 @@
#include <fcntl.h>
#include <board_config.h>
#include <systemlib/crc.h>
#include <systemlib/px4_macros.h>
#include <lib/crc/crc.h>
#include <lib/systemlib/px4_macros.h>
#if defined(BOARD_HAS_HW_VERSIONING)