From a50120cec31818d876e979e5a9a23b6e64f015bb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 21 Oct 2021 10:51:18 +1100 Subject: [PATCH] CAN: switched to DroneCAN DSDL and libuavcan --- .gitmodules | 6 +++++- Tools/AP_Bootloader/wscript | 4 ++-- modules/DroneCAN/DSDL | 1 + modules/uavcan | 2 +- wscript | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) create mode 160000 modules/DroneCAN/DSDL diff --git a/.gitmodules b/.gitmodules index eca159e86f..bd3e633cae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "modules/uavcan"] path = modules/uavcan - url = git://github.com/ArduPilot/uavcan.git + url = git://github.com/DroneCAN/libuavcan.git [submodule "modules/waf"] path = modules/waf url = git://github.com/ArduPilot/waf.git @@ -28,3 +28,7 @@ [submodule "modules/canard_dsdlc"] path = modules/canard_dsdlc url = https://github.com/ardupilot/canard_dsdlc +[submodule "modules/DroneCAN/DSDL"] + path = modules/DroneCAN/DSDL + url = git://github.com/DroneCAN/DSDL.git + diff --git a/Tools/AP_Bootloader/wscript b/Tools/AP_Bootloader/wscript index a7c1740983..5b6fab91e3 100644 --- a/Tools/AP_Bootloader/wscript +++ b/Tools/AP_Bootloader/wscript @@ -30,8 +30,8 @@ def build(bld): bld( # build libcanard headers - source=bld.path.ant_glob("modules/uavcan/dsdl/**/*.uavcan libraries/AP_UAVCAN/dsdl/**/*.uavcan"), - rule="python3 ${SRCROOT}/modules/libcanard/dsdl_compiler/libcanard_dsdlc --header_only --outdir ${BUILDROOT}/modules/libcanard/dsdlc_generated ${SRCROOT}/modules/uavcan/dsdl/uavcan ${SRCROOT}/libraries/AP_UAVCAN/dsdl/ardupilot ${SRCROOT}/libraries/AP_UAVCAN/dsdl/com", + source=bld.path.ant_glob("modules/DroneCAN/DSDL/**/*.uavcan"), + rule="python3 ${SRCROOT}/modules/libcanard/dsdl_compiler/libcanard_dsdlc --header_only --outdir ${BUILDROOT}/modules/libcanard/dsdlc_generated ${SRCROOT}/modules/DroneCAN/DSDL/uavcan ${SRCROOT}/modules/DroneCAN/DSDL/ardupilot ${SRCROOT}/modules/DroneCAN/DSDL/com", group='dynamic_sources', ) diff --git a/modules/DroneCAN/DSDL b/modules/DroneCAN/DSDL new file mode 160000 index 0000000000..3aec7069e3 --- /dev/null +++ b/modules/DroneCAN/DSDL @@ -0,0 +1 @@ +Subproject commit 3aec7069e389cf571167d2071040b71240fff97e diff --git a/modules/uavcan b/modules/uavcan index 5b157a69aa..0cfba10e5b 160000 --- a/modules/uavcan +++ b/modules/uavcan @@ -1 +1 @@ -Subproject commit 5b157a69aa3e3a579f92e264f6eded86b25583ac +Subproject commit 0cfba10e5b866466ebaeb7134026b50de5282629 diff --git a/wscript b/wscript index 229f841058..c0def09950 100644 --- a/wscript +++ b/wscript @@ -620,7 +620,7 @@ def _build_dynamic_sources(bld): if (bld.get_board().with_can or bld.env.HAL_NUM_CAN_IFACES) and not bld.env.AP_PERIPH: bld( features='uavcangen', - source=bld.srcnode.ant_glob('modules/uavcan/dsdl/* libraries/AP_UAVCAN/dsdl/*', dir=True, src=False), + source=bld.srcnode.ant_glob('modules/DroneCAN/DSDL/*', dir=True, src=False), output_dir='modules/uavcan/libuavcan/include/dsdlc_generated', name='uavcan', export_includes=[