Skip to content
Alexander Entinger edited this page Jan 26, 2021 · 5 revisions

Generate C header files from DSDL via nunavut/nnvg

cd ~
https://github.com/UAVCAN/nunavut && cd nunavut
python3.8 -m pip install .
git clone https://github.com/UAVCAN/public_regulated_data_types && cd public_regulated_data_types
nnvg --target-language c \
     --pp-max-emptylines=1  \
     --pp-trim-trailing-whitespace \
     --target-endianness=little \
     --enable-serialization-asserts \
     --outdir include \
     uavcan

nnvg --target-language c \
     --pp-max-emptylines=1  \
     --pp-trim-trailing-whitespace \
     --target-endianness=any \
     --enable-serialization-asserts \
     --lookup uavcan \
     --outdir reg-header \
     reg

Create a Virtual CAN bus interface

sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
candump -decaxta vcan0