From: Erich W. <ew....@na...> - 2011-06-16 16:55:39
|
Hello, On 06/16/2011 02:49 PM, pao...@fa... wrote: > Hi guys, > I’m trying to compile a system for an ATMEGA16 board. <snip> > atmega16.asm(26): warning: Use of undefined or forward referenced symbol 'TXEN0' in .equ/.set > atmega16.asm(29): warning: Use of undefined or forward referenced symbol 'TXEN0' in .equ/.set > atmega16.asm(34): warning: Use of undefined or forward referenced symbol 'UCSZ00' in .equ/.set > ../../core\drivers/usart_0.asm(1): warning: Use of undefined or forward referenced symbol 'UBRR0L' in .equ/.set > ../../core\drivers/usart_0.asm(2): warning: Use of undefined or forward referenced symbol 'UBRR0H' in .equ/.set > ../../core\drivers/usart_0.asm(3): warning: Use of undefined or forward referenced symbol 'UCSR0C' in .equ/.set > ../../core\drivers/usart_0.asm(4): warning: Use of undefined or forward referenced symbol 'UCSR0B' in .equ/.set > ../../core\drivers/usart_0.asm(5): warning: Use of undefined or forward referenced symbol 'UCSR0A' in .equ/.set > ../../core\drivers/usart_0.asm(11): warning: Use of undefined or forward referenced symbol 'UDRIE0' in .equ/.set > ../../core\drivers/usart_0.asm(11): error: Invalid redefinition of 'UDRIE' > ../../core\drivers/usart_0.asm(12): warning: Use of undefined or forward referenced symbol 'RXC0' in .equ/.set > ../../core\drivers/usart_0.asm(13): warning: Use of undefined or forward referenced symbol 'UDRE0' in .equ/.set This looks familiar ... Make sure that the controller type is referenced corrctly in the makefile: MCU=atmega16 yes in the makefile, not in template.asm. The atmega-16 may need a few more lines in template.asm: 1. after the baud rate add the 5 ".equ ..." lines ; initial baud rate of terminal .equ BAUD = 115200 ; additional .equs for "old fashioned" mcu with usart, not usart0 .equ TXEN0 = TXEN .equ RXEN0 = RXEN .equ RXCIE0 = RXCIE .equ UCSZ00 = UCSZ0 .equ TXCIE0 = TXCIE 2. .include "drivers/usart.asm" -----------------------^^ remove the _0 here. This works for me on atmega-32. Good luck, Erich |