|
From: Leon N M. <leo...@gm...> - 2010-07-02 19:32:42
|
Awesome. That's just what I was looking for. I used the wrong uart_X.asm file
and didn't modify USART_B_VALUE and USART_C_VALUE. Now everything works.
Is there a document that would have told me to do this?
Thanks for your help.
-Leon
>Friday 02 July 2010
>From: Matthias Trute <mt...@we...>
>Subject: Re: [Amforth-devel] Help getting started with a atmeg644PA
> Hi Leon,
>
> > Could you be more specific about what worked for you?
>
> What did I do? I took the amforth-4.0 files and added the Atmel files
> from the studio to them. Than I created the device tree for the
> atmega644pa with the pd2amforth utility and modified the template
> application to use it. Than I used the Atmel assembler to generate the
> hex files. All worked without any problem, even with my ubuntu linux
> wine setup. I did not check whether amforth actually works, I do not
> have the hardware...
>
> I cannot reproduce your problem, that makes it really hard to solve
> it.
>
> > I never doubted that
> > there are microcontollers that work. I get the same message from the
> > relevant device.asm file with the 644 and 644p, so whatever my problem
> > is, it's not limited to the 644pa.
> >
> > devices/atmega644{,p,pa}/device.asm(13): error: Overlap in .cseg:
> > addr=0x1 conflicts with 0x0:0x2
>
> This error message is of the not-so-useful type. I have no idea where it
> comes from. Sorry.
>
> log from the terminal follows (excuse the German phrases, I forgot to
> set LANG properly..)
>
> --------
> mt@ayla:~/2/amforth-4.0/tools$ ./pd2amforth
> ATmega644PA.xml
>
> ... copy the file to core/devices, chdir to appl/template ...
>
> mt@ayla:~/2/amforth-4.0/appl/template$ make
> wine ../../Atmel/avrasm2.exe -I ../../Atmel/Appnotes2 -I ../../core
> -I ../../core/devices/atmega644pa -fI -v0 -e template.eep.hex -l
> template.lst template.asm
> mt@ayla:~/2/amforth-4.0/appl/template$ svn diff
> Index: template.asm
> ===================================================================
> --- template.asm (Revision 899)
> +++ template.asm (Arbeitskopie)
> @@ -17,10 +17,10 @@
> .equ F_CPU = 8000000
>
> ; initial baud rate of terminal
> -.include "drivers/usart.asm"
> +.include "drivers/usart_0.asm"
> .equ BAUD = 9600
> -.equ USART_B_VALUE = (1<<TXEN) | (1<<RXEN) | (1<<RXCIE)
> -.equ USART_C_VALUE = (3<<UCSZ0)
> +.equ USART_B_VALUE = (1<<TXEN0) | (1<<RXEN0) | (1<<RXCIE0)
> +.equ USART_C_VALUE = (3<<UCSZ00)
>
>
> .equ HLDSIZE = $10 ; 16 bit cellsize with binary representation
> Index: makefile
> ===================================================================
> --- makefile (Revision 899)
> +++ makefile (Arbeitskopie)
> @@ -17,7 +17,7 @@
>
> # the MCU should be identical to the device
> # setting in template.asm
> -MCU=atmega16
> +MCU=atmega644pa
>
> # set the fuses according to your MCU
> LFUSE=0xnn
> mt@ayla:~/2/amforth-4.0/appl/template$
> ------------------
>
> Matthias
|