diff --git a/src/drivers/uavcan/CMakeLists.txt b/src/drivers/uavcan/CMakeLists.txt index e410bcb447..10dca7b64b 100644 --- a/src/drivers/uavcan/CMakeLists.txt +++ b/src/drivers/uavcan/CMakeLists.txt @@ -1,6 +1,6 @@ ############################################################################ # -# Copyright (c) 2015-2021 PX4 Development Team. All rights reserved. +# Copyright (c) 2015-2023 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 @@ -88,6 +88,7 @@ add_compile_options( -Wno-deprecated-copy # TODO: fix -Wno-address-of-packed-member ) +set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) # silence libuavcan deprecation warning for now (TODO: fix and remove) add_subdirectory(${LIBUAVCAN_DIR} libuavcan EXCLUDE_FROM_ALL) add_dependencies(uavcan prebuild_targets) @@ -100,7 +101,7 @@ target_include_directories(uavcan_${UAVCAN_DRIVER}_driver PUBLIC # generated DSDL -set(DSDLC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dsdl") +set(DSDLC_DIR "${PX4_SOURCE_DIR}/src/drivers/uavcan/dsdl") set(DSDLC_INPUTS "${LIBUAVCAN_DIR}/dsdl/ardupilot" "${LIBUAVCAN_DIR}/dsdl/com" @@ -132,6 +133,8 @@ px4_add_module( STACK_MAIN 4096 COMPILE_FLAGS -Wno-format-security # logmessage.hpp + #-O0 + #-DDEBUG_BUILD INCLUDES ${DSDLC_OUTPUT} ${LIBUAVCAN_DIR}/libuavcan/include @@ -170,10 +173,8 @@ px4_add_module( sensors/ice_status.cpp sensors/hygrometer.cpp sensors/safety_button.cpp - MODULE_CONFIG module.yaml - DEPENDS px4_uavcan_dsdlc diff --git a/src/drivers/uavcannode/CMakeLists.txt b/src/drivers/uavcannode/CMakeLists.txt index fde0f23356..21366ad064 100644 --- a/src/drivers/uavcannode/CMakeLists.txt +++ b/src/drivers/uavcannode/CMakeLists.txt @@ -1,6 +1,6 @@ ############################################################################ # -# Copyright (c) 2015-2021 PX4 Development Team. All rights reserved. +# Copyright (c) 2015-2023 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 @@ -88,6 +88,7 @@ add_compile_options( -Wno-deprecated-copy # TODO: fix -Wno-address-of-packed-member ) +set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) # silence libuavcan deprecation warning for now (TODO: fix and remove) add_subdirectory(${LIBUAVCAN_DIR} libuavcan EXCLUDE_FROM_ALL) add_dependencies(uavcan prebuild_targets) @@ -129,14 +130,15 @@ add_custom_target(px4_uavcan_dsdlc DEPENDS px4_uavcan_dsdlc_run.stamp) px4_add_module( MODULE drivers__uavcannode MAIN uavcannode + COMPILE_FLAGS + #-O0 + #-DDEBUG_BUILD INCLUDES ${DSDLC_OUTPUT} ${LIBUAVCAN_DIR}/libuavcan/include ${LIBUAVCAN_DIR}/libuavcan/include/dsdlc_generated ${LIBUAVCAN_DIR}/libuavcan_drivers/posix/include ${LIBUAVCAN_DIR_DRIVERS}/${UAVCAN_DRIVER}/driver/include - COMPILE_OPTIONS - #-O0 SRCS allocator.hpp uavcan_driver.hpp diff --git a/src/drivers/uavcannode/dsdl/com/README b/src/drivers/uavcannode/dsdl/com/README deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/drivers/uavcannode/uavcan_driver.hpp b/src/drivers/uavcannode/uavcan_driver.hpp index 3ab9746773..3eae57a63d 100644 --- a/src/drivers/uavcannode/uavcan_driver.hpp +++ b/src/drivers/uavcannode/uavcan_driver.hpp @@ -42,6 +42,8 @@ # include #elif defined(UAVCAN_STM32_NUTTX) # include +#elif defined(UAVCAN_STM32H7_NUTTX) +# include #else # error "Unsupported driver" #endif