 |
|
 |
first i want to thank you for this great tutorial
it really helps getting things started.
using eclipse with other platform in the past i know it can support:
simulation, step-by-step debugging and real-time hardware emulation.
Do you know of a way to use this features with arduino in eclipse?
|
|
|
|
 |
|
 |
Hi,
I am sorry I am not aware of any Eclipse plugin with support for the WinAVR Simulator (Simulavr)[^]. You will probably be able to use Eclipse's remote debugging abilities to debug your programs using the simulator (I know this is possible but I haven't tried it myself). Google is your friend for this.
Regards,
Sandeep Datta.
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
When I am trying to talk to a LCD display by using the #include "LiquidCrystal.h" and the LiquidCrystal lcd(7, 5, 4, 3, 2, 1); command, it wont event start to do anything but stops with the following error:
undefined reference to `LiquidCrystal::LiquidCrystal...
I copied the LiquidCrystal.h and LiquidCrystal.cpp files to the Arduino folder so they should get included. What am I doing wrong? Any help would be more than appreciated.
Best regards, Jo
|
|
|
|
 |
|
 |
I know it's kind of late (I somehow missed the email notification for your post) ... r0oland you must include those files in the eclipse project in the same way the other files were added. Simply copying them to the same folder on disk will not work. Hope I have understood your problem correctly.
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
Great article!
I am getting an error message after
23. C/C++ build-Settings-Avr C++ linker-Libraries
"cannot find -lArduino"
What am I doing wrong?
Thanks!
Michael
|
|
|
|
 |
|
 |
Thanks.
This could be happening for various reasons...
- You have not created the Arduino project as mentioned in the article yet
- You have a typo in the name of the Arduino project
- You are trying to add apply this step in the creation of the Arduino project instead of the blinkenLights project.
...possibly few more. Just get back to us with the exact steps of what you have done so far.
Regards,
Sandeep Datta.
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
modified on Sunday, December 19, 2010 2:18 AM
|
|
|
|
 |
|
 |
I get the exact same error. I've triple checked the naming and the Arduino project is there and builds. Any other ideas?
|
|
|
|
 |
|
 |
Can you check if you have a file called "libArduino.a" in your build directory (usually a directory called Debug/Release in the Arduino folder)? If yes then can you verify that you have set the right path to the library i.e. the BlinkenLights project is looking at Arduino/Debug (or Arduino/Release) and not just Arduino for the library file?
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
K I'm not sure what I did, but I got rid of the previous errors, but now I can't get rid of the errors found in step 18. I'm going to work on this a bit more, but if you have any ideas I'd appreciate the input. Thanks for your help so far!
one of the errors I get is
"WProgram.h: No such file or directory main.cpp /blinky line 1"
modified on Wednesday, January 5, 2011 12:25 AM
|
|
|
|
 |
|
 |
Hi, please check that the "compiler directories" have been set correctly the header files can be found in the "Arduino" folder. So just check if you have got the right path.
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
OK, I got it to build. I had to add both Arduino and Arduino/Debug to the directory lists in the blink project.
Maybe I only needed one or the other, but with both in there it builds.
Thanks again!
edit: I did some tracing and the C/C++->settings Directories needed to have the root arduino set, and the linker->libraries needed to have Arduino/Debug set. Once I did this it built. This appears to be be opposite of what you have...
modified on Wednesday, January 5, 2011 12:40 AM
|
|
|
|
 |
|
 |
Yeah, I was probably a bit drowsy while writing this tutorial...mixed up the paths...sorry about that...also I have (re)discovered ARM lately (it has much more to offer at the same price point) and I don't have the AVR environment on my machine anymore so fixing the screenshots won't be easy for me. But thanks for your interest anyways. I think you should also take a look at MHVLib (mentioned somewhere in the comments below).
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
modified on Sunday, January 16, 2011 9:06 AM
|
|
|
|
 |
|
 |
Great tutorial!
[Edit] Aha! wrong click on BlinkenLights -> Proerties -> AVR -> Target Hardware -> put in your arduino settings; the linker was detecting that libArduino.a was compiled for the default microcontroller, and I want to compile it for an ATmega2560
The linker code for optimizing (had trouble reading it) is "-Wl -gc-sections"
Error descriptions (these are fixed, above)
==========================================
Unfortunately, I also get three errors, as you've described (there are no warnings):
Description Resource Path Location Type
cannot find -lArduino BlinkenLights line 0 C/C++ Problem
make: *** [BlinkenLights.elf] Error 1 BlinkenLights line 0 C/C++ Problem
skipping incompatible /home/XXXXX/Arduino/Debug/libArduino.a when searching for -lArduino BlinkenLights line 0 C/C++ Problem
I have fixed the compiler locations and verified that libArduino.a is in the /Debug folder. I have built the Arduino project (right click -> Build Configurations -> Build -> Select -> Debug; and then right click -> Build Project) first, and then BlinkenLights. I tried adding the /Arduino and /Arduino/Debug folders to all compiler and linker directory lists, just to see. I'm running Fedora 13, not windows; perhaps this is the difference?
Sandeep I'd be happy to send you a few screenshots to fix the /Arduino vs /Arduino/Debug directory screenshots?
modified on Sunday, January 16, 2011 5:28 AM
|
|
|
|
 |
|
 |
C Blair wrote: the linker was detecting that libArduino.a was compiled for the default microcontroller, and I want to compile it for an ATmega2560
C Blair please recompile the Arduino project for your processor (take a look at step 13) and try again. Also please make sure the BlinkenLights project is targeting the right processor (it should be the same as the Arduino project).
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
modified on Sunday, January 16, 2011 6:35 AM
|
|
|
|
 |
|
 |
Thanks! That was indeed the fix. Good luck to everyone using this tutorial!
|
|
|
|
 |
|
 |
Sandeep
Great article. You might want to mention that with some Arduinos like the Duemilanove, there is no test LED. You have to plug one into Pin 13.
Dennis
|
|
|
|
 |
|
 |
Yup, good point again.
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
Something I've been looking for a long time. Among other things this will make it much easier to code in C++. Also solves one of the major problems with the Arduino IDE, the awfule error messages.
modified on Monday, November 15, 2010 8:17 PM
|
|
|
|
 |
|
 |
Thanks! And yes in my opinion Eclipse has a much better experience to offer.
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
Hi, great article. Have a 5.
Only one queston. I have an Arduino UNO and the upload process fail. Here is my Console output. Any idea about this error? The COM port is COM17, but I don't know if the rest of the configuration it's ok.
Launching d:\proyectos\arduino\WinAVR-20100110\bin\avrdude -pm328p -carduino "-P\\.\COM17" -b57600 -Uflash:w:BlinkenLights.hex:a
Output:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude done. Thank you.
avrdude finished
Thanks
drJoju
|
|
|
|
 |
|
 |
Edit2: First try changing the baud to 115200 (from http://arduino.cc/en/Guide/Environment)
Hi,
I suspect you are facing a synchronization issue with the Arduino boot-loader.
Before uploading the firmware to Arduino AVRDUDE pulls the DTR pin (or RTS or CTS I forget which) on the serial port to auto-reset the board (this pin is wired to the RESET mechanism). The boot loader listens to the serial port for a short while for commands from AVRDUDE before continuing with the boot and transferring control to the Application code. This small window of opportunity when missed by AVRDUDE usually results in the above problem.
Sol: I am afraid the solution to this problem involves a fair amount of trial and error. You need to hit reset on the board manually just before AVRDUDE is invoked. You should be able to get the timing right after a few trials.
Edit: I remember that the LED on my board blinks thrice before resuming boot you could try and synchronize the manual reset with this signal.
HTH
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
Thank you!! I will try it.
By the way I think there are 2 bugs in steps 20, 21, 22 and 23.
I think the Compiler directories for C and C++ must be Arduino and not Arduino->Debug because the .h files are in the root directory so images 20 and 21 are incorrect.
In the linker library the correct directory must be Arduino->Debug and not root directory so image in 23 is incorrect.
What do you think?
Regards
drJoju
|
|
|
|
 |
|
 |
drjoju wrote: I think the Compiler directories for C and C++ must be Arduino and not Arduino->Debug because the .h files are in the root directory so images 20 and 21 are incorrect.
In the linker library the correct directory must be Arduino->Debug and not root directory so image in 23 is incorrect.
Yup good catch, somehow I mixed them up in the article, will fix as soon as possible!
Also thanks for the feedback and rating, much appreciated!
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |
|
 |
Hi,
the problem wasn't the auto reset. As I see in the makefile of the optiboo the baudrate is 115200, so the final command is.
Launching d:\proyectos\arduino\WinAVR-20100110\bin\avrdude -pm328p -carduino "-P\\.\COM17" -b115200 -Uflash:w:BlinkenLights.hex:a
This works fine.
Thanks
drJoju
|
|
|
|
 |
|
 |
Glad to hear it!
The best way to accelerate a Macintosh is at 9.8m/sec-sec - Marcus Dolengo
|
|
|
|
 |