As supplied (after altering some of the include paths to point in the right places), AVR Studio compiles with the following errors - seems like a linker problem?
Code: Select all
../usbdrv/usbdrv.h:213: warning: 'usbFunctionDescriptor' used but never defined
../usbdrv/usbdrv.h:220: warning: 'usbSetInterrupt' declared 'static' but never defined
avr-gcc -mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT oddebug.o -MF dep/oddebug.o.d -c ../usbdrv/oddebug.c
avr-gcc -mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT usbdrv.o -MF dep/usbdrv.o.d -c ../usbdrv/usbdrv.c
../usbdrv/usbdrv.h:186: warning: 'usbFunctionSetup' used but never defined
../usbdrv/usbdrv.h:213: warning: 'usbFunctionDescriptor' used but never defined
../usbdrv/usbdrv.h:249: warning: 'usbFunctionWrite' used but never defined
../usbdrv/usbdrv.c:608: warning: 'usbInit' defined but not used
../usbdrv/usbdrv.c:566: warning: 'usbPoll' defined but not used
../usbdrv/usbdrv.h:220: warning: 'usbSetInterrupt' declared 'static' but never defined
avr-gcc -mmcu=atmega168 -mmcu=atmega168 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL ...........
avr-gcc -mmcu=atmega168 -Wl,-Map=Mouse.map main.o oddebug.o usbdrv.o usbdrvasm.o -o Mouse.elf
usbdrv.o:(.data+0x0): multiple definition of `usbTxLen'
main.o:(.data+0x0): first defined here
usbdrv.o:(.progmem.data+0x0): multiple definition of `usbDescriptorString0'
main.o:(.progmem.data+0x0): first defined here
usbdrv.o:(.progmem.data+0x4): multiple definition of `usbDescriptorStringVendor'
main.o:(.progmem.data+0x4): first defined here
usbdrv.o:(.progmem.data+0x16): multiple definition of `usbDescriptorStringDevice'
main.o:(.progmem.data+0x16): first defined here
usbdrv.o:(.progmem.data+0x26): multiple definition of `usbDescriptorDevice'
main.o:(.progmem.data+0x26): first defined here
usbdrv.o:(.progmem.data+0x38): multiple definition of `usbDescriptorConfiguration'
main.o:(.progmem.data+0x38): first defined here
make: *** [Mouse.elf] Error 1
Build failed with 1 errors and 8 warnings...
Meanwhile, if I compile it with MinGW/AVRDUDE and the supplied makefile, I get the following complier warnings:
Code: Select all
../usbdrv/usbdrv.h:213: warning: 'usbFunctionDescriptor' used but never defined
../usbdrv/usbdrv.h:220: warning: 'usbSetInterrupt' declared 'static' but never defined
and the resulting .hex file, once flashed into the chip (via AVR Studio - can you not do that?), doesn't connect to my PC (running windows XP). For some reason, in the initForUSBConnectivity() function, the function that simulates a disconnect to force re-enumeration, it causes the device to reset every so often while running through the main loop of the bootloader code,so that little "device not recognized" bubble pops up repeatedly while plugged in unlike where it usually only goes once. Under device manager, the "Unknown Device" claims that it can't find the driver.
Other executables work fine; I've done a couple projects with V-USB before with the ATMega168, so I don't think it's my fuses (famous last words...). I've tried setting it with both the boot reset vector enabled and disabled as well, though, with no change.
So I was wondering if anyone else has had problems/success compiling the BootLoadHID project for the 168, or if anyone has any tips that could help me out?
Thanks!