From: Torsten S. <tsa...@gm...> - 2011-12-05 18:49:10
|
Hi, I'm trying to run amforth on an Arduino Duemilanove. Compiling with Avra (from git) and uploading worked without a problem but I can't get a prompt in the serial terminal. I also set the fuses according to the Readme. I have the impression, that the chip does not start. I would expect some flicker on the TX diode when amforth sends the "I'm alive" message. Could someone please send me Duemilanove hex-files that are known to work? Cheers, Torsten |
From: Erich W. <ew....@na...> - 2011-12-05 19:40:41
|
Hello Torsten, On 12/05/2011 07:48 PM, Torsten Sadowski wrote: > Hi, > > I'm trying to run amforth on an Arduino Duemilanove. > Compiling with Avra (from git) and uploading worked > without a problem but I can't get a prompt in the serial > terminal. I also set the fuses according to the Readme. > I have the impression, that the chip does not start. > I would expect some flicker on the TX diode when amforth > sends the "I'm alive" message. Just to double check, you did load two files, not one? 1. duemilanove.eep.hex 2. duemilanove.hex The .eep.hex is loaded into the eeprom area, whithout that, nothing will move. > > Could someone please send me Duemilanove hex-files that are known to work? please find attached 2 files which I have used. amforth Version 4.6 The files might be striped on the mailing list, so I add your email explicitly. Have fun, Erich -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: duemilanove.eep.hex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: duemilanove.hex |
From: Matthias T. <mt...@we...> - 2011-12-05 19:50:59
|
Hi, One more remark: The Duemilanove uses two different controllers: Atmega168 (old) and Atmega328 (more recent), you may have picked the wrong one. Matthias |
From: Torsten S. <tsa...@gm...> - 2011-12-10 15:19:09
|
Thanks for all the help. It seems that avra does not work correctly with the macro definitions. Below is the beginning of a diff of the disassemblies. Flash.dis is from avra and flash2.dis from avrasm2. The cold boot jump is obviously wrong. --- flash.dis 2011-12-05 21:21:15.000000000 +0100 +++ flash2.dis 2011-12-09 20:25:49.000000000 +0100 @@ -29,14 +29,14 @@ 6C: ori R22, 0x17 6E: cpi R19, 0x23 70: subi R19, 0x08 - 0: rjmp .+3438 ; 0xD70 + 0: jmp 0x6B8 72: st -Y, R0 74: in R0, 0x3F 76: st -Y, R0 78: pop R0 7A: pop R0 7C: dec R0 - 7E: sts 0x060, R0 + 7E: sts 0x100, R0 82: ld R0, Y+ 84: out $3F, R0 86: ld R0, Y+ Cheers, Torsten Am 05.12.2011 um 20:27 schrieb Erich Waelde: > Hello Torsten, > > On 12/05/2011 07:48 PM, Torsten Sadowski wrote: >> Hi, >> >> I'm trying to run amforth on an Arduino Duemilanove. >> Compiling with Avra (from git) and uploading worked >> without a problem but I can't get a prompt in the serial >> terminal. I also set the fuses according to the Readme. >> I have the impression, that the chip does not start. >> I would expect some flicker on the TX diode when amforth >> sends the "I'm alive" message. > > Just to double check, you did load two files, not one? > 1. duemilanove.eep.hex > 2. duemilanove.hex > > The .eep.hex is loaded into the eeprom area, whithout that, > nothing will move. > >> >> Could someone please send me Duemilanove hex-files that are known to work? > > please find attached 2 files which I have used. > amforth Version 4.6 > > The files might be striped on the mailing list, so I add > your email explicitly. > > Have fun, > Erich > <duemilanove.eep.hex><duemilanove.hex> |
From: Marcin C. <sa...@sa...> - 2012-01-10 00:03:26
|
>> Torsten Sadowski <tsa...@gm...> wrote: > Thanks for all the help. > > It seems that avra does not work correctly with the macro definitions. Below is the beginning of a diff of the disassemblies. Flash.dis is from avra and flash2.dis from avrasm2. The cold boot jump is obviously wrong. Torsten, can you help me debugging the problem? Which version of avra are you using? Normally avra gives an error message when relative jump is out of range. Can you check if you get a message? //Marcin |
From: Torsten S. <tsa...@gm...> - 2012-01-10 22:01:26
|
Hello Marcin, This is what I get from avra: duemilanove.hex: [exec] AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010) [exec] Copyright (C) 1998-2010. Check out README file for more info [exec] [exec] AVRA is an open source assembler for Atmel AVR microcontroller family [exec] It can be used as a replacement of 'AVRASM32.EXE' the original assembler [exec] shipped with AVR Studio. We do not guarantee full compatibility for avra. [exec] [exec] AVRA comes with NO WARRANTY, to the extent permitted by law. [exec] You may redistribute copies of avra under the terms [exec] of the GNU General Public License. [exec] For more information about these matters, see the files named COPYING. [exec] [exec] Pass 1... [exec] Pass 2... [exec] done [exec] [exec] [exec] Assembly complete with no errors. [exec] Segment usage: [exec] Code : 4927 words (9854 bytes) [exec] Data : 219 bytes [exec] EEPROM : 80 bytes I built avra from git sources fetched 3 Dez 17:13. The first difference in the code is from this macro (.lst files): avra: .set pc_ = pc .org $0000 C:000000 + jmp_ PFA_COLD .ifdef PFA_COLD .if (PFA_COLD-pc > 2040) || (pc-PFA_COLD>2040) C:000000 c6b7 rjmp PFA_COLD .endif avrasm2: .set pc_ = pc .org $0000 000000 940c 06b8 jmp_ PFA_COLD .org pc_ the second: avra: PFA_INTTRAP: C:00007b 9380 0060 sts intcur, tosl C:00007d + loadtos C:00007d 9189 ld tosl, Y+ C:00007e 9199 ld tosh, Y+ C:00007f 9468 set ; set the interrupt flag for the inner interpreter C:000080 + jmp_ DO_NEXT avrasm2: PFA_INTTRAP: 00007b 9380 0100 sts intcur, tosl 00007d 9189 00007e 9199 loadtos 00007f 9468 set ; set the interrupt flag for the inner interpreter 000080 940c 380e jmp_ DO_NEXT The first is a different interpretation of the macro but I have no idea how intcur: .byte 1 is assembled differently. Cheers, Torsten |
From: Marcin C. <sa...@sa...> - 2012-01-15 14:28:20
|
>> Torsten Sadowski <tsa...@gm...> wrote: > Hello Marcin, > > This is what I get from avra: > > duemilanove.hex: > [exec] AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010) > [exec] Copyright (C) 1998-2010. Check out README file for more info > [exec] > [exec] AVRA is an open source assembler for Atmel AVR microcontroller family > [exec] It can be used as a replacement of 'AVRASM32.EXE' the original assembler > [exec] shipped with AVR Studio. We do not guarantee full compatibility for avra. > [exec] > [exec] AVRA comes with NO WARRANTY, to the extent permitted by law. > [exec] You may redistribute copies of avra under the terms > [exec] of the GNU General Public License. > [exec] For more information about these matters, see the files named COPYING. > [exec] > [exec] Pass 1... > [exec] Pass 2... > [exec] done > [exec] > [exec] > [exec] Assembly complete with no errors. > [exec] Segment usage: > [exec] Code : 4927 words (9854 bytes) > [exec] Data : 219 bytes > [exec] EEPROM : 80 bytes > > > I built avra from git sources fetched 3 Dez 17:13. > > avra: > PFA_INTTRAP: > C:00007b 9380 0060 sts intcur, tosl > C:00007d + loadtos > C:00007d 9189 ld tosl, Y+ > C:00007e 9199 ld tosh, Y+ > C:00007f 9468 set ; set the interrupt flag for the inner interpreter > C:000080 + jmp_ DO_NEXT Can you send me a complete listing file? I think I've seen this happening before and I hope to track down this bug. //Marcin |