CVS: jtag/msp430 MSP430mspgcc.c,1.16,1.17

Chris Liechti <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/jtag/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11735/jtag/msp430

Modified Files:
	MSP430mspgcc.c 
Log Message:
revert to quicker memory read again

Index: MSP430mspgcc.c
===================================================================
RCS file: /cvsroot/mspgcc/jtag/msp430/MSP430mspgcc.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -w -d -r1.16 -r1.17
--- MSP430mspgcc.c	4 Apr 2006 21:52:43 -0000	1.16
+++ MSP430mspgcc.c	13 Apr 2006 20:21:30 -0000	1.17
@@ -466,7 +466,7 @@
     if (count <= 0) RET_ERR(PARAMETER_ERR); // negative sizes are not allowed
         
     if (rw) {   //read
-        MSP430_Log(1, "MSP430mspgcc: MSP430_MemoryRead(0x&04x, %d)...\n", address, count);
+        MSP430_Log(1, "MSP430mspgcc: MSP430_MemoryRead(0x%04x, %d)...\n", address, count);
         if (address < WORD_REG_START_ADDR) {    // Process all byte addresses first.
             doneCount = WORD_REG_START_ADDR - (WORD) address;
             if (count < doneCount) {
@@ -486,22 +486,22 @@
                 adjustLast = TRUE;
                 count--;
             }
-            //~ ReadMemQuick((WORD) (address + doneCount),
-                         //~ (WORD) ((count - doneCount) / 2),
-                         //~ (WORD*) (buffer + doneCount)
-            //~ );
-            //slow but reliable upload, instead of ReadMemQuick
-            //but this is 3 times or so slower....
-            for (i=0; i<(count - doneCount)/2; i++) {
-                ((WORD*)(&buffer[doneCount]))[i] = ReadMem(F_WORD, (WORD)(address + doneCount + i*2));
-            }
+            ReadMemQuick((WORD) (address + doneCount),
+                         (WORD) ((count - doneCount) / 2),
+                         (WORD*) (buffer + doneCount)
+            );
+            //~ //slow but reliable upload, instead of ReadMemQuick
+            //~ //but this is 3 times or so slower....
+            //~ for (i=0; i<(count - doneCount)/2; i++) {
+                //~ ((WORD*)(&buffer[doneCount]))[i] = ReadMem(F_WORD, (WORD)(address + doneCount + i*2));
+            //~ }
             if (adjustLast) {
                 memValue = ReadMem(F_WORD, (WORD)(address + count));
                 *(buffer + count) = memValue & 0xFF;
             }
         }
     } else {    //write
-        MSP430_Log(1, "MSP430mspgcc: MSP430_MemoryWrite(0x&04x, %d)...\n", address, count);
+        MSP430_Log(1, "MSP430mspgcc: MSP430_MemoryWrite(0x%04x, %d)...\n", address, count);
         if (address < WORD_REG_START_ADDR) {    // Process all byte addresses first.
             doneCount = WORD_REG_START_ADDR - (WORD) address;
             if (count < doneCount)



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.