Using Xilinx SDK on Windows to Debug a Linux Application on

Here's another page from my notes (prettied up a bit) that might be useful to someone.


Set up target environment

XSDK uses TCF to communicate via TCP with the debugger on the target board. TCF is an open-source project. The TCF Eclipse client is already installed in XSDK. The target board has to be running the TCF agent. The agent is part of PetaLinux, and if you're using PetaLinux, it should already be running. If you're running the snickerdoodle Linux, you'll probably need to download the TCF agent source it and build it. You can build it right on the board (see below), but I downloaded it to my faster x64 workstation, and used the PetaLinux cross-tools to build it for the ARM.

Download source

$ cd ~/git (for example)

$ git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git

Set up PetaLinux environment

$ source /opt/Xilinx/petalinux-v2016.1-final/settings.sh

Build

$ cd ~/git/org.eclipse.tcf.agent/agent

$ make CC=arm-xilinx-linux-gnueabi-gcc LD=arm-xilinx-linux-gnueabi-ld MACHINE=arm NO_SSL=1 NO_UUID=1

Deploy

Copy ~/git/org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug/agent to target board.

Mark as executable.

Run

Launch as root with no arguments. It will run as a foreground process (it produces no output AFAIK).

Build TCF Agent on Snickerdoodle (as root)

Get git

# apt-get update

# apt-get install git

Download source

# cd ~/git (for example)

# git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git

Build

# cd ~/git/org.eclipse.tcf.agent/agent

# make NO_SSL=1 NO_UUID=1

Deploy

# cp ~/git/org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug/agent /root

Launch Debugger from SDK

From XSDK menu, Run | Debug Configurations…

In the left pane, select Xilinx C/C++ application (System Debugger).

Click the "new" button:




In the right pane, select the Target Setup tab.

Type a Name.

Select Debug Type of Linux Application Debug

Click New [Connection] button.






















Complete fields as appropriate. Use IP address for host name (probably). Leave Port at its default value.

Click OK

Select Application tab

Browse for Project Name and select your application.

Type a remote path to which to copy the executable to the target board.


Click Close or Debug as appropriate.

See also: https://wiki.eclipse.org/TCF

I definitely appreciate the "Build TCF Agent on Snickerdoodle (as root)" being part of the instructions. I demanded that no matter what we were to do snickerdoodle have gcc on target.

I run Mac/OS X and Windows in VMWare for Vivado/Xilinx SDK/EDA etc. so the only Linux I'm running is on half-dozen snickerdoodles on my desk.

-Jamil



On Friday, July 1, 2016 at 5:38:28 PM UTC-7, Nick Burkitt wrote:

Here's another page from my notes (prettied up a bit) that might be useful to someone.


Set up target environment

XSDK uses TCF to communicate via TCP with the debugger on the target board. TCF is an open-source project. The TCF Eclipse client is already installed in XSDK. The target board has to be running the TCF agent. The agent is part of PetaLinux, and if you're using PetaLinux, it should already be running. If you're running the snickerdoodle Linux, you'll probably need to download the TCF agent source it and build it. You can build it right on the board (see below), but I downloaded it to my faster x64 workstation, and used the PetaLinux cross-tools to build it for the ARM.

Download source

$ cd ~/git (for example)

$ git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git

Set up PetaLinux environment

$ source /opt/Xilinx/petalinux-v2016.1-final/settings.sh

Build

$ cd ~/git/org.eclipse.tcf.agent/agent

$ make CC=arm-xilinx-linux-gnueabi-gcc LD=arm-xilinx-linux-gnueabi-ld MACHINE=arm NO_SSL=1 NO_UUID=1

Deploy

Copy ~/git/org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug/agent to target board.

Mark as executable.

Run

Launch as root with no arguments. It will run as a foreground process (it produces no output AFAIK).

Build TCF Agent on Snickerdoodle (as root)

Get git

# apt-get update

# apt-get install git

Download source

# cd ~/git (for example)

# git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git

Build

# cd ~/git/org.eclipse.tcf.agent/agent

# make NO_SSL=1 NO_UUID=1

Deploy

# cp ~/git/org.eclipse.tcf.agent/agent/obj/GNU/Linux/arm/Debug/agent /root

Launch Debugger from SDK

From XSDK menu, Run | Debug Configurations…

In the left pane, select Xilinx C/C++ application (System Debugger).

Click the "new" button:




In the right pane, select the Target Setup tab.

Type a Name.

Select Debug Type of Linux Application Debug

Click New [Connection] button.






















Complete fields as appropriate. Use IP address for host name (probably). Leave Port at its default value.

Click OK

Select Application tab

Browse for Project Name and select your application.

Type a remote path to which to copy the executable to the target board.


Click Close or Debug as appropriate.

See also: https://wiki.eclipse.org/TCF