Hi everybody

I'm still working on my ARM platform trying to bring up the debugger.
I'm using a serial port connection for KITL with an interrupt based mecanism.
If I disable the debugger, I am able to connect the platform and run remote
tools and programs.

When I enable the debugger in the build option, the system begin to boot and
hangs during debugger initialization.

I noticed that in the kdstub source code, the interrupts are disabled during
KdSend and KdRecv calls. To avoid this first problem, I force the interrupts
to be enabled each time I write a frame in the KITL driver.

But even after doing this, the debugger hangs after having displayed this in
the VS window :
PB Debugger The Kernel Debugger connection has been established (Target CPU
is ARM).
PB Debugger Target name: Board
PB Debugger Probe name: KdStub
PB Debugger Binary Image should be loaded at 0x80000000 / Data relocated at
0x803a6000

In the debug serial port I can read :
>>KITLSend KDBG Seq:44(0x0000002C), Flags:0x00000001 (DEV ), DataLen: 43
<<KITLRecv KDBG Seq:44(0x0000002C), Flags:0x00000004 (ACK ), DataLen: 0
--KdSend: 1
--KdpSendPacket
<<KITLRecv ADMIN RETRANSMIT , DataLen: 0
<<KITLRecv ADMIN RETRANSMIT , DataLen: 0
....

The last message is then displayed indefinetly.

Someone has an idea about this issue's source ?

RE: KDBG hangs by alex

alex
Tue May 06 05:38:01 PDT 2008

It seems I found the reason of the problem.
In Kdstub during packet send and receive (KdSend and KdRecv functions), they
disable the interrupts, but don't reenable it after function completion.

As all my KITL driver is built on interrupt mecanism, it just stop receiving
and emitting packets.

Now the thing is to know why they do this and if anybody already had this
problem ?

"alex" wrote:

> Hi everybody
>
> I'm still working on my ARM platform trying to bring up the debugger.
> I'm using a serial port connection for KITL with an interrupt based mecanism.
> If I disable the debugger, I am able to connect the platform and run remote
> tools and programs.
>
> When I enable the debugger in the build option, the system begin to boot and
> hangs during debugger initialization.
>
> I noticed that in the kdstub source code, the interrupts are disabled during
> KdSend and KdRecv calls. To avoid this first problem, I force the interrupts
> to be enabled each time I write a frame in the KITL driver.
>
> But even after doing this, the debugger hangs after having displayed this in
> the VS window :
> PB Debugger The Kernel Debugger connection has been established (Target CPU
> is ARM).
> PB Debugger Target name: Board
> PB Debugger Probe name: KdStub
> PB Debugger Binary Image should be loaded at 0x80000000 / Data relocated at
> 0x803a6000
>
> In the debug serial port I can read :
> >>KITLSend KDBG Seq:44(0x0000002C), Flags:0x00000001 (DEV ), DataLen: 43
> <<KITLRecv KDBG Seq:44(0x0000002C), Flags:0x00000004 (ACK ), DataLen: 0
> --KdSend: 1
> --KdpSendPacket
> <<KITLRecv ADMIN RETRANSMIT , DataLen: 0
> <<KITLRecv ADMIN RETRANSMIT , DataLen: 0
> ....
>
> The last message is then displayed indefinetly.
>
> Someone has an idea about this issue's source ?