定时器应用与调试软件编写指南.pdfVIP

  • 0
  • 0
  • 约2.36万字
  • 约 20页
  • 2026-01-29 发布于北京
  • 举报

定时器和调试的软件编写

介绍

本实验将指导您完成编写一个利用CPU私有定时器的软件应用程序的过程。您将参考SDK中的定时器

API来创建和调试该软件应用程序。您将开发的应用程序将拨码开关的值,并在LED上递增计数。当

按下中间的按钮时,应用程序将。

目标

完成本实验后,您将能够:

•在轮询模式下使用CPU的私有定时器

•使用SDK调试器设置断点并查看变量和内存的内容

步骤

本实验分为几个步骤,每个步骤包括概述性陈述,后续详细指令的信息。请按照这些详细指令逐步完成实验。

本实验包含4个主要步骤:在Vivado中打开项目,创建SDK软件项目,验证硬件操作,并启动调试器调试设计。

设计描述

您将使用在实验4中创建的硬件设计来使用CPU的私有定时器(见图1)。您将开发用于它的代码。

图1.从上一个实验更新的设计

本实验的一般流程

步骤1:步骤2:步骤3:步骤4:

打开创建一个验证启动

项目在SDK操作在调试器

Vivado软件硬件

项目

SoftwareWritingforTimerandDebugging

Introduction

Thislabguidesyouthroughtheprocessofwritingasoftwareapplicationthatutilizestheprivatetimerof

theCPU.Youwillrefertothetimer’sAPIintheSDKtocreateanddebugthesoftwareapplication.The

applicationyouwilldevelopwillmonitorthedipswitchvaluesandincrementacountontheLEDs.The

applicationwillexitwhenthecenterpushbuttonispressed.

Objectives

Aftercompletingthislab,youwillbeableto:

•UtilizetheCPU’sprivatetimerinpolledmode

•UseSDKDebuggertosetbreakpointsandviewthecontentofvariabandmemory

Procedure

Thislabisseparatedintostepsthatconsistofgeneraloverviewstatementsthatprovideinformationon

thedetailedinstructionsthatfollow.Followthesedetailedinstructionstoprogressthroughthelab.

Thislabcomprises4primarysteps:OpentheprojectinVivado,createaSDKsoftwareproject,verify

operationinhardware,andlaunchthedebuggeranddebugthedesign.

DesignDescription

Youwillusethehardwaredesigncreatedinlab4touseCPU’sprivatetimer(seeFigure1).Youwill

developthecodetouseit.

Figure1.DesignupdatedfromPreviousLab

GeneralFlowforthisLab

Step1:Step2:

文档评论(0)

1亿VIP精品文档

相关文档