Xilinx Zynq ZC-702 开发(02)—— 通过 Xilinx SDK 调试 Linux 应用

远程调试环境由 PC 上运行的 System Debugger(集成在 Xilinx SDK 中) 和 Zynq 板上运行的 Linux TCF Agent 共同构成,

两者通过 TCP 连接,架构图如下图所示:

注1:TCF -> Target Communication Framework;

注2:TCF 集成在 PetaLinux 中,此功能需配合 PetaLinux 使用。

操作步骤(以调试 Helloworld 程序为例):

1.新建 Linux 应用 File -> New -> Application Project;

Project name 输入 Hello  ->  OS Platform 选择 linux  -> Finish。

2.设置 Linux TCF Agent

在 Target Connections 窗口中右键单击 Linux TCF Agent  -> 点击 New Target;

注:如果没有 Target Connections 窗口,将视图恢复成默认布局即可(菜单栏点击 Window -> Perspective -> Reset Perspective...)

在弹出的 Target Connection Details 窗口中 Host 输入 Zynq 板 IP 地址 -> 点击 OK 按钮 。

 右键 Hello.elf -> Debug As -> Debug Configurations...

在弹出的 Debug Configurations 窗口中,右键 Xilinx C/C++ application(System Debugger) -> New

弹出窗口的 Target Setup 页 Connection 项选择之前设置的 Linux TCF Agent(Test)

弹出窗口的 Application 页 Project Name 项选单击 Browser... 按钮选择 Hello

 

弹出窗口的 Application 页 Remote File Path 项输入 /tmp/Hello.elf

点击 Debug 按钮 -> 弹出窗口 Confirm Perspective Switch 中点击 Yes 按钮,

进入调试,程序停在 main() 函数入口处,如下图所示:

猜你喜欢

转载自www.cnblogs.com/dhqy/p/10775156.html