I’ve made some progress, but I’ts been over 10 years since I played with make/grep etc so I’m a little rusty.
Anyway here’s where I’m at, a standard program template looks like this
#define __AVR_ATmega328P__
#include <binary.h>
#include <HardwareSerial.h>
#include <pins_arduino.h>
#include <WConstants.h>
#include <wiring.h>
#include <wiring_private.h>
#include <WProgram.h>
#include <EEPROM/EEPROM.h>
void setup()
{
}
void loop()
{
}
this produces the following errors
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c: In function 'attachInterrupt':
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:91: error: 'EIMSK' undeclared (first use in this function)
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:91: error: (Each undeclared identifier is reported only once
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:91: error: for each function it appears in.)
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:91: error: 'INT0' undeclared (first use in this function)
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:95: error: 'INT1' undeclared (first use in this function)
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c: In function 'detachInterrupt':
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:135: error: 'EIMSK' undeclared (first use in this function)
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:135: error: 'INT0' undeclared (first use in this function)
c:/progra~1/arduino/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:138: error: 'INT1' undeclared (first use in this function)
So I go seraching for the INT0, INT1 and EIMSK definitions (that’s where grep comes into it) and find it in iom328p.h.
I add the include and add a path
C:\Program Files\Arduino\arduino-0021\hardware\tools\avr\avr\include\avr
but no go. So then I add some of my own definitions, the code now looks like this
#define __AVR_ATmega328P__
#define EIMSK _SFR_IO8(0x1D)
#define INT0 0
#define INT1 1
#include <iom328p.h>
#include <binary.h>
#include <HardwareSerial.h>
#include <pins_arduino.h>
#include <WConstants.h>
#include <wiring.h>
#include <wiring_private.h>
#include <WProgram.h>
#include <EEPROM/EEPROM.h>
void setup()
{
}
void loop()
{
}
but the errors are still the same.
Then my computer crashed and it’s taken few hours to get it going again.
As it happens these errors are exactly the same ones I had with AVRprojIDE the other day.
I’ve also had to mod the makefile a bit because it was written for linux.
Anyway I’ll get back to it later tonight, meanwhile any ideas are welcome.
@TSM: I hope we’re not highjacking your thread but I think it’s relevant and you may benefit from it. I would also recommend looking at this thread
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1254027990
Rob