mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-13 13:51:36 +08:00
PX4 ROS2 msg conformity and explicit topics
- .msg files are PascalCase - topics are still either per msg or explicitly listed in TOPICS - compatible structs are still generated (eg struct msg_s), but ROS2 style px4::msg::Msg is also available
This commit is contained in:
@@ -242,6 +242,8 @@ else()
|
||||
arch_board_reset
|
||||
)
|
||||
|
||||
target_link_libraries(nuttx_boards INTERFACE arch_board_reset)
|
||||
|
||||
target_link_libraries(nuttx_c INTERFACE nuttx_drivers)
|
||||
target_link_libraries(nuttx_drivers INTERFACE nuttx_c)
|
||||
target_link_libraries(nuttx_xx INTERFACE nuttx_c)
|
||||
|
||||
@@ -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_definitions(
|
||||
-D__PX4_NUTTX
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
add_subdirectory(arch/${PX4_CHIP_MANUFACTURER})
|
||||
|
||||
px4_add_library(canbootloader
|
||||
add_library(canbootloader
|
||||
common/nuttx_stubs.c
|
||||
fs/flash.c
|
||||
protocol/uavcan.c
|
||||
@@ -42,7 +42,7 @@ px4_add_library(canbootloader
|
||||
util/random.c
|
||||
util/cxx_init.c
|
||||
)
|
||||
|
||||
add_dependencies(canbootloader prebuild_targets)
|
||||
include_directories(include)
|
||||
target_include_directories(canbootloader INTERFACE include)
|
||||
|
||||
|
||||
@@ -32,8 +32,11 @@
|
||||
############################################################################
|
||||
|
||||
include_directories(../../../include)
|
||||
px4_add_library(arch_canbootloader
|
||||
|
||||
add_library(arch_canbootloader
|
||||
board_identity.c
|
||||
drivers/can/driver.c
|
||||
drivers/flash/driver.c
|
||||
)
|
||||
target_link_libraries(arch_canbootloader PRIVATE crc)
|
||||
add_dependencies(arch_canbootloader prebuild_targets)
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
|
||||
include_directories(../../../include)
|
||||
|
||||
px4_add_library(arch_canbootloader
|
||||
add_library(arch_canbootloader
|
||||
board_identity.c
|
||||
drivers/can/driver.c
|
||||
)
|
||||
|
||||
add_dependencies(arch_canbootloader prebuild_targets)
|
||||
target_link_libraries(arch_canbootloader
|
||||
PRIVATE
|
||||
arch_watchdog_iwdg
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include <lib/systemlib/crc.h>
|
||||
#include <lib/crc/crc.h>
|
||||
|
||||
#define INAK_TIMEOUT 65535
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
|
||||
include_directories(../../../include)
|
||||
|
||||
px4_add_library(arch_canbootloader
|
||||
add_library(arch_canbootloader
|
||||
board_identity.c
|
||||
drivers/can/driver.c
|
||||
)
|
||||
|
||||
add_dependencies(arch_canbootloader prebuild_targets)
|
||||
target_link_libraries(arch_canbootloader
|
||||
PRIVATE
|
||||
arch_watchdog_iwdg
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_hrt
|
||||
add_library(arch_hrt
|
||||
hrt.c
|
||||
)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align) # TODO: fix and enable
|
||||
add_dependencies(arch_hrt prebuild_targets)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align ${MAX_CUSTOM_OPT_LEVEL}) # TODO: fix and enable
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_hrt
|
||||
add_library(arch_hrt
|
||||
hrt.c
|
||||
)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align) # TODO: fix and enable
|
||||
|
||||
add_dependencies(arch_hrt prebuild_targets)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align ${MAX_CUSTOM_OPT_LEVEL}) # TODO: fix and enable
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_hrt
|
||||
add_library(arch_hrt
|
||||
hrt.c
|
||||
)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align) # TODO: fix and enable
|
||||
add_dependencies(arch_hrt prebuild_targets)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align ${MAX_CUSTOM_OPT_LEVEL}) # TODO: fix and enable
|
||||
|
||||
@@ -31,11 +31,8 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_hrt
|
||||
add_library(arch_hrt
|
||||
hrt.c
|
||||
)
|
||||
target_compile_options(arch_hrt
|
||||
PRIVATE
|
||||
${MAX_CUSTOM_OPT_LEVEL}
|
||||
-Wno-cast-align # TODO: fix and enable
|
||||
)
|
||||
add_dependencies(arch_hrt prebuild_targets)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align ${MAX_CUSTOM_OPT_LEVEL}) # TODO: fix and enable
|
||||
|
||||
@@ -31,11 +31,8 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_hrt
|
||||
add_library(arch_hrt
|
||||
hrt.c
|
||||
)
|
||||
target_compile_options(arch_hrt
|
||||
PRIVATE
|
||||
${MAX_CUSTOM_OPT_LEVEL}
|
||||
-Wno-cast-align # TODO: fix and enable
|
||||
)
|
||||
add_dependencies(arch_hrt prebuild_targets)
|
||||
target_compile_options(arch_hrt PRIVATE -Wno-cast-align ${MAX_CUSTOM_OPT_LEVEL}) # TODO: fix and enable
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_watchdog_iwdg
|
||||
add_library(arch_watchdog_iwdg
|
||||
iwdg.c
|
||||
)
|
||||
add_dependencies(arch_watchdog_iwdg prebuild_targets)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_watchdog_iwdg
|
||||
add_library(arch_watchdog_iwdg
|
||||
iwdg.c
|
||||
)
|
||||
add_dependencies(arch_watchdog_iwdg prebuild_targets)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_watchdog_iwdg
|
||||
add_library(arch_watchdog_iwdg
|
||||
iwdg.c
|
||||
)
|
||||
add_dependencies(arch_watchdog_iwdg prebuild_targets)
|
||||
|
||||
Reference in New Issue
Block a user