It seems now that I'm beginning to find the problem as to why I can't program my arduino.
I have GCC 4.1.0 and Binutils 2.17 (configured for AVR) and avr-libc 1.4.5. I'm using avrdude 5.3.1 to program my arduino NG (atmega 168).
I have installed the arduino-core-0007 tarball and am using its Makefile and headers. My Makefile is edited like this:
PORT = /dev/ttyUSB0
TARGET = arduino-test
ARDUINO = /Files/AVR-Cross/arduino-core
SRC = $(TARGET).c $(ARDUINO)/pins_arduino.c $(ARDUINO)/wiring.c $(ARDUINO)/WInterrupts.c
CXXSRC = $(ARDUINO)/HardwareSerial.cpp $(ARDUINO)/WRandom.cpp
MCU = atmega168
#MCU = atmega161
F_CPU = 16000000
FORMAT = ihex
UPLOAD_RATE = 19200
This does not work. It compiles fine and uploads, but nothing happens. (I'm trying to get a LED on pin13 to blink).
But, if I change MCU to atmega161, or atmega8 when compiling, and change back to 168 before uploading, then the LED blinks!
But it blinks way too fast, not at all those 1000ms I wrote in the blink code...
So, this is appearently a bug, and now I'm wondering where? The stuff from arduino-core-0007, gcc, or the bootloader?
Looking forward to your answers!