systemview简介

Preface

我在上一篇文章中提到了我基于esp8266上搭一个服务器(其实就是一个小任务,负责通过网络与客户端进行数据交互),在这个服务器的基础之上,要安装一个系统监视程序。这个监视程序负责将目标板上的数据收集并发送给电脑客户端(上位机)。而这个上位机就是

systemview

PS:systemview对于嵌入式开发有很多的好处,可以让你对系统有更深的认识

1.功能

1.1overview

上图就是systemview的界面。它可以从多个维度对目标系统进行分析。让你对系统有更全的认识。而且我觉得以UI的形式展现系统的运行状态给人一目了然的感觉,让你对系统有直观的了解,我觉得这是一种趋势。我发现很多半导体厂商还有一些中间件的厂商开发的软件(IDE、上位机)会有很多各式各样的UI功能,目的就是将一些系统的一些特性通过界面表示出来,以达到快速调试以及解决复杂问题。特别是如果目标系统带有操作系统,那这样分析更加的复杂,这个时候systemview的作用就凸显出来了。

All in all,这个工具是非常不错的。

1.2 function chart

我觉得你看到systemview的功能表,你肯定会迫不及待的想把这个中间件集成到你的项目中去了。

1.3 强调

我现在看到网上好多人说,systemview免费版本只能够记录1百万个事件,这是不对的。

可能之前的版本会有这种情况,但是最新版本V3.3没有这个限制。只要是没有用于商业用途,那可肯定是可以的。

口说无凭,看下官方怎么说的吧,实在是太多人说有限制。不然也没必要

There are no feature limitations with a non-commercial license. SystemView enables unlimited recording and comes with features for better analysis, search, and filtering.

而且,systemview是跨平台的,看看segger的情怀,不仅免费而且跨平台。

2.什么是systemview

SystemView is a toolkit for visual analysis of any embedded system. SystemView gives complete insight into an application, to gain a deep understanding of the runtime behavior, going far beyond what a debugger is offering. This is particularly advantageous when developing and working in complex systems with multiple tasks and events.

SystemView consists of two parts:

• The PC visualization SystemView Application

• Code that gathers telemetry data on the target system.

The SystemView application allows analysis and profiling of the behavior of an embedded system. It records the telemetry data generated by the embedded system and visualizes that information in a variety of ways. The recording can be saved to a file for later analysis or for documentation of the system.

The telemtery data is recorded through the debug interface, through a network connection, or over a serial line. When recording through the debug interface, no additional hardware (and additional pinning) is required to use SystemView. It can be used on any system that allows debug access.

With a SEGGER J-Link and its Real Time Transfer (RTT) technology, SystemView can continuously record, analyze, and visualize data in real time.

SystemView makes it possible to analyze which interrupts, tasks, and software timers have executed, how often, when exactly and how much time they have used. It sheds light on what exactly happened, in which order, which interrupt has triggered which task switch, which interrupt and task has called which API function of the underlying modules.

Cycle-accurate profiling can be performed and performance markers can be added in the system to measure timings.

SystemView can be used to verify that the embedded system behaves as expected and can be used to find problems and inefficiencies, such as superfluous and spurious interrupts, unexpected task changes, or badly-chosen task priorities. It can be used with any (RT)OS which is instrumented to call SystemView event functions, but also in systems without an instrumented RTOS or without any RTOS at all, to analyze interrupt execution and to time user functionality like time-critical subroutines.

3.它怎么工作

On the target side a small software module, containing SYSTEMVIEW and RTT, must be included. The SYSTEMVIEW module collects and formats the monitor data and passes it to RTT.

The target system calls SYSTEMVIEW functions in certain situations, such as interrupt start and interrupt end, to monitor events. SystemView stores these events together with a configurable, high-accuracy timestamp. Timestamps can be as accurate as 1 CPU cycle, which equates to 5 ns on a 200 MHz CPU.

The RTT module stores the data in the target buffer, which enables continuous recording, as well as single-shot recording and post-mortem analysis.

The recorder interface reads the data from the RTT buffer and sends it to the SystemView Application.

recorder interface 可以是调试接口、串口、网络。

由此可以看出systemview记录任务的事件是非常精确的。

4.目标板要求

The combined ROM size of RTT and the SYSTEMVIEW modules is less than 2 KByte. For typical systems, about 600 bytes of RAM are sufficient for continuous recording. For system-triggered recording the buffer size is determined by the time to be recorded and the amount of events. No other hardware is required. The CPU requires less than 1 us for typical events (based on a 200 MHz Cortex-M4 CPU), which results in less than 1% overhead in a system with 10,000 events per second. Since the debug interface (JTAG, SWD, FINE, …) is used to transfer the data, no additional pins are required.

我觉得这个要求对于绝绝大部分目标板卡是完全可以满足的。

5.什么cpu可以使用systemview

SystemView can be used on any CPU. Continuous real-time recording can be carried out on any system supported by J-Link RTT technology or using a network connection or serial line. RTT requires the ability to read memory via the debug interface during program execution which is generally supported in ARM Cortex-M0, M0+, M1, M3, M4, M7, M23, M33 processors as well as all Renesas RX devices.

On systems which are not supported by the RTT technology the buffer content can also be read manually through the debug probe when the system is halted, which allows single-shot recording until the buffer is filled and post-mortem analysis to capture the latest recorded data. Single-shot and post-mortem recording can be triggered by the system to be able to control when a recording starts and stops.

所有cpu都可以使用,只是有些cpu不可以用调试接口,原因是不是所有的cpu都集成相应的调试接口模块(RTT requires memory access on the target while the target is running.)

总结

总的来说systemview是一个非常好用的一个系统分析调试软件。

用它来辅助开发嵌入式程序是非常好用的。

希望这个工具能够提高你的嵌入式开发能力吧

おすすめ

転載: blog.csdn.net/qq_46359697/article/details/120364165