如何使用Xilinx上的SDK调试C程序? [英] How to debug a C program using SDK on xilinx?

查看:993
本文介绍了如何使用Xilinx上的SDK调试C程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Atlys spartan 6 xc6slx45 ,我必须调试此代码:

I'm using an Atlys spartan 6 xc6slx45,I have to debug this code :

1-#include "stdio.h"
2-int main (void)
3-{
4-// Initialization of the necessary variables
5-int i,j,k;
6-// Initialization of source A and B 4x4 matrices and result C matrix
7-int a[4][4]={ {1,2,3,4},
8-{1,2,3,4},
9-{1,2,3,4},
10-{1,2,3,4}};

11-int b[8][8]={ {1,2,3,4},
12-{1,2,3,4},
13-{1,2,3,4},
14-{1,2,3,4}};

15-int c[8][8]={ {0,0,0,0},
16-{0,0,0,0},
17-{0,0,0,0},
18-{0,0,0,0}};

19-xil_printf("‐‐ Entering main() ‐‐\r\n");
20-for (i=0; i<4; i++ )
21-{
22-for (j=0; j<4; j++)
23-{
24-for(k=0; k<4; k++)
25-{
26-c[i][j]=c[i][j]+a[i][k]*b[k][j];
27-}
28-}
29-}
30-for (i=0; i<4; i++ )
31-{
32-for (j=0; j<4; j++)
33-{
34-xil_printf("%d ",c[i][j]);
35-}
36-xil_printf("\n\r");
37-}
38-return 0;
39-}

我添加了一个切换到 5, 7,11,15,26 。我去了运行 - >调试配置 - > Xilinx C / C ++应用程序(GDB) ---> 构建配置:调试然后按调试按钮。我收到这个错误:

I add a toggle to the 5,7,11,15,26. I went to Run-->Debug Configurations --> Xilinx C/C++ application(GDB) ---> Build configurations:Debug then I pressed Debug button. I got this error :

No source available for "_start()".
Target failed:Target is not responding(timeout).


推荐答案

不幸的是,这是真正令人讨厌的SDK错误之一已经存在了很长时间,如果你在这里阅读文件:
SDK限制常见问题

Unfortunately this is one of those truly annoying SDK bugs that has been around for a long time, if you read the document here: SDK Limitations FAQ

您将找到一个描述SDK限制的部分: p>

You will find a section that describes one of the limitations of the SDK:


当拆卸视图打开时,Xilinx C / C ++调试器(GDB)调试器挂起。

关闭所有的反汇编窗口,然后重试。

Close all your disassembly windows and try again.

另一件可能导致问题的事情是,您有太多的断点,尝试在启动新的调试会话之前删除它们并重置CPU。

One other thing that can cause problem is that you have too many breakpoints, try to remove them and reset the CPU before starting a new debug session.

希望它有帮助!

这篇关于如何使用Xilinx上的SDK调试C程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆