[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] SFRs in assembly code
From: |
Heike C. Zimmerer |
Subject: |
Re: [avr-chat] SFRs in assembly code |
Date: |
Wed, 22 Jul 2009 20:12:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) |
"Daniel Otte" <address@hidden> writes:
> Heike C. Zimmerer schrieb:
>> It's UBRR0H (last two chars reversed). As it is written now, the
>> assembler must assume that is an externally defined symbol (thus not a
>> constant).
> Thanks for the advice, but now I'm facing some troubles with
> <utils/setbaud.h>.
> my config.h includes the following:
> [...]
> #include <avr/io.h>
> #define F_CPU 16000000
> #define UART0_BAUD_RATE 38400
> [...]
>
> I get the following errors:
> uart_ni-asm.S: Assembler messages:
> uart_ni-asm.S:27: Error: missing ')'
[..]
> while line 27 is:
> ldi r24, UBRRH_VALUE
Given that UBBR_VALUE is defined to be something like
#define UBRR_VALUE (((F_CPU) + 4UL * (BAUD)) / (8UL * (BAUD)) -1UL)
I'd guess that there's a spurious semicolon somewhere within the
#defines which are used to calculate the final value. This makes the
rest of the assembly line after the semicolon into a comment, thus the
closing brace(s) is/are missed.
Just a guess, of course.
Heike
- [avr-chat] SFRs in assembly code, Daniel Otte, 2009/07/22
- Re: [avr-chat] SFRs in assembly code, Heike C. Zimmerer, 2009/07/22
- Re: [avr-chat] SFRs in assembly code, Daniel Otte, 2009/07/22
- Re: [avr-chat] SFRs in assembly code,
Heike C. Zimmerer <=
- Re: [avr-chat] SFRs in assembly code, Daniel Otte, 2009/07/22
- RE: [avr-chat] SFRs in assembly code, Weddington, Eric, 2009/07/22
- RE: [avr-chat] SFRs in assembly code, Weddington, Eric, 2009/07/22
- Re: [avr-chat] SFRs in assembly code, Daniel Otte, 2009/07/22
- Re: [avr-chat] SFRs in assembly code, Heike C. Zimmerer, 2009/07/23