美文网首页
20151207:xCOREDebugger and xScop

20151207:xCOREDebugger and xScop

作者: skylaugher | 来源:发表于2018-11-13 20:37 被阅读0次

一:debug

1:一定要terminate正在debug的程序才能再次下载程序:当xTAG-3上红灯亮时,表明正在debug状态。如果需要再次下载程序,那么需要按菜单run->terminate终止程序,或者console中的红色按钮终止程序,此时xTAG-3上的红灯灭,就可以再次下载程序。如果不按terminate而直接再次下载程序debug,IDE就会出问题。

2:debug下单步跟踪有时会出错。

3:注意Toggle break-point时,如果在debug状态下出现(黄底感叹号)

clip_image002.jpg

则表明此处不能设断点。正确设置的


clip_image004.jpg

4:在Debug Configurations的对话框下

clip_image006.jpg

设置stop onstartup at:可以设置第一次程序的断点。注意在大部分xmos的程序,main的作用是用于分配线程,并不作为正式的函数使用,因此在这种情况下,不能将startup设置为main。

二:xScope的配置

1:在.xn文件中添加xScope需要的资源(基本上每一个.xn文件中均已添加有了xscope的配置(类似于下面的文字))

<Link Encoding ="2 wire "Delays ="4,4" Flags =" XSCOPE ">
    <LinkEndpoint NodeId ="0" Link =" X0LD "/>
    <LinkEndpoint RoutingId ="0 x8000 " Chanend ="1"/>
</Link >

Note that whenthe link is set to 2 wire, the minimum delay is set to 4 and the flags specifythat this link is to be used for streaming debug. Setting the delay higher resultsin the output of packets used by xscope being less frequent. The RoutingId isalso important as the value 0x8000 specifies to the tools that this is aspecial link used for xscope.

When used in amulti-tile system the NodeId of the package which is connected to the XSYSconnector must be specified. The tools set up the links with the other tiles butthey need to know which specific device has the external link to be connected tothe XTAG-2.

在源文件中包含头文件:include <xscope.h>

2:注册xscope需要检测的变量,有两种方式,一种是config.xscope文件;一种用xscope_register注册函数。

注册函数示例:

port micL ;
port micR ;
void xscope_user_init ( void ) {
    xscope_register(2,
    *XSCOPE_CONTINUOUS, " Microphone Left ", XSCOPE_UINT , "mV",*
    *XSCOPE_CONTINUOUS, " Microphone Right ", XSCOPE_UINT , "mV"*
    );
}

int main () {
    while (1) {
      int sample ;
      micL :> sample ;
      xscope_uint (0, sample );             //0对应register的第一行:Microphone Left
      micR :> sample ;
      xscope_uint (1, sample );             //1对应register的第二行:Microphone Right
    }     
}

Config.xscope xscope配置文件

<xSCOPEconfigioMode="none" enabled="true">//注意type和datatype中没有“xscope_”的前缀
   <Probe name="Sin Value" type="CONTINUOUS"datatype="FLOAT" units="Value"enabled="true"/>
   <Probe name="Cos Value" type="CONTINUOUS" datatype="FLOAT"units="Value" enabled="true"/>
   <Probe name="Tan Value" type="CONTINUOUS"datatype="FLOAT" units="Value"enabled="true"/>
</xSCOPEconfig>

3:配置文件中的说明

Figure 28 summarizes the different types ofprobes that can be configured. Only continuous probes can be displayedreal-time.

Probe Type DataType Scope View Example
XSCOPE_CONTINUOUS XSCOPE_UINT Line graph. May Voltage levels of a motor
XSCOPE_INT be interpolated controller
XSCOPE_FLOAT
XSCOPE_DISCRETE XSCOPE_INT Horizontal lines Buffer levels of audio
CODEC
XSCOPE_STATEMACHINE XSCOPE_UINT State machine Progression of protocol
XSCOPE_STARTSTOP XSCOPE_NONE Start/stop bars Recorded function entry
XSCOPE_UINT and exit, with
XSCOPE_INT optionallabel value
XSCOPE_FLOAT

4:Makefile中加上-fxscope.(现在在例程中没有看到加-fxscope呢?)
(1). Open the Makefile for yourproject.
(2). Locate the XCC_FLAGS_configvariable for your build configuration, for example XCC_FLAGS_Release.
(3). Add the option -fxscope.

5:设置:

在run configurations中的xscope中mode可设置Real-Time Mode或Offline Mode

三:xScope的界面补充说明(下方加红框的可以用鼠标的左右按键加以调整)

clip_image008.jpg

相关文章

  • 20151207:xCOREDebugger and xScop

    一:debug 1:一定要terminate正在debug的程序才能再次下载程序:当xTAG-3上红灯亮时,表明正...

  • 20151207

    有人曾经这样描述失去一个人的感觉:“你走了也好,不然我总担心你要走”,喜欢一个人需要做很多努力,但放弃也只是一瞬间的事。

  • 成就达成——进行中

    20151207 自己去看一场喜剧电影 20151222 自己飞往南宁

  • 早晨(20151207)

    停更了6天 没有借口,解析其实真的很无力,只能说自己对自己的要求还不够严格! 今天我调的闹钟是5:30,闹钟响了一...

  • 宝日记 20151207

    早上爬到厕所,小叶子正在看试纸 "是不是清楚多了?" "不知道" 拿出前阵子的一叠试纸 "确实是" 我载着媳妇往医...

  • 曾艳芬不正经日报の1208期

    《撸力周新闻》20151207-20151213 《撸力周新闻》收集一周内关于snh48曾艳芬的咨询,内容主要以微...

  • 原版书的旅程05(20151207-20151213)

    2015-12-07 夏洛第25天 跳听读了两遍 the big snowball,第二遍是我强迫读的,显然他...

  • ios-梳理-常用软件之iFunBox&iTerm2&xScop

    常用软件系列 1,iFunBox 这是一款做逆向工程使用的工具,iPhone手机越狱之后可以查看系统所有的文件。 ...

  • 20151207 一天一画 容不得半点含糊

    #一天一画# 热爱的更热爱,讨厌的更讨厌,犹豫的更明确,多余的更走远。容不得一点含糊。晚安~

  • 陈尚忠:沟通的意义决定于对方的回应 20151207

    一想二干三成功,一等二靠三落空。 沟通的意义决定于对方的回应 。自己说什么不重要,对方接受什么才重要。话有很多种方...

网友评论

      本文标题:20151207:xCOREDebugger and xScop

      本文链接:https://www.haomeiwen.com/subject/rbqrfqtx.html