Previously, I have programmed an ATMega8535 @ 16Mhz with the HID Bootloader code, which works fabulously. With avr-gcc, I can now program the entire thing in C from Vim with a single press of <F5> using nothing more than just a USB connection. Sweet! What more could I possibly want?
Well...
Just to get a feel for the possibilities, I've downloaded the AVR-Doper package. As the USB pinout matches what I have (Port D pins 2 and 3), I figured it would be easy. First try at compiling the original code worked a treat, no problems at all. After adding
Code: Select all
#define USB_CFG_CLOCK_KHZ 16000
to usbconfig.h, compiling fails:
Code: Select all
$ make
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega8535 -DDEBUG_LEVEL=0 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
usbdrv/usbdrvasm16.S: Assembler messages:
usbdrv/usbdrvasm16.S:226: Error: operand out of range: 64
make: *** [usbdrv/usbdrvasm.o] Error 1
So, what am I missing here? I'm using avr-gcc 4.1.0 on Ubuntu Feisty 7.04.
Any help is appreciated, as I really want to get this USB stuff (especially serial communication and HID devices, think 'Arduino') going!
Marc.