cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Observer
Observer
1,004 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
Reply
7 Replies
Xilinx Employee
Xilinx Employee
947 Views
Registered: ‎10-06-2016

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
Reply
Observer
Observer
921 Views
Registered: ‎01-09-2018

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
Reply
Xilinx Employee
Xilinx Employee
909 Views
Registered: ‎10-06-2016

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.
Xilinx Employee
Xilinx Employee
862 Views
Registered: ‎11-21-2019

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
Observer
796 Views
Registered: ‎01-09-2018

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
Reply
Xilinx Employee
Xilinx Employee
785 Views
Registered: ‎11-21-2019

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
Reply
Observer
Observer
744 Views
Registered: ‎01-09-2018

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
Reply