Implementation of Mavlink protocoll on stm32

518 views
Skip to first unread message

Peter Kloke

unread,
Jul 14, 2017, 8:53:49 AM7/14/17
to MAVLink
Hey,
I am trying to set up a communication between Pixhaw and an STM32F042K6.
I use the c_library_v2 from github.
Including mavlink.h to my Keil project spits out alot of errors in the File mavlink_types.h.

../Inc/c_library_v2\common\../mavlink_types.h(46): error:  #20: identifier "pack" is undefined
  MAVPACKED(
../Inc/c_library_v2\common\../mavlink_types.h(46): error:  #18: expected a ")"
  MAVPACKED(
../Inc/c_library_v2\common\../mavlink_types.h(46): error:  #79: expected a type specifier
  MAVPACKED(
../Inc/c_library_v2\common\../mavlink_types.h(46): error:  #260-D: explicit type is missing ("int" assumed)
  MAVPACKED(
../Inc/c_library_v2\common\../mavlink_types.h(46): error:  #141-D: unnamed prototyped parameters not allowed when body is present
  MAVPACKED(
../Inc/c_library_v2\common\../mavlink_types.h(46): error:  #130: expected a "{"
  MAVPACKED(
../Inc/c_library_v2\common\../mavlink_types.h(46): warning:  #64-D: declaration does not declare anything
  MAVPACKED(
../Inc/c_library_v2\common\../mavlink_types.h(46): warning:  #177-D: variable "type"  was declared but never referenced
  MAVPACKED(

After this the error messages repeat themself for the next MAVPACKED structs.

Did I miss to include anything crucial?
I hope somebody can help me out with this
Peter

8HOKEIAAC

unread,
Jun 1, 2021, 8:28:55 AM6/1/21
to MAVLink
Hi there
I have a question: how do you use the  c_library_v2? It seems that it doesn't include the "mavlink.h" file directly when I import it to my Arduino project. 
What should I do?

Reply all
Reply to author
Forward
Message has been deleted
0 new messages