use Mavlink protocol with Codewarrior IDE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

use Mavlink protocol with Codewarrior IDE

3,117 Views
mauricio2346
Contributor II

Hi!  i been trying to use Mavlink headers into my project, based on MCF51JM128 microcontroller.

here's the webpage for this development:

 

http://qgroundcontrol.org/mavlink/start

 

 

following instructions from this page:  http://qgroundcontrol.org/dev/mavlink_onboard_integration_tutorial i tried to include all necesary headers to my project.  as i couldn't add them as a folder to search into, i'd to add each header for this project, by hand.

this is how it looks adding all headers by hand.  any way to add them as they come in the original project, within folders?

11096_11096.pngImagen3.png

bases on examples of Mavlink, i called a function mavlink_msg_heartbeat_pack(), supposed of charging some information to a comm buffer.11097_11097.pngImagen2.png

  trying to call a message routine from a header, i got this error messages:

11095_11095.pngImagen1.png

 

its well known that Mavlink works flawless with PIC and ARDUINO based systems. i would like to install this libraries as they're stateless; they doesn't depends of MCU registers or operations.

 

 

any idea?

 

thank you

Labels (1)
0 Kudos
Reply
4 Replies

2,554 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Mauricio:

What is the status of your problem? Was the suggestion from Matthew helpful?

Regards!

Jorge Gonzalez

0 Kudos
Reply

2,554 Views
matthewkendall
Contributor V
bases on examples of Mavlink, i called a function mavlink_msg_heartbeat_pack()

No you didn't. You wrote what the compiler thinks is a function prototype for mavlink_msg_heartbeat_pack(). Note that what you wrote on line 55 is outside the scope of any function, before you start your definition of main(). It is therefore going to be interpreted as a definition or declaration, (a function definition or function prototype). But it is not a valid definition or declaration because inside the parentheses are actual parameters (literals like 100, 200 and MAV_TYPE_QUADROTOR).

The first error that you got therefore says "illegal function definition", and is correct.

In C you can't have executable code outside of a function. To fix the error, move those three lines of code into the body of a function (e.g. move them somewhere inside main()).

0 Kudos
Reply

2,554 Views
mauricio2346
Contributor II

Hi everyone.

Im having same problems trying to use a GPS Arduino based parser.

this is the project webpage:

http://arduiniana.org/libraries/tinygps/

kind of strange situation, as its supposed those libraries, as mavlink, are written in standard C++ language.   im using Codewarrior 6.3 and Codewarrior 10.6.   same amount of errors. (100 errors average).  while checking why, found nothing.   

any ideas?  anyone can try to run those libraries?    any suggestions?

thank you.

0 Kudos
Reply

2,554 Views
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g. CodeWarrior Development Tools ) to get it visible for active members.

For details please see general advice Where to post a Discussion?

Thank you for using Freescale Community.

0 Kudos
Reply