[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] .macro error "constant value required"
From: |
darkschine |
Subject: |
Re: [avr-gcc-list] .macro error "constant value required" |
Date: |
Sun, 6 Sep 2009 02:37:27 -0700 (PDT) |
darkschine wrote:
>
>
> I think it's complaining that r16 is not a constant, and since the
> assignment failed, it complains that "data" is not a register above 15. I
> understand that the value in r16 isn't a constant, but it's the address of
> r16 I want to send to the macro. Even when I change r16 to 0x10 I get the
> same error. The compiler must pick up that 0x10 is the address of r16
>
> can anyone help me with this please?
>
>
BAH!!! spent all day looking, but wasn't until I actually asked for help
that I found the solution myself!
<code>
.macro testMacro data
ser \data
.endm
.global main
main:
testMacro r16
end: rjmp end
</code>
note the "\" :D
--
View this message in context:
http://www.nabble.com/.macro-error-%22constant-value-required%22-tp25315963p25316031.html
Sent from the AVR - gcc mailing list archive at Nabble.com.