CAN: switched to DroneCAN DSDL and libuavcan

This commit is contained in:
Andrew Tridgell 2021-10-21 10:51:18 +11:00
parent 2fa38e46a0
commit a50120cec3
5 changed files with 10 additions and 5 deletions

6
.gitmodules vendored
View File

@ -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

View File

@ -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',
)

1
modules/DroneCAN/DSDL Submodule

@ -0,0 +1 @@
Subproject commit 3aec7069e389cf571167d2071040b71240fff97e

@ -1 +1 @@
Subproject commit 5b157a69aa3e3a579f92e264f6eded86b25583ac
Subproject commit 0cfba10e5b866466ebaeb7134026b50de5282629

View File

@ -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=[