I followed the instructions here: Arduino Playground - Eclipse and tried to set up a new IDE for programming my Ardiuno Uno. I built my own static library and added the includes and wrote a little test program that I made originally in the Ardiuno programming environment. I made sure to follow the directions and not use loop() or setup() and whatnot. But... I get two errors whenever I build my project. This is the first error: cannot find -llibUnoCore
. (note that my static library was named UnoCore, so it generated libUnoCore.a) I'm not quite sure what this error means, but I think it means it can't find libUnoCore.a. Also, I noticed that I think the command should be -l libUnoCore
instead of what it is now, so should I add a space before the name of the file?
Anyways, I'm kinda confused about one aspect of the setup. When I go to Properties/C/C++ Build/Settings/AVR C++ Linker/Libraries, I'm not sure what I should use as a "Libraries Path". The libUnoCore.a file was generated in UnoCore\Debug, so should I set it there or just to UnoCore?
The next error I believe is just because I got the first error. The error says make: *** [Arduino.elf] Error 1
which I assume just means it failed to build the project because of the first error.
I would really like to set up Eclipse so I can get more functionality over the basic Arduino IDE. Any help for my problem is much appreciated.
By the way, here's the code to my basic program:
#include "WProgram.h"
float multiplier = (180.0 / 1023.0);
float getPotPinForLED() {
return (analogRead(2) * multiplier);
}
int main() {
init();
pinMode(11, OUTPUT);
digitalWrite(11, LOW);
for (;;) {
float potpin = getPotPinForLED();
analogWrite(11, potpin);
}
}
Thanks in advance :).
By the by the way- I'm really sorry if this is the wrong location for this thread. Please move it if it's in the wrong location.
P.S- Hm, someone with my same problem here: http://www.instructables.com/answers/How-to-set-up-Eclipse-for-Arduino-Development/ fixed it just by a fresh install of Eclipse. I guess I'll try that tomorrow.