It is easy to find open source to help us on CAN dbc files to c code convertions. But unfortunately, few of tools can be found to convert CANFD dbc files to c code. This is a tools to solve that problem. The tool is to convert CAN and CANFD dbc files to c files which can be used to reduce the coding work on CAN or CANFD signals processing. It is only modifed on the part of c code generation comparing with original project. And all other function(csv convertiion /xml conversion/...) are removed here. You can see more details from the original site: https://github.com/howerj/dbcc
- Compile the program:
chas@my_workstation:~/dbcc$ mkdir build chas@my_workstation:~/dbcc$ cd build chas@my_workstation:~/dbcc$ cmake .. chas@my_workstation:~/dbcc$ make
- Convert dbc file to c code:
then, you will get two c files for signals parsing.
chas@my_workstation:~/dbcc/build$ ./dbcc ../tests/float_signal.dbc
- How to use the generated files.
TBD
You'd better to use CANdb++ to save your dbc file as a new copy and using the copied file to generate c code to avoid issue from not matched dbc writting style.