Page 1 of 1

HIDKeyboard USB Makefile error

Posted: Wed Apr 11, 2007 2:57 am
by guest
Hi,

I'm relatively new to gcc and WinAVR. I'm still working out how everything works. I'm trying to get the HID USB Keyboard code to compile. However, whenever I try to make it, I get errors sying that there is no target defined. When I looked the makefile template that comes with WINAVR, it differs from the one that Christopher wrote for the USB. When I try to compile with an editted makefile template, I can compile, but I still get errors.

Can anyone explain how to get Chris's makefile working and how to get everything working in general?

Thank you!

Posted: Wed Apr 11, 2007 3:14 pm
by christian
Are you referring to the HIDKeys example? The makefile in that example DOES have a default target named "all". If it is not found, something is seriously broken in your development environment.

Can you post the exact error messages?

Posted: Wed Apr 11, 2007 7:50 pm
by guest
Yes, the HIDKeys example.

Okay, I got it to recognize the make file. I saw the default target as all, so I'm nto really sure what went wrong. I restarted programmer's notepad and then it worked. It just gives the following error now.

avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega8 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega8 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega8 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega8 -c main.c -o main.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega8 -o main.bin usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.bin main.hex
./checksize main.bin
C:\Documents: C:\Documents: No such file or directory
make.exe: *** [main.hex] Error 127

Posted: Wed Apr 11, 2007 7:54 pm
by christian
That's an error in the checksize script, probably because you don't have awk or another Unix tool installed. You can safely ignore this error or remove the checksize call altogether. It's only a check to see how much memory is used by the code.

Posted: Wed Apr 11, 2007 9:49 pm
by Grendel
Try changing "awk" in the checksize script to "gawk". Worked for me.

Posted: Thu Apr 12, 2007 9:56 pm
by guest
Thank you!

A quick question also about the Makefile. To program using WINAVR, I just need to change the uisp and the serial lines, right? I hit the program make in the WINAVR and it said target not defined.

Posted: Mon Nov 19, 2007 7:50 am
by Daniel Barragan
I just create on c:/ path the file "documents" and works for me :)

danielbcr.blogspot.com