Page 1 of 1

register x4 not recognized

Posted: Sun Jun 03, 2012 7:39 pm
by shehanshashika
Hi,

I'm a beginner. I'm using an atmega8L with 12MHz. when I compile the code (WINAVR) , it does not recognize the register x4 in usbdrvasm12.S
The error messages I get are,

Code: Select all

Assembling: usbdrvasm.S
avr-gcc -c -mmcu=atmega8 -I. -x assembler-with-cpp -Wa,-adhlns=usbdrvasm.lst,-gstabs  usbdrvasm.S -o usbdrvasm.o
usbdrvasm12.inc: Assembler messages:
usbdrvasm12.inc:277: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:316: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:319: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:325: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:331: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:341: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:348: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:354: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:360: Error: register name or number from 0 to 31 required
usbdrvasm12.inc:387: Error: register name or number from 0 to 31 required
make.exe: *** [usbdrvasm.o] Error 1


The first error points to the code,

Code: Select all

subi    x4, 1               


I would be grateful if anyone can help me to solve this out.

Thanx..

Re: register x4 not recognized

Posted: Sun Jun 03, 2012 7:58 pm
by shehanshashika
Sorry!!
Correction: the file is an include file to the ASM file usbdrvasm.S selected by using 12MHz xtal; It should be usbdrvasm12.inc NOT usbdrvasm12.S :roll:

Re: register x4 not recognized

Posted: Mon Jun 04, 2012 4:48 am
by shehanshashika
Problem Solved..