This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Fwd: GDB 5.0 works only at 9600 bps?]


Joel Brenner wrote:
> 
> Thi is the logfile writed by gdb during the handshake with ANGEL an
> AT91EB40:
> 
> ADP log file opened at Thu Dec 14 14:39:01 2000
> 
> tx: [T=0 L=52] 03 01 00 01 05 00 03 00 00 00 00 00 ff ff ff ff ff ff ff
> ff 01 00 00 00 00 c0 00 00 05 00 00 00 00 c2 01 00 00 e1 00 00 00 96 00
> 00 00 4b 00 00 80 25 00 00
> R=00030005 H->T CI_HBOOT:  ADP_ParamNegotiate 00000001 0000c000 00000005
> 0001c200 0000e100 00009600 00004b00 00002580

That is duplicated.  You must have pasted it twice.

I guess it starts here:

> ADP log file opened at Thu Dec 14 14:49:53 2000
> 
> tx: [T=0 L=52] 03 01 00 01 05 00 03 00 00 00 00 00 ff ff ff ff ff ff ff
> ff 01 00 00 00 00 c0 00 00 05 00 00 00 00 c2 01 00 00 e1 00 00 00 96 00
> 00 00 4b 00 00 80 25 00 00
> R=00030005 H->T CI_HBOOT:  ADP_ParamNegotiate 00000001 0000c000 00000005
> 0001c200 0000e100 00009600 00004b00 00002580

GDB sent the possible speeds it can operate.  The favoured one is the first
(115200)


> rx: [T=0 L=36] 03 02 01 01 05 00 03 80 00 00 00 00 ff ff ff ff ff ff ff
> ff 00 00 00 00 01 00 00 00 00 c0 00 00 00 c2 01 00
> R=80030005 H<-T CI_HBOOT:  ADP_ParamNegotiate 00000000 00000001 0000c000
> 0001c200

The little board says it can do 115200.


> tx: [T=0 L=20] 03 02 00 01 06 00 03 00 00 00 00 00 ff ff ff ff ff ff ff
> ff
> R=00030006 H->T CI_HBOOT:  ADP_LinkCheck

GDB switched to 115200 and pings the board.


> rx: [T=0 L=20] 03 03 02 01 06 00 03 80 00 00 00 00 ff ff ff ff ff ff ff
> ff
> R=80030006 H<-T CI_HBOOT:  ADP_LinkCheck

The board replies.  They are talking at 115200 (but not for long :-(  )

> tx: [T=0 L=24] 03 01 00 01 03 00 03 00 00 00 00 00 ff ff ff ff ff ff ff
> ff 00 00 00 00
> R=00030003 H->T CI_HBOOT:  ADP_Reset 00000000
> rx: [T=0 L=24] 03 01 01 01 03 00 03 80 ff ff ff ff ff ff ff ff ff ff ff
> ff 00 00 00 00
> R=80030003 H<-T CI_HBOOT:  ADP_Reset 00000000
> rx: [T=0 L=215] 04 02 01 01 00 00 04 80 ff ff ff ff ff ff ff ff ff ff ff
> ff f8 00 00 00 f8 07 00 00 01 00 00 00 03 00 00 00 00 00 00 80 01 00 00
> 00 00 00 00 00 a3 00 00 00 41 6e 67 65 6c 20 44 65 62 75 67 20 4d 6f 6e
> 69 74 6f 72 20 28 73 65 72 69 61 6c 29 20 31 2e 30 34 20 28 41 64 76 61
> 6e 63 65 64 20 52 49 53 43 20 4d 61 63 68 69 6e 65 73 20 53 44 54 20 32
> 2e 35 29 20 66 6f 72 20 41 54 39 31 45 42 34 30 20 28 32 2e 30 30 29 0a
> 41 6e 67 65 6c 20 44 65 62 75 67 20 4d 6f 6e 69 74 6f 72 20 72 65 62 75
> 69 6c 74 20 6f 6e 20 41 70 72 20 30 37 20 32 30 30 30 20 61 74 20 31 32
> 3a 34 30 3a 33 31 0a 53 65 72 69 61 6c 20 52 61 74 65 3a 20 31 31 35 32
> 30 30 0a 00
> R=80040000 H<-T CI_TBOOT:  ADP_Booted 000000f8 000007f8 00000001
> 00000003 80000000 00000001 00000000 000000a3 65676e41 6544206c 20677562
> 696e6f4d 20726f74 72657328 296c6169 302e3120 41282034 6e617664 20646563
> 43534952 63614d20 656e6968 44532073 2e322054 66202935 4120726f 45313954
> 20303442 302e3228 410a2930 6c65676e 62654420 4d206775 74696e6f 7220726f
> 69756265 6f20746c 7041206e 37302072 30303220 74612030 3a323120 333a3034
> 65530a31 6c616972 74615220 31203a65 30323531 00000a30
> tx: [T=0 L=24] 04 02 00 01 00 00 04 00 00 00 00 00 ff ff ff ff ff ff ff
> ff 00 00 00 00
> R=00040000 H->T CI_TBOOT:  ADP_Booted 00000000
> tx: [T=0 L=24] 01 01 00 01 01 00 01 00 00 00 00 00 ff ff ff ff ff ff ff
> ff 01 00 01 00

All the above mesages, on channels 3 and 4 (CI_HBOOT and CI_TBOOT) were
supposedly at 115200.



> R=00010001 H->T CI_HADP:  ADP_Info 00010001
> 

From this point on communication goes (mainly) through channels 1 and 2
(i.e. CI_HADP and CI_TADP).

Here is the board bug.  It seems that messages sent by the host on channel 1
are not received or the response is sent at a different speed or whatever
(I don't have the instruments to find out).

My theory is that the board may have received this message but is switching the
serial line back to 9600 when sending data through channel 2.  This would explain
why this works when we keep the speed at 9600 -- as GDB is still at 9600 it will
get the reply to the ADP_Info RPC all right.

Don't ask me how the other debugger you've mentioned is able to survive this 
condition.  The client RDI protocol we use in GDB was given to us by ARM and it
adheres strictly to the protocol specs (which I have printed here). 


One possible way to test this theory would be changing GDB's speed back to 9600
after sending the ADP_INFO packet.  If it still does not work, change it before
sending it.  But I don't have time to do this now.


Why don't you post this to  aeb@arm.com  ?   (Our board's mailing list)

That seems to be the appropriate list.  GDB swtiches speed OK with all other boards.


-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]