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

[feature-request #8] Check removing reset workaround for debug wire #82

Open avrs-admin opened 2 years ago

avrs-admin commented 2 years ago

achimkraus 2014-01-05 09:31:11.953000

Using avarice 2.13 (linux) with dragon (version 7.34) in debug wire mode I recognized, that the device doesn't actually "reset" (sfrs not initialized). Investigating that shows a comment and workaround in "jtag2run.cc". I disabled the workaround and until now I can't see the mentioned problems and the sfrs are initialized as intended. Maybe be disabling the workaround could be implemented as commandline option.

void jtag2::resetProgram(bool possible_nSRST_ignored)
{
#if 0   
    if (proto == PROTO_DW) {
    /* The JTAG ICE mkII and Dragon do not respond correctly to
     * the CMND_RESET command while in debugWire mode. */
    interruptProgram();
        setProgramCounter(0);
    } else {
#endif  
    uchar cmd[2] = { CMND_RESET, 0x01 };
    uchar *resp;
    int respSize;

    doJtagCommand(cmd, 2, resp, respSize);
    delete [] resp;

    /* Await the BREAK event that is posted by the ICE. */
    bool bp, gdb;
    expectEvent(bp, gdb);
#if 0   
    }
#endif  
}

This issue was migrated from https://sourceforge.net/p/avarice/feature-requests/8/