avrdudes / avarice

AVaRICE is a program for interfacing the Atmel JTAG ICE to GDB to allow users to debug their embedded AVR target.
GNU General Public License v2.0
35 stars 11 forks source link

[patch #36] --capture option not working with old JTAGICE mkII firmware 6.07 #70

Open avrs-admin opened 2 years ago

avrs-admin commented 2 years ago

cdealti 2016-04-14 19:21:45.808000

You have an old JTAGICE mkII but are stuck with the old firmware version 6.07 (AVR Studio 4.18). You don't want to download and install Atmel Studio 7 only to upgrade the firmware. Unfortunately starting Avarice with --capture does not work as expected. The target seems to halt but JTAGICE sends a break event where the PC value is zero.

Calling resumeProgram() just before interruptProgram() does the trick.

Accordingly to the AVR067 application note this command does nothing if the target is already running so it should not cause any harm in general. However, I cannot test with latest firmware versions.

diff --git a/avarice/src/jtag2io.cc b/avarice/src/jtag2io.cc index fc0a80a..55a1293 100644 --- a/avarice/src/jtag2io.cc +++ b/avarice/src/jtag2io.cc @@ -772,6 +772,7 @@ void jtag2::initJtagBox(void) startJtagLink(); changeBitRate(115200);

This issue was migrated from https://sourceforge.net/p/avarice/patches/36/

avrs-admin commented 2 years ago

cdealti 2016-04-14 19:28:31.567000

Better formatting

diff --git a/avarice/src/jtag2io.cc b/avarice/src/jtag2io.cc
index fc0a80a..55a1293 100644
--- a/avarice/src/jtag2io.cc
+++ b/avarice/src/jtag2io.cc
@@ -772,6 +772,7 @@ void jtag2::initJtagBox(void)
     startJtagLink();
     changeBitRate(115200);

+    resumeProgram();
     interruptProgram();

     deviceAutoConfig();