bugAVR Downloader/UploaDEr - Bugs: bug #27507, SIGSEGV when using avrdragon...

 
 

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

bug #27507: SIGSEGV when using avrdragon (avrdude 5.8)

Submitted by:  Łukasz Góralczyk <liku>
Submitted on:  Wed 23 Sep 2009 05:45:44 PM UTC  
Votes:  70  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: Lukasz Goralczyk
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Thu 07 Jan 2010 03:59:46 PM UTC, comment #7:

Thanks, the fix was more than appropriate. In fact, it was
merely an oversight by me to not use stk500v2_jtagmkII_setup/
stk500v2_jtagmkII_teardown because they have already been
used in the Dragon_HVSP and Dragon_PP setups correctly.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Wed 06 Jan 2010 09:04:04 PM UTC, comment #6:

The patch applies fine to the latest tarball (5.8). I now tried the latest version (checked out from svn yesterday) and it works fine for me.

It looks to me like you have another problem. What is your development environment ?

I'm on Ubuntu karmic (9.10).

Markus Baertschi <markus_b>
Wed 06 Jan 2010 05:56:34 PM UTC, comment #5:

Got the same problem, but the hack mentioned here doesn't work. (using trunk-881). Without the patch I get SIGSEGV, with the patch:

avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED
avrdude: jtagmkII_getsync(): ISP activation failed, trying debugWire
avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_NO_TARGET_POWER
avrdude: failed to sync with the JTAG ICE mkII in ISP mode

I'm trying to do:

avrdude -p atmega8 -B 10 -c dragon_isp -P usb -e -U flash:w:main.hex

Stanisław Pitucha <viraptor>
Mon 04 Jan 2010 09:06:47 AM UTC, comment #4:

This patch has solved the problem for me.

I do get the error, "jtagmkII_close(): bad response to GO command: RSP_ILLEGAL_EMULATOR_MODE".
avrdude seems to work fine, despite the message, though.

Markus Baertschi <markus_b>
Tue 27 Oct 2009 12:25:08 PM UTC, comment #3:

I've stumbled into that bug also. AVR Dragon (with new firmware), ATTiny2313, segfault at initialization step:

Using Port : usb
Using Programmer : dragon_isp
avrdude: stk500v2_dragon_isp_open()
avrdude: usbdev_open(): Found AVRDRAGON, serno: 00A20000327A
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: jtagmkII_getsync()
avrdude: jtagmkII_getsync(): Sending sign-on command:
avrdude: jtagmkII_send(): sending 1 bytes
make: *** [program] Segmentation fault

With following patch, everything works:
$ diff -Nru stk500v2.c.old stk500v2.c
--- stk500v2.c.old 2009-07-11 04:39:37.000000000 +0600
+++ stk500v2.c 2009-10-27 17:04:04.000000000 +0500
@@ -3586,8 +3593,8 @@
pgm->paged_load = stk500v2_paged_load;
pgm->print_parms = stk500v2_print_parms;
pgm->set_sck_period = stk500v2_set_sck_period_mk2;
- pgm->setup = jtagmkII_setup;
- pgm->teardown = jtagmkII_teardown;
+ pgm->setup = stk500v2_jtagmkII_setup;
+ pgm->teardown = stk500v2_jtagmkII_teardown;
pgm->page_size = 256;
}

It still does "jtagmkII_close(): bad response to GO command: RSP_ILLEGAL_EMULATOR_MODE" when closing connection, though.

Alexey <alexdm>
Wed 23 Sep 2009 07:09:51 PM UTC, comment #2:

Proposed solution: in stk500v2_dragon_isp_open() remove lines with mycookie, set chained_pdata to pgm->cookie. It works but I don't know if it's elegant.

Łukasz Góralczyk <liku>
Wed 23 Sep 2009 06:32:58 PM UTC, comment #1:

Sorry, forgot about command line (avrdragon in ISP mode):
/usr/bin/avrdude -pm168 -cdragon_isp -Pusb

Łukasz Góralczyk <liku>
Wed 23 Sep 2009 05:45:44 PM UTC, original submission:

Hello,

I've upgraded my system recently and avrdude stopped programming AVRs through avrdragon board. I'm using avrdude version 5.8, I'm using 64 bit system (Ubuntu Karmic Koala). Here's the backtrace:

#0 0x000000000041bf06 in jtagmkII_send (pgm=0x6996a0, data=0x7fffffffbf40 "�01277377377377177", len=1) at jtagmkII.c:378
#1 0x000000000041c752 in jtagmkII_getsync (pgm=0x6996a0, mode=3) at jtagmkII.c:618
#2 0x000000000042c6f8 in stk500v2_dragon_isp_open (pgm=0x6996a0, port=0x7fffffffe58b "usb") at stk500v2.c:2849
#3 0x0000000000403e20 in main (argc=7, argv=0x7fffffffe248) at main.c:778

There's a dereference of null pointer in jtakmkII_send(), the pointer (cookie variable) is being set to chained_pdata in in stk500v2_dragon_isp_open() which is initialised to zero during setup and never changed (I guess).

Łukasz Góralczyk <liku>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by viraptor (Voted in favor of this item)
  • -unavailable- added by viraptor (Posted a comment)
  • -unavailable- added by markus_b (Posted a comment)
  • -unavailable- added by nwimpney (Voted in favor of this item)
  • -unavailable- added by alexdm (Posted a comment)
  • -unavailable- added by liku (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 70 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Jan 2010 03:59:46 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Wed 06 Jan 2010 05:58:09 PM UTCviraptorCarbon-Copy-=>Added viraptor
    Thu 05 Nov 2009 11:29:44 PM UTCnwimpneyCarbon-Copy-=>Added nwimpney

    Back to the top


    Powered by Savane 3.1-cleanup