From: Leon M. <leo...@gm...> - 2010-07-02 03:22:04
|
Hello everyone, I'm not sure if this it the right place to request help, but I don't see where else to do it, so I apologize if I'm asking in the wrong place. As the subject suggests, I'm interested in getting amforth working on a atmega644PA chip. I've tried assembling amforth in Linux with avra, in Linux with wine/avrasm2, and in Windows with AVR Studio -- all without success. Although the first two methods interest me more, perhaps we should start with the third, because there I was following instructions (from amforth-AVR-Studio.pdf -- are there instructions for the other two?) I get 10 errors and 2 warnings: C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(2): warning: Use of undefined or forward referenced symbol 'UBRRL' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(3): warning: Use of undefined or forward referenced symbol 'UBRRH' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(4): warning: Use of undefined or forward referenced symbol 'UCSRC' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(5): warning: Use of undefined or forward referenced symbol 'UCSRB' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(6): warning: Use of undefined or forward referenced symbol 'UCSRA' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(7): warning: Use of undefined or forward referenced symbol 'UDR' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(8): warning: Use of undefined or forward referenced symbol 'RXC' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(9): warning: Use of undefined or forward referenced symbol 'UDRE' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\appl\HandHeldForth\template.asm(22): warning: Use of undefined or forward referenced symbol 'TXEN' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\appl\HandHeldForth\template.asm(23): warning: Use of undefined or forward referenced symbol 'UCSZ0' in .equ/.set C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart-isr-rx.asm(4): error: Use of undefined or forward referenced symbol 'URXCaddr' in .org C:\Users\Leon\Desktop\amforth-4.0\core\devices/atmega644p/device.asm(13): error: Overlap in .cseg: addr=0x1 conflicts with 0x0:0x2 Please let me know if I can provide any information that might help identify what I'm doing wrong. After getting this to assemble, the next problem is getting it on a device. As I said, I'd like to use a atmega644PA, but I only see atmega644 and atmega644P in the devices directory. Can I use one of them, and if so, which one? Thanks. -Leon |
From: Andy K. <an...@ki...> - 2010-07-02 04:13:26
|
Personaly i would go with the 644p (picopower 644) for the 644pa (644 picopower, automotive grade) grades for chips tend to be stuff like commercial, industrial, automotive, military. These normaly refer to how well the chip should survive lifes nastys like temperature ranges, radiation, vibration etc so basicaly can be ignored by the average hobyist or commercial constructor. Go with the cheapest. (Military grade is normaly stupidly expensive). Hope this helps. Cheers andy kirby -- Like a rolling stone ----- Original message ----- > Hello everyone, > > I'm not sure if this it the right place to request help, but I don't > see where else to do it, so I apologize if I'm asking in the wrong > place. > > As the subject suggests, I'm interested in getting amforth working on > a atmega644PA chip. I've tried assembling amforth in Linux with avra, > in Linux with wine/avrasm2, and in Windows with AVR Studio -- all > without success. > > Although the first two methods interest me more, perhaps we should > start with the third, because there I was following instructions (from > amforth-AVR-Studio.pdf -- are there instructions for the other two?) I > get 10 errors and 2 warnings: > > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(2): warning: > Use of undefined or forward referenced symbol 'UBRRL' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(3): warning: > Use of undefined or forward referenced symbol 'UBRRH' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(4): warning: > Use of undefined or forward referenced symbol 'UCSRC' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(5): warning: > Use of undefined or forward referenced symbol 'UCSRB' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(6): warning: > Use of undefined or forward referenced symbol 'UCSRA' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(7): warning: > Use of undefined or forward referenced symbol 'UDR' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(8): warning: > Use of undefined or forward referenced symbol 'RXC' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(9): warning: > Use of undefined or forward referenced symbol 'UDRE' in .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\appl\HandHeldForth\template.asm(22): > warning: Use of undefined or forward referenced symbol 'TXEN' in > .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\appl\HandHeldForth\template.asm(23): > warning: Use of undefined or forward referenced symbol 'UCSZ0' in > .equ/.set > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart-isr-rx.asm(4): > error: Use of undefined or forward referenced symbol 'URXCaddr' in > .org > C:\Users\Leon\Desktop\amforth-4.0\core\devices/atmega644p/device.asm(13): > error: Overlap in .cseg: addr=0x1 conflicts with 0x0:0x2 > > Please let me know if I can provide any information that might help > identify what I'm doing wrong. > > After getting this to assemble, the next problem is getting it on a > device. As I said, I'd like to use a atmega644PA, but I only see > atmega644 and atmega644P in the devices directory. Can I use one of > them, and if so, which one? > > Thanks. > -Leon > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Leon N M. <leo...@gm...> - 2010-07-02 13:46:14
|
Are you sure that 644PA means 644P Automotive? The 644P is not recommended for new designs; they suggest the 644PA instead: http://www.atmel.com/dyn/products/product_card.asp?part_id=3896 Furthermore, the 644PA and 644P Automotive have separate pages: http://atmel.com/dyn/products/product_card.asp?part_id=4604 http://atmel.com/dyn/products/product_card.asp?PN=ATmega644P%20Automotive Thanks. -Leon >Thursday 01 July 2010 >From: Andy Kirby <an...@ki...> >Subject: Re: [Amforth-devel] Help getting started with a atmeg644PA > Personaly i would go with the 644p (picopower 644) for the 644pa (644 > picopower, automotive grade) > > grades for chips tend to be stuff like commercial, industrial, automotive, > military. These normaly refer to how well the chip should survive lifes > nastys like temperature ranges, radiation, vibration etc > > so basicaly can be ignored by the average hobyist or commercial > constructor. Go with the cheapest. (Military grade is normaly stupidly > expensive). > > Hope this helps. > > Cheers > > andy kirby |
From: Matthias T. <mt...@we...> - 2010-07-02 06:08:05
|
Hi Leon, > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(2): warning: > Use of undefined or forward referenced symbol 'UBRRL' in .equ/.set etc. That means that your controller uses a different naming scheme for the usart ports. Looking at the part description files: they are names UBBR0L, UBRR1L etc. You will have to use the drivers/usart_0.asm instead (or whatever your terminal is). > After getting this to assemble, the next problem is getting it on a > device. As I said, I'd like to use a atmega644PA, but I only see > atmega644 and atmega644P in the devices directory. Can I use one of > them, and if so, which one? None of them by default. You have to generate the proper files with the pd2amforth utility from the original Atmel Partdescription file. I've never tested it on windows however, it's a non-trivial perl script. You may have success with the 644 hex files, I do not know whether the controllers are similiar enough.. Matthias |
From: Leon N M. <leo...@gm...> - 2010-07-02 13:48:36
|
Thanks for the information -- I'll give pd2amforth a try (in Linux). -Leon >Friday 02 July 2010 >From: Matthias Trute <mt...@we...> >Subject: Re: [Amforth-devel] Help getting started with a atmeg644PA > Hi Leon, > > > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(2): warning: > > Use of undefined or forward referenced symbol 'UBRRL' in .equ/.set > > etc. That means that your controller uses a different naming scheme > for the usart ports. Looking at the part description files: they are > names UBBR0L, UBRR1L etc. You will have to use the drivers/usart_0.asm > instead (or whatever your terminal is). > > > After getting this to assemble, the next problem is getting it on a > > device. As I said, I'd like to use a atmega644PA, but I only see > > atmega644 and atmega644P in the devices directory. Can I use one of > > them, and if so, which one? > > None of them by default. You have to generate the proper files with > the pd2amforth utility from the original Atmel Partdescription file. > I've never tested it on windows however, it's a non-trivial perl > script. > > You may have success with the 644 hex files, I do not know whether > the controllers are similiar enough.. > > Matthias |
From: Leon N M. <leo...@gm...> - 2010-07-02 14:40:33
|
I've used pd2amforth to generate the files, and I switched to a different usart file. That got rid of one error, but I still have the other one: devices/atmega644pa/device.asm(13): error: Overlap in .cseg: addr=0x1 conflicts with 0x0:0x2 Any other advice? Thanks. -Leon >Friday 02 July 2010 >From: Matthias Trute <mt...@we...> >Subject: Re: [Amforth-devel] Help getting started with a atmeg644PA > Hi Leon, > > > C:\Users\Leon\Desktop\amforth-4.0\core\drivers/usart.asm(2): warning: > > Use of undefined or forward referenced symbol 'UBRRL' in .equ/.set > > etc. That means that your controller uses a different naming scheme > for the usart ports. Looking at the part description files: they are > names UBBR0L, UBRR1L etc. You will have to use the drivers/usart_0.asm > instead (or whatever your terminal is). > > > After getting this to assemble, the next problem is getting it on a > > device. As I said, I'd like to use a atmega644PA, but I only see > > atmega644 and atmega644P in the devices directory. Can I use one of > > them, and if so, which one? > > None of them by default. You have to generate the proper files with > the pd2amforth utility from the original Atmel Partdescription file. > I've never tested it on windows however, it's a non-trivial perl > script. > > You may have success with the 644 hex files, I do not know whether > the controllers are similiar enough.. > > Matthias |
From: Matthias T. <mt...@we...> - 2010-07-02 16:48:21
|
Hi Leon, > I've used pd2amforth to generate the files, and I switched to a different usart > file. That got rid of one error, but I still have the other one: > > devices/atmega644pa/device.asm(13): error: Overlap in .cseg: addr=0x1 conflicts > with 0x0:0x2 I just compiled a file set, no problems. I'd really recoommend you another controller to begin with, even the avrdude does not (yet) this one. Matthias |
From: Leon N. M. <leo...@gm...> - 2010-07-02 17:32:43
|
Hello Matthias, Could you be more specific about what worked for you? 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 Thanks. -Leon On Friday, July 02, 2010 11:48:11 am you wrote: > I just compiled a file set, no problems. I'd really recoommend you > another controller to begin with, even the avrdude does not (yet) > this one. > > Matthias |
From: Matthias T. <mt...@we...> - 2010-07-02 18:17:22
|
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 |
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 |