Hi all,
As the title says, I wish to compile sketches without using the Arduino IDE.
I already read the section on how to do it (Arduino "Build Process") and I think I'm close... the problem I'm running into now is the compiler not finding the libraries.
Here's a test sketch I'm using:
File: test.cpp#include <Arduino.h>
#define uno.build.mcu atmega328p // from boards.txt
#define uno.build.f_cpu 16000000L
#define uno.build.core arduino
#define uno.build.variant standard
void setup(void)
{
Serial.begin(9600);
}
void loop(void)
{
Serial.print("It works!\r\n");
delay(1000);
}
To compile the file, I run "make" and use a generic Makefile (with the proper filename inserted for the CPP file).
This is the error I get:
test.cpp:1:21: fatal error: Arduino.h: No such file or directory
compilation terminated.
make: *** [test.o] Error 1
And I suspect it's because of an error in the Makefile:
# List any extra directories to look for include files here.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS += "/usr/share/arduino-1.0.2/libraries"
EXTRAINCDIRS += "/usr/share/arduino-1.0.2/hardware/arduino/cores/arduino"
Anyone have any ideas? Are there other library directories I need to point to?
Any help will be appreciated. Thanks!
-- Roger