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: 
Highlighted
Visitor oliver-fhg
Visitor
220 Views
Registered: ‎08-08-2019

Debugging with Xilinx Software Command-Line Tool (XSCT)

Jump to solution

I am trying to debug an application on Mars ZX3 module (XC7Z020 + ARM® dual-core Cortex™-A9) with Xilinx Plattform Cable USB II. Starting a debug session (configuration in the attachment) causes a "Connection to Board Failed" error message: 

Unknown Error Occured
Cable is not powered-on

at com.xilinx.sdk.targetmanager.internal.TM.isFPGAConfigured(TM.java:368)
at com.xilinx.sdk.debug.core.XilinxAppLaunchConfigurationDelegate.isFpgaConfigured(XilinxAppLaunchConfigurationDelegate.java:409)
at com.xilinx.sdk.debug.core.XilinxAppLaunchConfigurationDelegate.launch(XilinxAppLaunchConfigurationDelegate.java:303)
at com.xilinx.sdk.debug.ui.XilinxAppLaunchDelegateWrapper.launch(XilinxAppLaunchDelegateWrapper.java:31)

However, I can run a debug session using XSCT: 

xsct% connect -host localhost -port 3121
tcfchan#1
xsct% targets
1 APU
2 ARM Cortex-A9 MPCore #0 (Running)
3 ARM Cortex-A9 MPCore #1 (Running)
4 xc7z020
xsct% target 2
xsct% rst
Info: ARM Cortex-A9 MPCore #0 (target 2) Stopped at 0xffffff28 (Suspended)
Info: ARM Cortex-A9 MPCore #1 (target 3) Stopped at 0xffffff34 (Suspended)
xsct% fpga {S:\xxx\core_wrapper_hw_platform_2\core_wrapper.bit}

initializing
0% 0MB 0.0MB/s ??:?? ETA
...
100% 3MB 0.0MB/s 01:21
xsct% loadhw {S:\xxx\core_wrapper_hw_platform_2\system.hdf}
core_wrapper_0
xsct% source {S:\xxx\core_wrapper_hw_platform_2\ps7_init.tcl}
xsct% ps7_init
xsct% ps7_post_config
xsct% dow {S:\xxx\test\Debug\test.elf}

Downloading Program -- S:/xxx/test/Debug/test.elf
section, .text: 0x00100000 - 0x0013af7f
section, .init: 0x0013af80 - 0x0013af97
section, .fini: 0x0013af98 - 0x0013afaf
section, .rodata: 0x0013afb0 - 0x0014b703
section, .data: 0x0014b708 - 0x0015c82b
section, .eh_frame: 0x0015c82c - 0x0015c82f
section, .mmu_tbl: 0x00160000 - 0x00163fff
section, .ARM.exidx: 0x00164000 - 0x00164007
section, .init_array: 0x00164008 - 0x0016400b
section, .fini_array: 0x0016400c - 0x0016400f
section, .bss: 0x00200000 - 0x2a48f28b
section, .heap: 0x2a48f28c - 0x2a58f28f
section, .stack: 0x2a58f290 - 0x2a690a8f

0% 0MB 0.0MB/s ??:?? ETA
...
100% 0MB 0.0MB/s 00:21

Setting PC to Program Start Address 0x00100000
Successfully downloaded S:/xxx/test/Debug/test.elf
xsct% bpadd -addr &main
0
xsct% Info: Breakpoint 0 status:
target 2: {Address: 0x100cf0 Type: Hardware}
xsct% targets
1 APU
2* ARM Cortex-A9 MPCore #0 (Suspended)
3 ARM Cortex-A9 MPCore #1 (Suspended)
4 xc7z020
xsct% con
Info: ARM Cortex-A9 MPCore #0 (target 2) Running
xsct% targets
1 APU
2* ARM Cortex-A9 MPCore #0 (Running)
3 ARM Cortex-A9 MPCore #1 (Suspended)
4 xc7z020
xsct% rrd
r0: 00000000 r1: 175e27dc r2: 2a48f28c
r3: 00000002 r4: 00000003 r5: 0000001e
r6: 0000ffff r7: f8f00000 r8: 0000767b
r9: ffffffff r10: 00000000 r11: 00000000
r12: 00000000 sp: 2a690290 lr: 0012d738
pc: 0012d75c cpsr: 800000d7 usr
fiq irq abt
und svc mon
vfp cp15 Jazelle
gpv_qos301_cpu gpv_qos301_dmac gpv_qos301_iou
gpv_trustzone l2cache mpcore

xsct% Info: ARM Cortex-A9 MPCore #0 (target 2) Stopped at 0x100cf0 (Breakpoint)
main() at ../src/main.c: 15
15: int main(){

 

So from my point of view I am doing the same as the debug session is supposed to do. But for some reason debugging via XSCT seems to work, whereas debugging from the GUI fails.

1) Can anyone think of a reason why this is happening?

2) Is it possible to investigate in more detail what happens, when I start a debug session pressing the bug button in the xilinx SDK?

 

DebugConfig1.png
DebugConfig2.png
DebugConfig3.png
0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
180 Views
Registered: ‎10-06-2016

Re: Debugging with Xilinx Software Command-Line Tool (XSCT)

Jump to solution

Hi  @oliver-fhg 

The XSCT debug has been performed using XSDB while the GUI mode seems that is being done using GDB. Did you test with Xilinx System Debugger? When you use it the XSDB script used by the tool is being printed into the SDK log window so you should have some visitibiliy of what is happening. Additionally I would suggest to also launch a debug configuration with System Debugger in "Attach running target" type which basically just runs the connect command.

 

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
2 Replies
Moderator
Moderator
181 Views
Registered: ‎10-06-2016

Re: Debugging with Xilinx Software Command-Line Tool (XSCT)

Jump to solution

Hi  @oliver-fhg 

The XSCT debug has been performed using XSDB while the GUI mode seems that is being done using GDB. Did you test with Xilinx System Debugger? When you use it the XSDB script used by the tool is being printed into the SDK log window so you should have some visitibiliy of what is happening. Additionally I would suggest to also launch a debug configuration with System Debugger in "Attach running target" type which basically just runs the connect command.

 

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.
Visitor oliver-fhg
Visitor
149 Views
Registered: ‎08-08-2019

Re: Debugging with Xilinx Software Command-Line Tool (XSCT)

Jump to solution

Thanks for pointing out the difference between those two debuggers, I missed this point. I selected XSCD in the GUI mode and now I observe the same behaviour like using XSCT tool.

0 Kudos