update UAVCAN-v0 dsdl to DroneCAN

This commit is contained in:
Daniel Agar
2021-11-04 21:36:13 -04:00
parent 67437396f1
commit c73a1b4c68
8 changed files with 22 additions and 75 deletions
+11 -4
View File
@@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2015-2020 PX4 Development Team. All rights reserved.
# Copyright (c) 2015-2021 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
@@ -52,6 +52,9 @@ if(CONFIG_ARCH_CHIP)
elseif(${CONFIG_ARCH_CHIP} MATCHES "stm32")
set(UAVCAN_DRIVER "stm32")
set(UAVCAN_TIMER 5) # The default timer is TIM5
if (DEFINED config_uavcan_timer_override)
set (UAVCAN_TIMER ${config_uavcan_timer_override})
endif()
endif()
endif()
@@ -96,8 +99,9 @@ target_include_directories(uavcan_${UAVCAN_DRIVER}_driver PUBLIC
# generated DSDL
set(DSDLC_DIR "${PX4_SOURCE_DIR}/src/drivers/uavcan/dsdl")
set(DSDLC_INPUTS
"${DSDLC_DIR}/com"
"${DSDLC_DIR}/ardupilot"
"${LIBUAVCAN_DIR}/dsdl/ardupilot"
"${LIBUAVCAN_DIR}/dsdl/com"
"${LIBUAVCAN_DIR}/dsdl/cuav"
"${LIBUAVCAN_DIR}/dsdl/uavcan"
)
set(DSDLC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/include/dsdlc_generated")
@@ -108,7 +112,10 @@ foreach(DSDLC_INPUT ${DSDLC_INPUTS})
list(APPEND DSDLC_INPUT_FILES ${DSDLC_NEW_INPUT_FILES})
endforeach(DSDLC_INPUT)
add_custom_command(OUTPUT px4_uavcan_dsdlc_run.stamp
COMMAND ${PYTHON_EXECUTABLE} ${LIBUAVCAN_DIR}/libuavcan/dsdl_compiler/libuavcan_dsdlc ${DSDLC_INPUTS} -O${DSDLC_OUTPUT}
COMMAND
${PYTHON_EXECUTABLE} ${LIBUAVCAN_DIR}/libuavcan/dsdl_compiler/libuavcan_dsdlc
--outdir ${DSDLC_OUTPUT} ${DSDLC_INPUTS}
#--verbose
COMMAND ${CMAKE_COMMAND} -E touch px4_uavcan_dsdlc_run.stamp
DEPENDS ${DSDLC_INPUT_FILES}
COMMENT "PX4 UAVCAN dsdl compiler"