描述
There are many scenarios where the desire to debug an EDK application and see SDTIO output from a machine remote to the user is necessary. This Answer Record describes this process.
This requires a design that instantiates the MicroBlaze Debug Module (MDM). This works on either PPC or MicroBlaze Architecture; the flow does not currently work on the ARM processor.
解决方案
On the remote machine, ensure you have the tools and cable drivers installed.
- Connect the board to the remote machine
- On the remote machine, source our tools, and run XMD
- Download the appropriate bitstream
- fpga -f <../download.bit>
- Once in XMD, connect to your board using the "connect" command appropriate to your processor
- connect mb mdm <options>
- connect ppc hw <options>
- You should recieve a message showing a successful connection at a TCP port number. Make note of this number
- We will now create a UART server (for SDTIO connections), select an open appropriate port number. 4321 is the default
- terminal -jtag_uart_server <PORTNO>
On the local machine:
- Open the SDK workspace with the project
- Right click on the BSP and select "Board Support Package Settings"
- Under the standalone options, change the stdin and stdiooptions to the MDM's instance name
- This could be listed asmdm_0, mdm, debug_module
- Click OK
- Under Run -> Debug Configurations, create a new configuration for the "Xilinx C/C++ ELF"
- In the STDIO Connection Tab, select "Connect STDIO to Console" and select the JTAG UART from the dropdown
- Under the Remote Debug Tab, select the "Connect to gdbserver on a different machine
- Enter the remote computer's hostname and the port you took note of during the "connect" stage (step 5 above)
- Click apply
- In the SDK view, click Window -> Show View -> Terminal
- Click the green and yellow Settings button
- Connection Type = Telnet
- Host = hostname of remote machine
- Port = port number noted in the "terminal -jtag_uart_server <PORTNUM>" stage (step 6 above)
- Hit OK
- Click on Run -> Debug As (Run As) -> Launch on Hardware.
- You will now be debugging or running on the remote hardware, with all STDIO fed through the terminal window in SDK