I am a beginner in software / firmware development, I've only just got away from Arduino and onto STM32F105. I am using Keil Uvision to develop my code.

I have built a simple CAN Bus gateway using 2 CAN transceivers. I have wrote some firmware that passes certain IDs from one channel to the other and vise versa and certain data is changed and transmitted onto the other channel. All works fine.

But I am now working on a more complex project involving at least 30IDs on each channel each having complex data with complex multipliers and bit fields etc.

I have created a CAN Bus database in the industry standard Vector .dbc file for both networks.

But I'm struggling on how to interface the .dbc file with my code, I can't find any libraries or even any info on how to go about this.

I would consider another IDE but my only experience is with Keil so I would like it not to be too much of a learning curve.

My question is, is there any libraries for Keil that let me import a .dbc file or any documentation on how to do so. Or what other IDEs have that capability to work with a .dbc file?


1 Answer 1


The use of CAN dbc is that we can differentiate signals in human redable names. If the message consists of speed the user interface parses the can message and shows the data other than showing it as 0x3C or some hex ID. To send messages you have to convert the dbc to structures with hex id so that you can use that in firmware. I don't see any application for dbc in firmware level, it's only for easy reading and plotting etc in a graphical front end.

One thing you can do is write a python or shell script to convert a dbc file to a CAN_Msgs.c and CAN_Msgs.h which will be easier to incorporate in firmware and can be updated.

Someone pls correct me if am wrong

  • \$\begingroup\$ I see what you're saying and you're right, however I need to update my question. Why I want to use a .dbc is because some of the nodes are closed source so I cannot change the message IDs being sent. If I had a number of .dbc files that I created I could write a program and say convert messages a,b&c within 1.dbc to messages xyz in 2.dbc. The reason I am using .dbc is because I am having to reverse engineer a lot of the messages being sent from certain nodes so a CAN db makes it easy to input values. \$\endgroup\$ Aug 29, 2016 at 19:19
  • \$\begingroup\$ In my knowledge there is no library available to import vector dbc to firmware. There will be options available in LABView . If you are using LABView hardware the the LABView Software can do the trick. \$\endgroup\$ Aug 30, 2016 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.