From: Bernard M. <bme...@gm...> - 2008-04-29 04:25:01
|
Hi All, I have an STK500/STK501 and am trying to load a forth image to the atmega128 that is on the STK501. I have modified the bf.asm file etc for this micro and everything assembles ok on a Linux host. The problem is communication to the parallel port doesn't seem to work, anyone have any suggestions? The error is: ------------------------------------------------------------------- make: *** [bf] Error 1 bmentink@laptop:~/amForth/amforth-2.7/appl/avr-STK500$ make bf avrdude -c stk500 -P /dev/parport0 -p atmega128 -e -U flash:w:bf.hex:i -U eeprom:w:bf.eep.hex:i avrdude: ser_open(): can't set attributes for device "/dev/parport0": Inappropriate ioctl for device make: *** [bf] Error 1 Thanks, Bernard. |
From: Matthias T. <mt...@we...> - 2008-04-29 06:18:03
|
> Hi All, > > I have an STK500/STK501 and am trying to load a forth image to the > atmega128 > that is on the STK501. > I have modified the bf.asm file etc for this micro and everything > assembles > ok on a Linux host. > > The problem is communication to the parallel port doesn't seem to work, > anyone have any suggestions? Looks like a permission problem on the parport device. You may try running avrdude as root (sudo recommended). Otherwise you may need to contact the avrdude folks. Bye Matthias |
From: Bernard M. <bme...@gm...> - 2008-04-29 07:04:16
|
Hi Mathias, Thanks but I found that setting the device flag to "-c stk200" solved the issue and downloading and verification finished fine. I am now trying to get a prompt out of the Forth via the serial port. I have a couple of questions: 1. the line ".equ cpu_frequency = 8000000" in the bf.asm file, is that the crystal frequency of the crystal frequency devided by two? 2. Which serial port of the mega128 device will I expect the forth to use? Thanks, Bernard On Tue, Apr 29, 2008 at 6:18 PM, Matthias Trute <mt...@we...> wrote: > > > Hi All, > > > > I have an STK500/STK501 and am trying to load a forth image to the > > atmega128 > > that is on the STK501. > > I have modified the bf.asm file etc for this micro and everything > > assembles > > ok on a Linux host. > > > > The problem is communication to the parallel port doesn't seem to work, > > anyone have any suggestions? > > Looks like a permission problem on the parport device. You may try > running avrdude as root (sudo recommended). Otherwise you may need > to contact the avrdude folks. > > Bye > Matthias > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Matthias T. <mt...@we...> - 2008-04-29 08:06:10
|
> 1. the line ".equ cpu_frequency = 8000000" in the bf.asm file, is that the > crystal frequency of the crystal frequency devided by two? That is the frequency, the controller runs with in Hz. which clock source is used and the possible clock modification depend on the fuse settings. http://palmavr.sf.net/cgi-bin/fc.cgi may be useful here. Keep in mind, that the usart interface has a 2x setting that doubles the baudrate, but this is unused in the default sources. btw: The template directory is a much better starting point since the relevant files are better documented. > 2. Which serial port of the mega128 device will I expect the forth to use? If you use the default sources, connect with usart0. Bye Matthias |
From: Bernard M. <bme...@gm...> - 2008-04-29 08:33:01
|
Thanks Mathias, I have a 16mhz crystal connected to an external oscillator which feeds the chip via XTAL1. Using the link you mentioned I get LFUSE = 0xC0 HFUSE= 0xD9 nad EFUSE= 0xff, is this correct? I then added these values to the sample makefile and did a "make write-fuse" and then reset the device. I also have frequency=16000000 in the bf.asm file. I still have no activity out the serial port. I am using miniterm and a loopback on the cable works fine at 9600 baud (what I have in bf.asm). Not sure what to debug next. Thanks again, Bernard On Tue, Apr 29, 2008 at 8:06 PM, Matthias Trute <mt...@we...> wrote: > > > 1. the line ".equ cpu_frequency = 8000000" in the bf.asm file, is that > the > > crystal frequency of the crystal frequency devided by two? > > That is the frequency, the controller runs with in Hz. which > clock source is used and the possible clock modification depend > on the fuse settings. http://palmavr.sf.net/cgi-bin/fc.cgi > may be useful here. > > Keep in mind, that the usart interface has a 2x setting that doubles > the baudrate, but this is unused in the default sources. > > btw: The template directory is a much better starting point since the > relevant files are better documented. > > > 2. Which serial port of the mega128 device will I expect the forth to > use? > > If you use the default sources, connect with usart0. > > Bye > Matthias > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Matthias T. <mt...@we...> - 2008-04-29 13:19:11
|
Bernard, debugging hardware remotly is difficult. Did you check google, there was a short discussion around this with some possible reasons that cause a serial line to not work, the most stupid one is probably keeping the programmer connected (that may keep the reset line). > I have a 16mhz crystal connected to an external oscillator which feeds the > chip via XTAL1. Using the link you mentioned I get LFUSE = 0xC0 HFUSE= > 0xD9 > nad EFUSE= 0xff, is this correct? Cannot check, but the calculator works fine, usually. > Not sure what to debug next. just join on #forth-ev this evening Bye Matthias |