硬汉嵌入式论坛

 找回密码
 立即注册
查看: 6400|回复: 7
收起左侧

[开发工具] jlink 的 SystemView 学习使用

[复制链接]

28

主题

278

回帖

362

积分

高级会员

积分
362
发表于 2018-4-1 10:48:52 | 显示全部楼层 |阅读模式
本帖最后由 suozhang 于 2018-4-1 11:01 编辑

1、今天 看到 嵌入式 周报里 ,SystemView 对 FreeRTOS V10 进行了 支持 界面 蛮酷 的,打算实验一下 2、在 家里 找了 一个  都是灰土 的板子  STM32F103ZET6
3、找了一个 V9 jlink ,
4、电脑 已经装了 keil5
5、下载了 SystemView V2.52a软件包,
6、给板子先 下载了一个 闪灯 的程序 ,表示板子 可以用 !
7、 SystemView V2.52a 官方手册里 有说明  怎么 添加  文件 使我 原来的 代码  支持  SystemView

QQ截图20180401105805.png
回复

使用道具 举报

28

主题

278

回帖

362

积分

高级会员

积分
362
 楼主| 发表于 2018-4-1 10:52:31 | 显示全部楼层
本帖最后由 suozhang 于 2018-4-1 14:45 编辑

1、又下载了 jlink  最新的驱动   JLink_Windows_V630j.exe2、根据 手册 上 :
2、根据 用户指导手册 里  第  5.1 章节 讲述内容 ,使用  SystemView 前提 条件 如下:

5.1 Prerequisites
   To use SEGGER SystemView the target source modules of the SystemView package need to be added to the application make file or project.The SEGGER SystemView package is available at https://www.segger.com/systemview.html.
   To use continuous real-time tracing the following additional items are required:


• An ARM Cortex-M or Renesas RX target.
• A J-Link Debug Probe.

For an easy start it is recommended to use SEGGER embOS V4.12 or later, which already includes the SystemView integration.


5.1 前提条件
  要使用SEGGER SystemView,需要使用SystemView包的目标源模块。添加到应用程序文件或项目中。
   要使用连续实时跟踪,需要下列附加项:
  • 一个 ARM Cortex-M  或者  Renesas RX 的目标
  • 一个jlink 调试工具
为了更容易开始,最好使用  embOS V4,12 的更高版本 ,它已经 集成了 SystemView 。 因为我 要 追踪 FreeRTOS ,  这句话 没啥意义!

3、具体 添加  源文件 到 我 自己 的工程里 ,即 :

5.1.1 SEGGER SystemView target implementation modules

The following files are part of the SEGGER SystemView target implementation. We recommend to copy all files into the application project and keep the given directory structure.

以下文件是SEGGER SystemView目标实现的一部分。我们建议将所有文件复制到应用程序项目中,并保持给定的目录结构。


QQ截图20180401144150.png

SystemView 用户指导手册 (UM08027).pdf

1.31 MB, 下载次数: 143

回复

使用道具 举报

28

主题

278

回帖

362

积分

高级会员

积分
362
 楼主| 发表于 2018-4-1 10:53:38 | 显示全部楼层
本帖最后由 suozhang 于 2018-4-1 14:45 编辑

3、C:\Users\admin\Desktop\QQ截图20180401105114.png界面 挺酷
QQ截图20180401105114.png
回复

使用道具 举报

28

主题

278

回帖

362

积分

高级会员

积分
362
 楼主| 发表于 2018-4-1 15:00:06 | 显示全部楼层
这些源文件  在 安装 目录下 即可找到 :C:\Program Files (x86)\SEGGER\SystemView_V252a\Src

5.2 Including SEGGER SystemView in the application

       To use SEGGER SystemView, the target implementation modules must be added to the target application. Copy the sources from /Config/ and /SEGGER/, as well as the SEGGER_SYSVIEW_Config_[SYSTEM].c and SEGGER_SYSVIEW_[OS].c/.h which match your system and OS to the application source and include them in the project.

Example
        For a system with embOS on a Cortex-M3 include SEGGER_SYSVIEW_Config_embOS.c, SEGGER_SYSVIEW_embOS.c and SEGGER_SYSVIEW_embOS.h. For a system with no OS or no instrumented OS on a Cortex-M3 include SEGGER_SYSVIEW_Config_NoOS.c only.

5.2 在应用程序中包括SEGGER SystemView。

          要使用SEGGER SystemView,必须将目标实现模块添加到目标应用程序中。复制源文件 从SystemView 软件C:\Program Files (x86)\SEGGER\SystemView_V252a\Src/Config/ and /SEGGER/,以及SEGGER_SYSVIEW_Config_[SYSTEM].c和SEGGER_SYSVIEW_[OS].c/.h将系统和操作系统与应用程序源匹配,并将其包含在项目中。

例子


        对于包含在Cortex-M3上的embOS的系统,包括SEGGER_SYSVIEW_Config_embOS.c, SEGGER_SYSVIEW_embOS.c and SEGGER_SYSVIEW_embOS.h. 对于一个没有操作系统的系统,或者在Cortex-M3上没有检测的操作系统,仅仅包含SEGGER_SYSVIEW_Config_NoOS.c。


回复

使用道具 举报

28

主题

278

回帖

362

积分

高级会员

积分
362
 楼主| 发表于 2018-4-1 15:16:00 | 显示全部楼层
本帖最后由 suozhang 于 2018-4-1 15:17 编辑

5.3 Initializing SystemView
The system information are sent by the application. This information can be configured via defines in SEGGER_SYSVIEW_Config_[SYSTEM].c. Add a call to SEGGER_SYSVIEW_Conf() in the main function to initialize SystemView.

5.3 初始化SystemView

系统运行情况信息是由应用程序发送。可以通过在SEGGER_SYSVIEW_Config_[SYSTEM].c中定义此信息。在main函数中添加一个调用SEGGER_SYSVIEW_Conf()来初始化SystemView。



The generic part of SEGGER SystemView is now ready to monitor the application. When using embOS V4.12 or later with profiling enabled, SystemView events for ISRs, Task, and API calls are generated. When not using embOS, appropriate events must be generated by the application.

Download the application to the target and let it run. As long as the SystemView App is not connected, and SEGGER_SYSVIEW_Start is not called, the application will not generate SystemView events. When SystemView is connected or SEGGER_SYSVIEW_Start is called it will activate recording SystemView events.

SEGGER SystemView的通用部分现在可以监视应用程序了。当使用 embOS V4.12 或者之后的版本,将生成用于ISRs、任务和API调用的SystemView事件。当不使用embOS时,应用程序必须生成适当的事件。看到这里 ,用 FreeRTOS 是不是 得 在 自己 的应用 程序里 添加 一些 触发事件,这就尴尬了

将应用程序下载到目标并让它运行。只要SystemView应用程序没有连接,并且不调用SEGGER_SYSVIEW_Start,应用程序就不会生成SystemView事件。当SystemView连接或SEGGER_SYSVIEW_Start时,它将激活记录系统视图事件。




QQ截图20180401151552.png
回复

使用道具 举报

28

主题

278

回帖

362

积分

高级会员

积分
362
 楼主| 发表于 2018-4-1 15:21:01 | 显示全部楼层
5.4 Start and stop recording
When the data is read continuously with SystemView, the recording is started and stopped automatically by SystemView. While SystemView is not recording the target system will not generate SystemView events.
For single-shot recording SEGGER_SYSVIEW_Start has to be called in the application to activate recording SystemView events. Events are recorded until the SystemView buffer is filled or SEGGER_SYSVIEW_Stop is called.
For post-mortem analysis SEGGER_SYSVIEW_Start has to be called in the application to activate recording SystemView events. Events are recorded until SEGGER_SYSVIEW_Stop is called. Older events are overwritten when the SystemView buffer is filled.

5.4启动和停止记录。

当系统视图连续读取数据时,系统视图会自动启动和停止记录。虽然SystemView没有记录目标系统,但不会生成SystemView事件。

在应用程序中,需要调用单个记录SEGGER_SYSVIEW_Start来激活记录系统视图事件。事件被记录下来,直到系统视图缓冲区被填满或调用SEGGER_SYSVIEW_Stop。

对于死后分析,在应用程序中必须调用SEGGER_SYSVIEW_Start来激活记录系统视图事件。事件被记录,直到调用SEGGER_SYSVIEW_Stop。当系统视图缓冲区被填充时,旧事件被覆盖。


回复

使用道具 举报

28

主题

278

回帖

362

积分

高级会员

积分
362
 楼主| 发表于 2018-4-1 15:49:31 | 显示全部楼层
5.5 The SystemView system information config
The included files SEGGER_SYSVIEW_Config_[SYSTEM].c provide the configuration of SystemView and can in most cases be used without modification.

5.5系统视图系统信息配置。

包括文件SEGGER_SYSVIEW_Config_(系统)。c提供了SystemView的配置,在大多数情况下可以不用修改就可以使用。


回复

使用道具 举报

28

主题

278

回帖

362

积分

高级会员

积分
362
 楼主| 发表于 2018-4-1 16:00:53 | 显示全部楼层
网上 有个 译文  比我 好多了 的 ,我 不翻译  了 直接看 译文
https://blog.csdn.net/bjr2016
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-8-12 07:01 , Processed in 0.047770 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表