CRC error with custom mavlink messages

Hi guys!

I am having trouble with the CRC in mavlink 1.0 for custom messages.
I have generated a custom mavlink message from a xml using mavlink-generator which I got from the mavlink git repository.
I am using mavros to send this message to px4. It works very well if I disable the CRC check on the message in the px4 firmware (in mavlink_helper.h) but the message is dropped due to an incorrect CRC if I dont disable it.
I have thoroughly checked that MAVLINK_CRC_EXTRA is set to 1 in the mavlink header files of mavlink-generator, mavros and px4.
What could be the issue? Why would only the CRC be wrong, while still being to correctly parse the message if I ignore the CRC check?
Thanks for your help!

Just to clarify, I’m using firmware 1.2.0 with mavlink v1

I found the problem, I was generating the mavlink headers independantly for each new custom message. Including all my small xml files into the big common.xml file, then reused with px4 firmware and mavros, the crc errors on custom messages disappeared!