NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » ps2 keyboard project

November 10, 2010
by bobc
bobc's Avatar

Hi,

I copied the source files from the project website to a directory named keyboard including the font.txt keymap.h and keymapper.py files. I copied the Makefile from bit_arithmetic and changed all the instances of "dip_arithmetic" to "keyboard". When I run make I get "No rule to make target keyboard.hex, needed by keyboard-upload".

Here is the Makefile I'm using.

Thanks, Bob

GCCFLAGS=-g -Os -Wall -mmcu=atmega168 
LINKFLAGS=-Wl,-u,vfprintf -lprintf_flt -Wl,-u,vfscanf -lscanf_flt -lm
AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P /dev/ttyUSB0
LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

all:    keyboard-upload

tempsensor.hex: keyboard.c
    make -C ../libnerdkits
    avr-gcc ${GCCFLAGS} ${LINKFLAGS} -o keyboard.o keyboard.c ${LINKOBJECTS}
    avr-objcopy -j .text -O ihex keyboard.o keyboard.hex

keyboard.ass:   keyboard.hex
    avr-objdump -S -d keyboard.o > keyboard.ass

keyboard-upload:    keyboard.hex
    avrdude ${AVRDUDEFLAGS} -U flash:w:keyboard.hex:a
November 10, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi bobc,

It looks like there is a tempsensor.hex target in there for some reason. That should have been dip_arithmetic.hex, which would have been changed to keyboard.hex in your replace all. Change that to tempsensor.hex to keyboard.hex and it should work.

Humberto

November 10, 2010
by bobc
bobc's Avatar

Thanks, that was it! I don't know how many times I looked at that Makefile and did not see that. Ugh.

November 10, 2010
by bretm
bretm's Avatar

I've encountered this problem, but not since I started doing this in my makefiles:

PROJ=keyboard

all:    ${PROJ}-upload

${PROJ}.hex: ${PROJ}.c

etc.

November 16, 2010
by bobc
bobc's Avatar

bretm, Great idea! Thanks Bob

May 22, 2011
by Rachid
Rachid's Avatar

I copied the source files from the project website to a directory named keyboard including the font.txt keymap.h and keymapper.py files. I created a makefile but all I get is ? and I type a letter I get ?? also can please someone explain the python code ? thank you

May 23, 2011
by Rachid
Rachid's Avatar

Ooops Data and clock were swapped. Ignore last post

June 19, 2011
by cabers
cabers's Avatar

Sorry to hijack the thread but I am having the same sort of error response when trying to make my latest project. I would think the error lies somewhere within the makefile aswell, but cannot find where I went wrong. Sorry to bother you all with something so trivial, but this really is bugging me.Thanks

Makefile (template from the initialload makefile)

GCCFLAGS=-g -Os -Wall -mmcu=atmega168 
LINKFLAGS=-Wl,-u,vfprintf -lprintf_flt -Wl,-u,vfscanf -lscanf_flt -lm
AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P /dev/ttyUSB0
ProjectName = {testmotor}
LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

all:    ${ProjectName}-upload

${ProjectName}.hex:    ${ProjectName}.c
make -C ../libnerdkits
avr-gcc ${GCCFLAGS} ${LINKFLAGS} -o ${ProjectName}.o ${ProjectName}.c ${LINKOBJECTS}
avr-objcopy -j .text -O ihex ${ProjectName}.o ${ProjectName}.hex

${ProjectName}.ass:    ${ProjectName}.hex
avr-objdump -S -d ${ProjectName}.o > ${ProjectName}.ass

${ProjectName}-upload:    ${ProjectName}.hex
avrdude ${AVRDUDEFLAGS} -U flash:w:${ProjectName}.hex:a

comes back with this error code: No rule to make target '{testmotor}.c' needed by '{testmotor}.hex

June 19, 2011
by Noter
Noter's Avatar

Only put the braces where you are substituting the variable value, not where you assign it. Try this:

ProjectName = testmotor

Post a Reply

Please log in to post a reply.

Did you know that an analog comparator can tell when one voltage input crosses another? Learn more...