Please follow the steps below to set up a a remote debug in SDK.
Step 1: Launch HW SERVER on your local machine.
Open the SDK (XSCT) shell, and type hw_server to launch a HW SERVER:
Note the URL as this will be used later.
Step 2: Launch remote tool (keeping the HW SERVER open):
Add a New Target Connection:
Use the HOST name (or you can use the IP address for your HOST machine), and the PORT that was used when setting up the HW SERVER in step 1:
Note: Make sure that the Use Symbol Server box is ticked.
Step 3: Program the FPGA.
The FPGA can also be programmed in the Debug configurations (shown in the next step).
This is included here for clarity.
Xilinx Tools -> Program FPGA:
Here, you can use the target connection set up in step 2.
The Device will be set to Auto Detect by default.
If you are using a JTAG chain, this will use the first device in the chain.
If you want to change this, you can press select, and pick your device from the chain.
For example, here I have two Kintex devices in a JTAG chain:
Select your device here and then select OK.
Select Program to configure the FPGA.
You can also do this from the XSDB command line (Xilinx Tools -> XSDB console).
In the following example, I am connecting to device 2, and programming the FPGA:
Note: For a list of the XSDB commands seek the SDK help.
Step 4: Set up Debug Configurations:
Right click on the application in Project Explorer, and select Debug As -> Debug Configurations.
Double click on the Xilinx C/C++ application (System Debugger) to create a new debug configuration:
Note: You can change the Target Connection (We set this to default in step 2).
You can also change the FPGA Device (this is similar to step 3).
If using a JTAG chain, make sure that the FPGA device is correct.
In the below example, I use Device 2:
The debugger will automatically set a breakpoint at the main.
I have also added another breakpoint on line 37.
Again, this can all be done from the XSDB command line:
Note: Here, I connected to the HW SERVER.
I then ran the targets command.
(Note that the device was already configured in the previous step).
The asterisk indicates which target is active.
Here, this is 4 (the MicroBlaze).
However, if this is not set, then run the command targets 4 for example.
I then downloaded the ELF.
I added a breakpoint at the main.
Here, you can use the symbol information (&main), or the address.
I ran the con command, which is the same as running a resume in the GUI.
I then stepped using the nxt command.
All of these commands are seen in the XSDB help.