bugAVR Downloader/UploaDEr - Bugs: bug #15162, Butterfly support in version 5.0...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15162: Butterfly support in version 5.0 is broken

Submitter:  None
Submitted:  Wed 07 Dec 2005 08:52:19 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  joerg_wunsch Originator Name:  Michael Schulze
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  None Programmer hardware: 
Device type: 

Tue 24 Jan 2006 12:50:25 AM UTC, comment #3: 

I have just tested the latest CVS  version (as of 24 Jan 06) and it is working great now.... Cheers.

Nick.

Nick Lott <brokentoaster>
Tue 20 Dec 2005 05:34:49 AM UTC, comment #2: 

Hi I've tested the changes but I have a slightly different problem. I'm running OsX Tiger 10.4.3 and avrdude5.0-beta works with the butterfly. Version 5.0 segfaults when it attempts to write to the butterfly. Below is the output and the crash report. This was using a fink install (package info from http://screwdecaf.cx/tools.html). I've tried recompiling from the latest CVS source but I get the same problem.
 
There are 31 Differences between the 2 versions of butterfly.c any idea where to start looking? Most of the changes appear to be castings. If I use the new butterfly.c with the Beta version it seems to work fine so the problem might be due to changes elsewhere in the program.
 
Any ideas? Can anyone replicate this problem?

nick$ avrdude -p m169 -c butterfly -P /dev/cu.usbserial -U flash:w:test.hex:i

Connecting to programmer: ..
Found programmer: Id = "AVRBOOT"; type = S
    Software Version = 1.4; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=-128 bytes.

Programmer supports the following devices:
    Device code: 0x75

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 
0.00s

avrdude: Device signature = 0x1e9405
avrdude: NOTE: FLASH memory has been specified, an erase cycle will 
be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: writing flash (15862 bytes):

Writing |                                                    | 0% 
0.00sSegmentation fault

-----

The following is the crash report from ~/Library/Logs/CrashReporter/
avrdude.crash.log

Host Name:      MacMini
Date/Time:      2005-11-02 13:47:19.772 +0900
OS Version:     10.4.2 (Build 8C46)
Report Version: 3

Command: avrdude
Path:    /sw/bin/avrdude
Parent:  bash [386]

Version: ??? (???)

PID:    674
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x000b6000

Thread 0 Crashed:

  1.   <<00000000>>     0xffff8aec __memcpy + 844 (cpu_capabilities.h:189)

1   avrdude     0x00009ffc butterfly_paged_write + 252 (butterfly.c:578)
2   avrdude     0x00011f14 do_op + 732 (main.c:598)
3   avrdude     0x000138a8 main + 5608 (main.c:1396)
4   avrdude     0x0000219c _start + 344 (crt.c:272)
5   avrdude     0x00002040 start + 60

Thread 0 crashed with PPC Thread State 64:
  srr0: 0x00000000ffff8aec srr1: 
0x000000000200d030                        vrsave: 0x00000000ff000000
    cr: 0x4404244a          xer: 0x0000000000000005   lr: 
0x0000000000009ffc  ctr: 0x00000000000000b8
    r0: 0x0000000000000001   r1: 0x00000000bfffed90   r2: 
0x0000000000000000   r3: 0x00000000000b5004
    r4: 0x00000000000ae01c   r5: 0x0000000000003dda   r6: 
0x0000000000000010   r7: 0x0000000000000020
    r8: 0x0000000000000030   r9: 0x00000000ffffffff  r10: 
0x0000000000000060  r11: 0x0000000000000080
   r12: 0x00000000000b5fe0  r13: 0x0000000000000001  r14: 
0x00000000ffffffff  r15: 0x0000000000000000
   r16: 0x0000000000000001  r17: 0x0000000000000000  r18: 
0x00000000bffff91c  r19: 0x0000000000000000
   r20: 0x0000000000019f08  r21: 0x000000000034dd10  r22: 
0x00000000000b5004  r23: 0x00000000000b5001
   r24: 0x00000000000b5002  r25: 0x0000000001806600  r26: 
0x0000000000003df6  r27: 0x00000000000b5000
   r28: 0x0000000000000000  r29: 0x0000000000003df6  r30: 
0x00000000ffffff84  r31: 0x0000000000009f08

Binary Images Description:
    0x1000 -    0x25fff avrdude     /sw/bin/avrdude
   0x60000 -    0x8cfff libncurses.5.dylib     /sw/lib/ncurses/libncurses.5.dylib
0x8fe00000 - 0x8fe51fff dyld 43.1    /usr/lib/dyld
0x90000000 - 0x901a6fff libSystem.B.dylib     /usr/lib/libSystem.B.dylib
0x901fe000 - 0x90202fff libmathCommon.A.dylib     /usr/lib/system/libmathCommon.A.dylib
0x91d3a000 - 0x91d5afff libmx.A.dylib     /usr/lib/libmx.A.dylib
0x9361b000 - 0x93623fff libgcc_s.1.dylib     /usr/lib/libgcc_s.1.dylib
0x9682a000 - 0x96858fff libncurses.5.4.dylib     /usr/lib/libncurses.5.4.dylib


Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5247.obj~4/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5247)

Nick Lott <brokentoaster>
Wed 07 Dec 2005 12:25:46 PM UTC, comment #1: 

Mind the:

»... with buffersize=128 bytes.«

message.

This is supposed to be fixed by the following revision of butterfly.c:

----------------------------------------------------------------------------
revision 1.12
date: 2005/10/20 11:36:19;  author: joerg_wunsch;  state: Exp;  lines: +3 -3
Fix yet another sign extension bug introduced by renaming "unsigned char"
to "char".
----------------------------------------------------------------------------

Do you have a chance to test a version from CVS to see if this also
fixes your problem?

Joerg Wunsch <joerg_wunsch>
Group administrator
Wed 07 Dec 2005 08:52:19 AM UTC, original submission:  

Hi,

I updated from version avrdude 4.3 to version 5.0 and I use the butterfly programmer.

In version 4.3 the flashing works fine. See output:

$ avrdude -P /dev/ttyUSB0 -p m169 -c butterfly -U f:w:test.bin:a

Found programmer: Id = "AVRBOOT"; type = S
    Software Version = 1.4; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x75

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x05941e
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "test.bin"
avrdude: input file test.bin auto detected as Intel Hex
avrdude: writing f (168 bytes):

Writing | ################################################## | 100% 0.11s



avrdude: 168 bytes of f written
avrdude: verifying f memory against test.bin:
avrdude: load data f data from input file test.bin:
avrdude: input file test.bin auto detected as Intel Hex
avrdude: input file test.bin contains 168 bytes
avrdude: reading on-chip f data:

Reading | ################################################## | 100% 0.11s



avrdude: verifying ...
avrdude: 168 bytes of f verified

avrdude done.  Thank you.


After the update to version 5.0, it goes wrong and I can't flash my board like in the past. Avrdude shows the following output:

$ /usr/local/avr/bin/avrdude -P /dev/ttyUSB0 -p m169 -c butterfly -U f:w:test.bin:a

Connecting to programmer: .
Found programmer: Id = "AVRBOOT"; type = S
    Software Version = 1.4; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=-128 bytes.

Programmer supports the following devices:
    Device code: 0x75

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9405
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "test.bin"
avrdude: input file test.bin auto detected as Intel Hex
avrdude: writing f (168 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: failed to write flash memory, rc=-1

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


I don't know where the problem is. I hope the informations are enough and useful.


Thanks and greets
Michael Schulze

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-04-27 joerg_wunsch Open/ClosedOpen Closed
2005-12-07 joerg_wunsch StatusNone Fixed
    Assigned toNone joerg_wunsch
2005-12-07 None Carbon-Copy- Added mschulze --AT-- cs --DOT-- uni-magdeburg --DOT-- de

Back to the top

Powered by Savane 3.14-0b36.
Corresponding source code