HIDKeyboard USB Makefile error

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
guest

HIDKeyboard USB Makefile error

Post by guest » Wed Apr 11, 2007 2:57 am

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!

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Apr 11, 2007 3:14 pm

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?

guest

Post by guest » Wed Apr 11, 2007 7:50 pm

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

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Apr 11, 2007 7:54 pm

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.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Post by Grendel » Wed Apr 11, 2007 9:49 pm

Try changing "awk" in the checksize script to "gawk". Worked for me.

guest

Post by guest » Thu Apr 12, 2007 9:56 pm

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.

Daniel Barragan

Post by Daniel Barragan » Mon Nov 19, 2007 7:50 am

I just create on c:/ path the file "documents" and works for me :)

danielbcr.blogspot.com

Post Reply