Xilinx Zynq ZC-702 开发(02)—— 软件程序调试方法

1.简介

本教程将指导您使用 SDK 调试应用程序项目,本教程中描述的调试步骤是非常基础的;有关更多信息,请参考 SDK 帮助中的调试任务。

在使用本教程之前,您应该已经创建了一个应用程序项目,并在工作区中成功地构建了它。

 

2.配置目标连接

注意:如果您计划使用本地目标 / 计算机,则不需要配置目标连接。您可以跳过这一步。

  1. 确保已连接到远程主机;
  2. 通过执行 hw_server.bat 或 hw_server.sh 文件,在远程主机上手动启动 hw_server 服务;
  3. 在 “Target Connections” 视图中,右键 “Hardware Server“ 项 -> 选择 “Add Target Connection” -> 弹出 “Target Connection Details” 对话框;
  4. 在弹出对话框的 “Target name” 文本框中指定新远程连接的名称;
  5. 可选地,选中 “Set as default target” 复选框,将此目标设置为默认;
  6. 指定远程主机上运行的 hw_server 所在的 IP 地址和端口号。默认情况下,hw_server 运行在端口 3121 上;
  7. 单击 OK 创建到指定远程主机的新目标连接。

 

3.调试应用程序

使用调试配置调试目标上的程序。如果您有一个现有的调试配置,您可以重用它。否则,必须创建一个新的调试配置来调试程序。

  1. 单击 Run -> Debug Configurations;
  2. 在配置列表中,选择 “Xilinx C/C++ application (System Debugger)” 调试配置;
  3. 单击 Debug。

 

注1:以上步骤全部 OK 时,显示的提示信息如下所示。

SDK switches to the debug perspective and starts downloading and debugging the program. To view the program output, use the STDIO Connection tab to use SDK console.

In the Debug Perspective, the processor will be stopped in the program main() function. You can perform debug tasks in this perspective.

Some of the common tasks are listed below; for more information, refer to the Debug help pages.

   * Control application debug flow - resume, suspend, step into, step over, step return and terminate the debug session
   * Set breakpoints on a program line or watchpoints on a global variable
   * Read program memories, variables, stack trace and processor registers
   * Read program function outline, dive into function or variable definitions, or view disassembly

 

注2:原文参见 Xilinx SDK 软件内置的帮助文档。

打开方法:打开 SDK -> Help -> Cheet Sheets... -> Xilinx SDK Tutorials -> How to debug a new software application 。

 

注3:hw_server 程序与 SDK 程序在同一目录。

 

注:此方法未测试成功,原因待调查。

 

转载于:https://www.cnblogs.com/dhqy/p/10751241.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值