DroneCAN DSDL compiler on Debian ================================= Use dronecan-dsdlc to generate C code. For example, the definitions supplied by python3-dronecan can be located and compiled with: definitions=$(python3 -c 'import pathlib, dronecan; print(pathlib.Path(dronecan.__file__).parent / "dsdl_specs")') dronecan-dsdlc -j2 -O generated "$definitions/uavcan" "$definitions/dronecan" Add other namespace directories as needed. --build TYPE selects one type and its dependencies; repeat the option to select more than one type. Generated headers include canard.h and require DroneCAN libcanard when compiled. libcanard-dev supplies the headers, library and development sources. The optional --run-tests operation also needs a C/C++ toolchain and make (provided by build-essential), plus libcanard-dev. Its generated makefiles use packaged libcanard sources and put objects in the output directory. They support CC, CXX, CPPFLAGS, CFLAGS and LDFLAGS overrides; LIBCANARD_SRC and LIBCANARD_INCLUDE select an alternative DroneCAN libcanard source tree. The upstream README's sibling-checkout and pip-install instructions are not needed for the Debian package. This compiler implements DroneCAN (UAVCAN v0), not the distinct Cyphal/UAVCAN v1 protocol. A complete offline generation example is installed in /usr/share/doc/dronecan-dsdlc/examples/generate.