Depending on the hardware configuration and requirements specification, up to two communication channels are used for the connection between the host PC and the Linux target system (figure 1). When application debugging, the connection can take place either via Ethernet or the JTAG port. The serial connection is optional and can be used as a second terminal in addition to the JTAG console. However, for the kernel debugging definitely only the JTAG port is a possibility.
Random access to the virtual mapped memory and a resources-sparing access to the "on-chip" debug module can only be implemented via the JTAG port.
Fig 1: Possible debug communication channels to the embedded Linux target
To see a bigger version of this graphic click here.
The application debugging (execution-mode debugging)
Let us first of all elaborate on the application or also execution-mode debugging. Here, the target system is permanently in a running state. For the debugging, a modified GDB Server is used, which is started on the target system when the kernel is booted. The server waits for a connection request of the host debugger via the selected communication channel and initiates the debug process after an appropriate request by the host debugger. Either an Ethernet connection or the JTAG port is a possibility here as communication channel (figure 2).
Fig 2: For the connection to the GDB Server, either an Ethernet port or JTAG port can be used