From: Armin O. <arm...@gm...> - 2014-12-09 15:15:32
|
Okay then I would recommend you to build avarice from source. Althought the package you installed states version 2.13 which apparently is the most recent one, a lot has changed on trunk in the meantime (Maybe a new release should be issued?). Anyways for me building from source fixed that problem. 2014-12-09 15:37 GMT+01:00 Rémi Pincent <mr....@la...>: > "You should be using dragon_dw otherwise it will temporarily activate ISP > and then debugwire is only possible after power-cycle. So this solves that > problem." > :-) 1 problem solved. Now power off/on no more needed before launching > avarice! > > I've attached wireshark logs : > you will find until frame 24 a break > and then from 25 to 132 is a step. > > I'm using this avarice package : > https://aur.archlinux.org/packages/avarice/ with > https://aur.archlinux.org/packages/av/avarice/PKGBUILD > libusb used is 1.0.19-1 > > > Le 09/12/2014 15:14, Armin Otterstätter a écrit : > > You should be using dragon_dw otherwise it will temporarily activate ISP > and then debugwire is only possible after power-cycle. So this solves that > problem. > > About the USB delay. This is about the same time as I measured. And this > relates to some USB-timeout. Is your avarice compiled with libusb 2.0 ? > Could you post the Wireshark log? > > 2014-12-09 15:00 GMT+01:00 Rémi Pincent <mr....@la...>: > >> I've monitored usb using wireshark : break takes 1s, step takes 3s. >> Duration between 2 USB packets is at max 0.5s. >> >> I'm glad to hear someone debugging at lightspeed with avarice + gdb. I >> hope I will manage to have such a setup. >> >> I'm using avrdude for programming : >> * avrdude -pm328p -c dragon_isp -Pusb -v -U >> flash:w:arduino_avr_template_avr_plugin.hex:i* >> >> debugWire fuse is set, so when I flash I have following logs : >> >> >> >> * avrdude: jtagmkII_setparm(): bad response to set parameter command: >> RSP_FAILED avrdude: jtagmkII_getsync(): ISP activation failed, trying >> debugWire avrdude: Target prepared for ISP, signed off.* >> >> ... then program is flashed. As I understand, ISB programming is used >> with debugWire fuse enabled. >> >> Even if I wait during some seconds avarice won't run successfully, I have >> these logs : >> *AVaRICE version 2.13, Sep 19 2014 09:15:10* >> >> * JTAG config starting.* >> * Found a device: AVRDRAGON* >> * Serial number: 00:a2:00:04:72:83* >> * set paramater command failed: DEBUGWIRE SYNC FAILED* >> * Failed to activate debugWIRE debugging protocol* >> * USB bulk read error: Input/output error* >> >> >> * USB daemon died * >> If I power off/power on MCU then avarice launches successfully. >> >> Now I will test avarice programming. >> >> Le 09/12/2014 13:13, Armin Otterstätter a écrit : >> >> breaking/stepping is instantly on my setup. At least so fast that it >> just noteable to me. >> >> Regarding the ISP issue are you using avarice or avrdude for >> programming? If avrdude, are you then using dragon with ISP or debugwire? >> >> For me programming with avarice is working just fine. But when I use >> avrdude (which by itself also works just fine) I have to add some delay >> before invoking avarice otherwise avarice cannot open the USB. Because of >> that its (unfortunately) impossible to run avrdude as a shell command >> through .gdbinit. >> >> >> 2014-12-09 11:34 GMT+01:00 Rémi Pincent <mr....@la...>: >> >>> Yes I'm on an Arch distribution. >>> Thanks for wireshark tip. I will check USB connection. >>> >>> How long is breaking/stepping with your setup? >>> >>> In fact, flash ends successfully through ISP in debugWire mode. But >>> after, if I want to launch a debug session I must unplug MCU. Reset line is >>> just pulled up. >>> This problem is also descriped on this topic : >>> >>> http://awtfy.com/2012/03/29/hardware-debugging-the-arduino-using-eclipse-and-the-avr-dragon/ >>> "If you get an error, check that you’re using libusb. Also in most cases >>> just cycling the power on both the Dragon and the Arduino puts it back to >>> working. If you give avarice a -v flag for verbose it will constantly spit >>> shit out for you to read and not be interested in as you debug. " >>> >>> Lah. >>> >>> Le 09/12/2014 10:27, Armin Otterstätter a écrit : >>> >>> I assume you're on Linux? >>> I did the Tracing with Wireshark ( >>> http://wiki.wireshark.org/CaptureSetup/USB). There you can set the >>> time-display to "relative to previous captured packet" (or similar) and >>> then you can quickly see where the USB is hanging. >>> >>> Hmm the DEBUGWIRE SYNC FAILD doesn't sound too good. When I'm >>> downloading I don't have to unplug. Maybe there is some problem with the >>> DebugWire communication alltogether. Do you have anything connected to >>> Reset apart from the AVR Dragon? >>> >>> Cheers, >>> Armin >>> >>> PS.: sorry missed the reply-all in the first response... so now back to >>> the mailinglist... >>> >>> 2014-12-09 10:14 GMT+01:00 Rémi Pincent <mr....@la...>: >>> >>>> Hi Armin, >>>> >>>> I'm using AVaRICE version 2.13, Sep 19 2014 09:15:10. >>>> According to sf status "AVaRICE 2.12 is the latest release."! >>>> What is your version? >>>> >>>> How did you trace these USB issues? >>>> >>>> Another question, after flashing code using debugger, I have to >>>> unplug/plug debugger and MCU otherwise when I launch avarice I have "set >>>> paramater command failed: DEBUGWIRE SYNC FAILED", have you some tips in >>>> order to solve this issue? >>>> >>>> Cheers >>>> Lah >>>> >>>> Le 09/12/2014 10:08, Armin Otterstätter a écrit : >>>> >>>> Which Version of avarice are you using? >>>> I had similar problems when using the avarice that came with an apt-get >>>> install on a recent ubuntu (Version 2.11). I traced it down to some USB >>>> timeout issue. But the problem is resolved in trunk. Just get the most >>>> recent version from sf.net. >>>> If you're on the trunk already then it'll probably be something >>>> different... >>>> >>>> Cheers, >>>> Armin >>>> >>>> 2014-12-09 9:54 GMT+01:00 Rémi Pincent <mr....@la...>: >>>> >>>>> Hi all, >>>>> >>>>> I'm debugging ATmega328p with avarice + avr-gdb + avrdragon using >>>>> debugWire. >>>>> My binary is compiled with following options : -g2 -gstabs -O0 >>>>> -ffunction-sections -fdata-sections -std=gnu99 >>>>> All is right... But debugging is very slow, stepping is awfully slow >>>>> (~5s), and breaking is also quite slow (~2s). >>>>> Moreover if have often to reflash code, it seems flash get corrupted >>>>> when debug sessions does not finish cleanly. >>>>> >>>>> I've written topic about this issue here >>>>> >>>>> http://www.avrfreaks.net/forum/avrdragon-debugwire-atmega328p-nice-unusable >>>>> But for now, I haven't found any people working with a usable debugging >>>>> environment with debugWire and avr-gdb... Suggestions are about >>>>> changing >>>>> toolchain and debugging tools in order to use some proprietary >>>>> solutions... >>>>> >>>>> Have you got some suggestions in order to debug efficiently? >>>>> >>>>> Regards. >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>>>> from Actuate! Instantly Supercharge Your Business Reports and >>>>> Dashboards >>>>> with Interactivity, Sharing, Native Excel Exports, App Integration & >>>>> more >>>>> Get technology previously reserved for billion-dollar corporations, >>>>> FREE >>>>> >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> avarice-user mailing list >>>>> ava...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/avarice-user >>>>> >>>> >>>> >>>> >>> >>> >> >> > > |