Git Product home page Git Product logo

Comments (8)

avrs-admin avatar avrs-admin commented on July 22, 2024

flecxie
2005-06-14 19:27:09

Logged In: YES
user_id=235907

This patch adds a config line to enable support for daisy
chains.

from avarice.

avrs-admin avatar avrs-admin commented on July 22, 2024

flecxie
2005-06-14 19:27:09

  • summary: Daisy chain support for mkI --> Daisy chain support (for both mkI & mkII)

from avarice.

avrs-admin avatar avrs-admin commented on July 22, 2024

joerg_wunsch
2005-11-29 06:14:26

  • assigned_to: nobody --> joerg_wunsch

from avarice.

avrs-admin avatar avrs-admin commented on July 22, 2024

joerg_wunsch
2005-11-29 06:14:26

Logged In: YES
user_id=1097648

I'm ready to deal with it, but SourceForge doesn't give
me the download file anymore. :-(

Can you pleaese resubmit it?

from avarice.

avrs-admin avatar avrs-admin commented on July 22, 2024

flecxie
2006-04-07 09:32:45

Patch for both mkI and mkII to get avarice to work with daisy chains

from avarice.

avrs-admin avatar avrs-admin commented on July 22, 2024

flecxie
2006-04-07 09:32:45

Logged In: YES
user_id=235907

Hi,

I just noticed your answer because I was looking for my own
patch again ;)

I can however still download it here, but I'll add it in
plaintext:

diff -r -u avarice-orig/src/jtag1.h avarice-patch/src/jtag1.h
--- avarice-orig/src/jtag1.h 2005-06-14
21:20:03.000000000 +0200
+++ avarice-patch/src/jtag1.h 2005-06-14
21:20:47.000000000 +0200
@@ -81,6 +81,7 @@
virtual bool synchroniseAt(int bitrate);
virtual void startJtagLink(void);
virtual void deviceAutoConfig(void);

  • virtual void configDaisyChain(void);

uchar *getJtagResponse(int responseSize);
SendResult sendJtagCommand(uchar *command, int
commandSize, int *tries);
diff -r -u avarice-orig/src/jtag2.h avarice-patch/src/jtag2.h
--- avarice-orig/src/jtag2.h 2005-06-14
21:20:03.000000000 +0200
+++ avarice-patch/src/jtag2.h 2005-06-14
21:20:47.000000000 +0200
@@ -76,6 +76,7 @@
virtual bool synchroniseAt(int bitrate);
virtual void startJtagLink(void);
virtual void deviceAutoConfig(void);

  • virtual void configDaisyChain(void);

void sendFrame(uchar *command, int commandSize);
int recvFrame(unsigned char *&msg, unsigned short &seqno);
diff -r -u avarice-orig/src/jtag2io.cc
avarice-patch/src/jtag2io.cc
--- avarice-orig/src/jtag2io.cc 2005-06-14
21:20:03.000000000 +0200
+++ avarice-patch/src/jtag2io.cc 2005-06-14
21:20:47.000000000 +0200
@@ -485,6 +485,9 @@
// Auto config
debugOut("Automatic device detection: ");

  • /* Set daisy chain information */
  • configDaisyChain();

/* Read in the JTAG device ID to determine device */
getJtagParameter(PAR_JTAGID, resp, respSize);
jtagCheck(respSize == 4);
@@ -639,3 +642,20 @@
setJtagParameter(PAR_TIMERS_RUNNING, &timers, 1);
resetProgram();
}
+
+void jtag2::configDaisyChain(void)
+{

  • unsigned char buf[4];
  • if((dchain.units_before>0) ||
  •   (dchain.units_after>0) ||
    
  •   (dchain.bits_before>0) ||
    
  •   (dchain.bits_after>0) ){
    
  •       buf\[0\] = dchain.units_before;
    
  •       buf\[1\] = dchain.units_after;
    
  •       buf\[2\] = dchain.bits_before;
    
  •       buf\[3\] = dchain.bits_after;
    
  •       setJtagParameter(PAR_DAISY_CHAIN_INFO, buf, 4); 
    
  • }
    +}

diff -r -u avarice-orig/src/jtag.h avarice-patch/src/jtag.h
--- avarice-orig/src/jtag.h 2005-06-14 21:20:03.000000000 +0200
+++ avarice-patch/src/jtag.h 2005-06-14
21:20:47.000000000 +0200
@@ -624,6 +624,14 @@
// Name of the device controlled by the JTAG ICE
char *device_name;

  • // Daisy chain info
  • struct{
  • unsigned char units_before;
  • unsigned char units_after;
  • unsigned char bits_before;
  • unsigned char bits_after;
  • } dchain;

protected:
int safewrite(const void *b, int count);
void changeLocalBitRate(int newBitRate);
diff -r -u avarice-orig/src/jtagio.cc
avarice-patch/src/jtagio.cc
--- avarice-orig/src/jtagio.cc 2005-06-14
21:20:03.000000000 +0200
+++ avarice-patch/src/jtagio.cc 2005-06-14
21:20:47.000000000 +0200
@@ -313,6 +313,9 @@

// Auto config
debugOut("Automatic device detection: ");
+

  • /* Set daisy chain information */
  • configDaisyChain();

/* Read in the JTAG device ID to determine device */
device_id = getJtagParameter(JTAG_P_JTAGID_BYTE0);
@@ -477,3 +480,17 @@
setJtagParameter(JTAG_P_TIMERS_RUNNING, 0x00);
resetProgram();
}
+
+void jtag1::configDaisyChain(void)
+{

  • /* Set daisy chain information (if needed) */
  • if(dchain.units_before>0)

setJtagParameter(JTAG_P_UNITS_BEFORE,dchain.units_before);

  • if(dchain.units_after>0)

setJtagParameter(JTAG_P_UNITS_BEFORE,dchain.units_before);

  • if(dchain.units_after>0)
  •   setJtagParameter(JTAG_P_UNITS_AFTER,dchain.units_after);
    
  • if(dchain.bits_before>0)
  •   setJtagParameter(JTAG_P_BIT_BEFORE,dchain.bits_before);
    
  • if(dchain.bits_after>0)
  •   setJtagParameter(JTAG_P_BIT_AFTER,dchain.bits_after);
    

+}
+
diff -r -u avarice-orig/src/main.cc avarice-patch/src/main.cc
--- avarice-orig/src/main.cc 2005-06-14
21:20:03.000000000 +0200
+++ avarice-patch/src/main.cc 2005-06-14
21:22:08.000000000 +0200
@@ -179,6 +179,9 @@
" -l, --read-lockbits Read lock bits.\n");
fprintf(stderr,
" -L, --write-lockbits Write lock
bits.\n");

  • fprintf(stderr,
  •       "  -c, --daisy-chain <c,c,c,c> Daisy chain
    

settings:\n"

  •       "                                <units before,
    

units after, bits before, bits after>\n");
fprintf(stderr,
" -P, --part Target device
name (e.g."
" atmega16)\n\n");
@@ -212,6 +215,7 @@
{ "detach", 0, 0, 'D' },
{ "capture", 0, 0, 'C' },
{ "file", 1, 0, 'f' },

  • { "daisy-chain", 1, 0, 'c'},
    { 0, 0, 0, 0 }
    };

@@ -243,6 +247,10 @@
char *progname = argv[0];
int protocol = 1; // default to mkI protocol
int option_index;

  • unsigned int units_before = 0;
  • unsigned int units_after = 0;
  • unsigned int bits_before = 0;
  • unsigned int bits_after = 0;

statusOut("AVaRICE version %s, %s %s\n\n",
PACKAGE_VERSION, DATE, TIME);
@@ -253,7 +261,7 @@

while (1)
{

  •    int c = getopt_long (argc, argv,
    

"12VhdDCIf:j:B:pverW:lL:P:",

  •    int c = getopt_long (argc, argv,
    

"12VhdDCIf:j:B:pverW:lL:P:c:",
long_opts, &option_index);
if (c == -1)
break; /* no more options */
@@ -315,8 +323,11 @@
case 'P':
device_name = optarg;
break;

  •   case 'V':
    
  •   exit(0);
    
  •       case 'c':
    

sscanf(optarg,"%u,%u,%u,%u",&units_before,&units_after,&bits_before,&bits_after);

  •           break;
    
  •       case 'V':
    
  •           exit(0);
    

default:
fprintf (stderr, "getop() did something
screwey");
exit (1);
@@ -407,6 +418,12 @@
exit(1);
}

  • /* Set Daisy-chain variables */
  • theJtagICE->dchain.units_before = (unsigned char)
    units_before;
  • theJtagICE->dchain.units_after = (unsigned char)
    units_after;
  • theJtagICE->dchain.bits_before = (unsigned char)
    bits_before;
  • theJtagICE->dchain.bits_after = (unsigned char) bits_after;

// Init JTAG box.
theJtagICE->initJtagBox();
}

from avarice.

avrs-admin avatar avrs-admin commented on July 22, 2024

joerg_wunsch
2006-04-07 12:25:46

  • status: open --> closed-accepted

from avarice.

avrs-admin avatar avrs-admin commented on July 22, 2024

joerg_wunsch
2006-04-07 12:25:46

Logged In: YES
user_id=1097648

OK, this time, SourceForge allowed me to fetch the patch
again as well.

Thanks for the reminder, I applied your patch with minor
cosmetical changes. I notice avarice.1 needs to be updated
as well, but I'll handle that myself later.

from avarice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.