Post a new topicPost a reply Page 2 of 6   [ 53 posts ]
Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: External IDE
PostPosted: Wed Jul 20, 2011 9:28 am 

Joined: Wed Jul 13, 2011 10:03 am
Posts: 24
I did the static library as a AVR Cross Target Static Library including all files from Arduino core libraries (not waspmote libraries). I obtained my ArduinoCore library and add it to my new project.

Adding the <\waspmote-ide\hardware\cores\wasp_v019> to Paths and Symbols, I able to navigate through source by "Ctrl+click" function, but when I build it all, "undefined reference to" errors occurred when compiling with Xbee functions in my code. It is not able to reach waspmote libraries, and they are added in Path and Symbols.

Any idea?


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Thu Jul 21, 2011 10:25 am 

Joined: Wed Jul 13, 2011 10:03 am
Posts: 24
I found the problem. You need to add waspmote core libraries in order to make the static library and include it in your projects. The undefined reference was because you the include path have .h and .cpp files, and the cpp files should be added to the project to compile them or compiled in the static library. So the solution was to compile the library with waspmote core libraries (not only the arduino core libraries).

I will write here all steps I followed to configure Eclipse. I also managed to upload the program to the waspmote with AVRDude.

Thanks yoshi!


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Wed Aug 03, 2011 10:42 am 

Joined: Tue Aug 02, 2011 4:13 pm
Posts: 6
Hi,

I have saw all docs for using Eclipse. I should want know the command line to use avrdude.

Thanks a lot,
Jb


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Fri Aug 05, 2011 11:49 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi jbtatou,

if you pulse shift while uploading the code to the board the command line will appear in the message window.

Regards.


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Mon Aug 08, 2011 10:50 am 

Joined: Tue Aug 02, 2011 4:13 pm
Posts: 6
Hi libelium dev,

Thanks a lot.

jb


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Wed Sep 21, 2011 5:33 pm 

Joined: Wed Sep 21, 2011 5:18 pm
Posts: 3
Did somebody write a manual about how to configure eclipse to develop applications in Waspmote?

I have tried many things, but I am still not able to compile waspmote projects with eclipse?.

Does somebody know what is the mean of the following error?

----------------------------------------------------------------------------
avr-gcc --cref -s -Os -o "Blink_Edu.elf" ./main.o -lcore -lm -Wl,-Map,Blink_Edu.map -L"C:\Users\Eduardo\workspace\Blink_Edu" -mmcu=atmega1281
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr51/crtm1281.o:(.init9+0x0): undefined reference to `main'
make: *** [Blink_Edu.elf] Error 1

**** Build Finished ****
----------------------------------------------------------------------------

I also wanted to comment I have added to my proyect both the "code.a" library of Waspmote and the link to he last version of the Waspmote API, and in spite of that, eclipse does not recognize the any of the functions.

Any ideas?


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Wed Sep 21, 2011 5:53 pm 

Joined: Wed Sep 21, 2011 5:18 pm
Posts: 3
I solved the problem. I thought It was not neccesary to write the "main function". Now the question is, How must the "main function" be written?

As suggest manual: http://robertcarlsen.net/2009/10/31/ard ... clipse-989

------------------
int main(void)
{
init();

setup();

for (;;)
loop();

return 0;
}
------------------

Or, as suggest by this one: http://www.arduino.cc/playground/Code/Eclipse
This one says that "you must never return from main()"

int main(void) {

/* Must call init for arduino to work properly */
init();

/****************************/
/* Add your setup code here */
/****************************/

for (;;) {

/****************************/
/*** write main loop here ***/
/****************************/

} // end for

} // end main


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Mon Sep 26, 2011 10:03 am 

Joined: Thu Aug 12, 2010 5:38 pm
Posts: 51
Here's the main from my own Eclipse setup:

Code:
// main program, first execute init and setup, then loop
int main(void) {
   /* Must call init for Waspmote/Arduino to work properly */
   init();
   /* Setup process - run once */
   setup();

   /* main loop - never exit this */
   for (;;) {
      loop();
   } // end for
} // end main


The init function is provided by the Waspmote Library, setup and loop are provided by you.


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Fri Oct 07, 2011 10:53 am 

Joined: Wed Sep 21, 2011 5:18 pm
Posts: 3
Thanks Michael!.

I take the advantage of this post to tell everybody I have written
an adapted tutorial to program the Waspmote using Eclipse.

Tutorial: http://www.eduardocc.com/EclipseWaspmot ... orial.html

I hope you find it useful!.

Edu.


Top
 Profile  
 
 Post subject: Re: External IDE
PostPosted: Sat Oct 08, 2011 11:44 pm 

Joined: Wed Oct 05, 2011 12:05 am
Posts: 60
Hi all,

I am particularly interested in using JTAG debugger with waspmote modules.

I know that there are 4 JTAG debugger options that are offered by Atmel. These debuggers are supported by Atmel's AVR Studio development environment. Does anybody know if Waspmote IDE or Eclipse (or any other waspmote compatible IDE you know of) can provide a similar JTAG debugging support at all?

Regards...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 2 of 6   [ 53 posts ]
Go to page Previous  1, 2, 3, 4, 5, 6  Next


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use