This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
OCD - wiggler baud rate problem
- To: <gdb at sourceware dot cygnus dot com>,<bystricky dot juro at erd dot epson dot com>
- Subject: OCD - wiggler baud rate problem
- From: "Jonathan Riches" <jon dot riches at westbridge-design dot co dot uk>
- Date: Wed, 29 Aug 2001 16:58:41 +0100
Thanks Juro for the info. It appears that in GDB 5.0 (ocd.c) that all ocd
writes / reads are as bytes, this would account for the problem I also had
in writing an init file, where the SYPCR was only getting 1 byte written,
then it was set for good.
I have found the download speed using wiggler has risen from 10,000 bits/sec
to 25,000,
Regards
Jonathan Riches
Juro wrote >
#######################################################################
Hi Jonathan
There's a bug in OCD.C, I reported it to macraigor:
the file load was SIGNIFICANTLY
slower. Using Raven I achieved the equivalent of about 9600 baud rate.
So I started comparing the old code with the new one and found a serious
bug:
in the file OCD.C you try to determine if to read/write words, halfwords or
bytes.
Your code:
=======================================================
if ( ((memaddr & 4) == 4) || ((len & 4) == 4) )
buf[5] = 4; /* Word align and word length */
else if ( ((memaddr & 2) == 2) || ((len & 2) == 2) )
buf[5] = 2; /* TWO BYTE WRITE */
else
buf[5] = 1; /* default to byte write */
=====================================================
is clearly wrong. You probably meant something like:
=====================================================
if ( ((memaddr & 3) == 0) && ((len & 3) == 0) )
buf[5] = 4; /* Word align and word length */
else if ( ((memaddr & 1) == 0) && ((len & 1) == 0) )
buf[5] = 2; /* TWO BYTE WRITE */
else
buf[5] = 1; /* default to byte write */
=====================================================
The same code occurs in two different places.
Indeed, after replacing the code we were back up to the speed
#####################################################################