UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer mve.recalm
Observer
470 Views
Registered: ‎01-09-2018

Using XSCT for Linux Agent TCF connection

Hey guys,

is there any way to start a linux agent TCF debug session over XSCT? For standalone applications you can easily run the launch scripts that are automatically generated. For linux agent connection I cannot find any hint unfortunately.

Best regards

Marc

0 Kudos
7 Replies
Moderator
Moderator
413 Views
Registered: ‎10-06-2016

Re: Using XSCT for Linux Agent TCF connection

Hi @mve.recalm 

Does not SDK log print any XSDB script to connect to TCF server, when launched through the GUI?

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Observer mve.recalm
Observer
387 Views
Registered: ‎01-09-2018

Re: Using XSCT for Linux Agent TCF connection

Hi @ibaie ,

unfortunately there is no output at all in the SDK output and I also cannot find any XSDB script. The outputs are just generated using a standalone debug configuration but not with the linux agent debug option.

Best regards

Marc

0 Kudos
Moderator
Moderator
375 Views
Registered: ‎10-06-2016

Re: Using XSCT for Linux Agent TCF connection

Hi @mve.recalm 

I was just testing it on my side and talking with the developers and I can confirm that this features is no implemented in the tool. So basically the only way to debug through Linux TCF agent is using the GUI in SDK.

Regards

 


Ibai
Don’t forget to reply, kudo, and accept as solution.
Highlighted
Xilinx Employee
Xilinx Employee
328 Views
Registered: ‎11-21-2019

Re: Using XSCT for Linux Agent TCF connection

XSDB (or XSCT) does support debugging through Linux TCF agent. For example:

xsdb% connect -host my-linux-host -port 1534
tcfchan#1
xsdb% process start -stop-at-entry /bin/ls
{} {Name /bin/ls CanTerminate 1 Attached 1 StdInID VS15 StdOutID VS16 StdErrID VS17 ID P10443}
xsdb% Info: P10443.10443 (target 8) Stopped at 0x7f92b9f68090 (Suspended)
xsdb% ta
1 P10443
2 P10443.10443 (Suspended)
xsdb% ta 2
xsdb% bt
0 0x7f92b9f68090 _start()
xsdb%

 

I'm not sure if "process" command is documented, but you can look into Tcl source code of the function in <XSDK dir>/scripts/xsct/xsdb.tcl.

In general, all TCF agent functionality is available in XSDB, it is just matter of finding or writing right Tcl script.

Observer mve.recalm
Observer
262 Views
Registered: ‎01-09-2018

Re: Using XSCT for Linux Agent TCF connection

Dear @eugenet 

thank you very much for this interesting post. Besides this: is it also possible to start a linux application over the command line within a running QEMU session by this? I am able to connect from XSCT to QEMU and read the targets, but unfortunately i get an error when I am trying to download the .elf file. 

gdbremote connect localhost:9000

target 3

dow hello_world.elf

results in "invalid argument" error. When using the connect -host localhost -port 1534 command I get no feedback at all and QEMU session hangs.

Best regards

Marc

 

0 Kudos
Xilinx Employee
Xilinx Employee
251 Views
Registered: ‎11-21-2019

Re: Using XSCT for Linux Agent TCF connection

If you connect to QEMU with gdbremote command, it starts a "bare-metal" debug session.

A Linux application will not work on bare-metal, it will crash the emulation.

Such session can be used to download and debug Linux kernel, but not a Linux application.

You need to configure QEMU to boot Linux. Configure Linux to start networking and TCF Agent.

Then you can connect XSCT to TCF Agent using IP address of the emulated QEMU machine, and debug a Linux application same way as with real machine.

 

 

0 Kudos
Observer mve.recalm
Observer
210 Views
Registered: ‎01-09-2018

Re: Using XSCT for Linux Agent TCF connection

Dear @eugenet 

thank you for your fast reply. Alright I understood that gdbremote does not work in that way. Is there any description on how to configure QEMU to connect over TCF? Does a simple static IP config work?

In additon I understand now that the "process start" command runs the linux application under certain constraints. But how can you transfer the application with xsct in the first place? 

Best regards

Marc

0 Kudos