LPC1549如何 利用Jlink工具的J-Scope来实时观察变量,不影响CPU运行

来源:互联网 发布:集美大学网络中 编辑:程序博客网 时间:2024/05/20 04:12
 LPC1549如何 利用Jlink工具的J-Scope来实时观察变量,不影响CPU运行,速度还可以,取决于Jlink的版本型号.    工程师们不用再买示波器了,省钱又方便啊.

步骤如下:
一. Jlink工具硬件版本与软件版本,软件版本要V4.9及以上
Model comparison
J-Link Model
Max. no. of variables
Max. sampling frequency
J-Link PRO (V4 or later)100Unlimited1J-Link ULTRA+ (V4 or later)100Unlimited1J-Link PLUS (V9 or later)101 kHzJ-Link BASE (V9 or later)101 kHzJ-Link EDU (V9 or later)101 kHzOther models1050 Hz2
二. 将板载LPC_Link2调试器刷成Jlink
   为了能在MDK下调试LPC1549 xpresso v2能使用上Jlink的J-SCOPE软件功能,这里我们先借助NXP提供的工具,先配置板载LPC_Link2调试器
工具版本:LPC_Link2_Config_tool_v1_11_1
1、LPC_Link2硬件
   短接JP3(Link DFU),插入USB J5, D2亮。
[size=0.83em]图片1.png(393.05 KB, 下载次数: 0)
下载附件  [url=]保存到相册[/url]
[color=rgb(153, 153, 153) !important]2014-4-15 23:19 上传



2、运行DFUSec.exe
a、选择映像文件:JLink_LPC-Link2  debugger image
b、编成当前选择项:Program the Link2 with the currently selected
c、烧写成功完成。拔掉JP3短路帽,再插拔下J5  LINK USB 口。

三.  配置JLink电脑上的软件部分.
Getting started
    J-Scope is part of the J-Link Software and Documentation Package (JScope.exe).
Start J-Scope by double-clicking on the executable.
In the configuration dialog, select your elf-file. For most targets, the configuration does not have to be specified. If there are any problems, select your target device and configure the interface accordingly.
Click OK. The Symbol Selection Dialog opens.
Select the symbols of your application, you want to watch and analyze. Click OK to start J-Scope.
Data sampling can be started via the record-button(red dot) in the toolbar.
The configuration of elf-file and selected symbols can be saved into a J-Scope Project to be easily reused.
J-Scope Projects can be opened via the menu or simply dropping them onto the executable.
For more information about how to use J-Scope, please refer to the J-Link User Guide (UM08001).
Other models




四. 效果如下:
J-Scope - Real-Time Data Visualization

J-Scope is a software to analyze and visualize data on a microcontroller in real-time, while the target is running. It does not require features like SWO or any extra pin on the target, but uses the available standard debug port.
J-Scope can show the value of multiple variables in an oscilloscope-like style. It reads an elf file and allows selection of a number of variables to visualize. You can simply connect the target microcontroller to your J-Link, flash your application and start J-Scope.
With a few steps you can configure J-Scope, and select the symbols to be shown. The configuration can be stored in project files for easy re-use and portability.
Each symbol selected in J-Scope can be configured separately. Move the graph up and down to change the zero-base-line or change its resolution. Choose whether to visualize the symbol in the graph or only show its value in the watch panel.
Analyze the collected data, scroll through the visualized graphs, zoom in and out or save the data to a file for further analysis.
J-Scope can be used in parallel to your debugging environment and extends your IDE's debugging experience.
0 0