As Frank Storm wrote:

> GDB: Read 2 bytes from 0x82
> jtagRead
> command[R, 1]: 52 A0 00 00 00 41 20 20
> response: CF F7 00 41
> ->GDB: f7cf
> GDB: <qTStatus>
> ->GDB:
> GDB: <m8c,2>
> 
> GDB: Read 2 bytes from 0x8C
> jtagRead
> command[R, 1]: 52 A0 00 00 00 46 20 20
> response: FF FF 00 41
> ->GDB: ffff
> GDB: <qTStatus>
> ->GDB:
> GDB: <m76,2>
> 
> GDB: Read 2 bytes from 0x76
> jtagRead
> command[R, 1]: 52 A0 00 00 00 3B 20 20
> response: 07 07 00 46

Well, GDB requested three memory reads, two bytes each.  The first is
from address 0x82, the second one from 0x8c.  Both succeed (last byte
of the response is 0x41, JTAG_R_OK).  Then, it requests two bytes from
0x76, but the ICE responds with JTAG_R_FAIL (0x46), for whatever
reason only your ICE's firmware can explain, I'm afraid. :-(

Perhaps you can somehow match the addresses to which data might be
associated to them in your program, and thus how to avoid Eclipse
requesting those memory addresses your ICE is unwilling to read from,
as a possible workaround.  For a start, you could very well try
running AVR-GDB standalone (outside Eclipse), and see whether
everything else would work.

I have just modified src/jtagrw.cc to throw an instance of
jtag_exception() rather than returning NULL from jtag1::jtagRead() if
the ICE responded with a failure.  That way, AVaRICE is supposed to
answer GDB's memory read request with an error code (error 1, that
would be EPERM in Unix, but of course, the actual number is quite
meaningless in this context).  No idea what your GDB does when getting
an error response though, but you might give it a try.
-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Index: src/jtagrw.cc
===================================================================
--- src/jtagrw.cc       (revision 318)
+++ src/jtagrw.cc       (revision 319)
@@ -115,7 +115,7 @@
 
        delete [] response;
 
-       return NULL;
+       throw jtag_exception();
     }
     else
     {
@@ -151,11 +151,11 @@
 
            return response;
        }
+
+       delete [] response;
+
+       throw jtag_exception();
     }
-
-    delete [] response;
-    
-    return NULL;
 }
 
 void jtag1::jtagWrite(unsigned long addr, unsigned int numBytes, uchar 
buffer[])
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
avarice-user mailing list
avarice-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avarice-user

Reply via email to