DS-5簡介

ce123發表於2011-07-14

DS-5簡介

 

1 DS-5 偵錯程式... 3

概述... 3

DS-5 應用程式版... 3

DS-5 Linux & 專業版... 4

5.5版本中的新功能... 4

主要特性... 4

專業的端到端偵錯程式... 4

高階會話控制& 系統檢視... 5

非侵入式的跟蹤分析... 5

Linux 相關... 6

高效率特徵... 6

相容的除錯工具... 7

DSTREAM™ High-Performance Debug and Trace. 7

RVI™ Run-Control Debug Unit 7

1.1DS-5 偵錯程式: 會話控制... 8

除錯會話配置... 8

除錯控制檢視... 8

Source Code & Assembly Stepping. 9

Command Line Interface & Scripting. 9

Breakpoints & Data Watchpoints 10

1.2 DS-5 偵錯程式: 跟蹤... 11

非侵入式跟蹤... 11

Flexible Trace Visualization. 11

Trace-Based Profiling. 12

1.3 DS-5 偵錯程式: 系統檢視... 13

暫存器檢視... 13

儲存器,變數& 表示式 檢視... 13

螢幕檢視& Semihosting. 14

1.4 DS-5 偵錯程式: Linux 相關... 15

Context Awareness. 15

遠端系統管理... 15

模組檢視... 16

2 Streamline. 16

2.1充分利用ARM 支援的系統... 16

2.2益處... 17

程式碼執行速度更快 負載均衡 資源效率... 17

基於時間的分析: 瞭解簡單分析背後的內容... 17

確定關鍵路徑... 18

3 ARM Compiler 18

3.1The Best-In-Class Compiler for the ARM®Architecture. 18

3.2 Vectorizing Compiler 18

3.3 Development for Severely Cost-Sensitive Devices 19

3.4 Reducing Risk for Linux Application Development 20

3.5 Accurate Code Generation. 20

3.6Targeting Advanced Maths and DSP-Style Solutions 20

4 RTSM 模擬器... 21

4.1實時系統模型... 21

5 GNU 編譯器... 22

5.1概述... 22

5.2增強的 GNU 編譯器... 22

5.3示例專案... 23

5.4驗證... 23

6 Eclipse IDE. 23

6.1Workbench 和 IDE 概述... 23

6.2原始碼編輯... 24

6.3到目標的檔案傳輸... 24

6.4視窗管理... 25

1 DS-5 偵錯程式

Professional system-wide debug environmentfor the ARM Architecture

概述

TheDS-5 Debugger brings together the convenience and productivity of integratedmicrocontroller tools with the power and flexibility of open source tools forLinux. Its Eclipse-based GUI abstracts the complexity of managing varioustarget connection types and delivers an homogeneous experience for softwaredebug at bootloader, kernel, and application levels, while its GDB-like commandline interface adds fast control and scripting capabilities for expert Linuxusers.

                               DS-5應用程式版


Suitable for user space native code debug (i.e. Linux application and sharedlibraries, and native Android™ core), it builds on a standard gdbserverconnection. DS-5 application debugger supports several simultaneous debugsessions, SMP systems, multi-threads, and also supports Android SDK/ADTintegration into DS-5 Eclipse IDE for Java-level debug.

DS-5 Linux& 專業版


Extends debug support present in DS-5應用程式版to alsoinclude bare-metal and Linux kernel space debug and trace. Run-control debugsupports single- and multi-core configurations

5.5版本中的新功能

  • Debug and trace support for bare-metal SMP platforms
  • Support for CoreSight™ TPIU (off-chip trace buffer)     with DSTREAM™ (up to 4 GB)
  • Support for Program Trace Macrocell (PTM) trace streams
  • Memory view has the ability to import and export memory     in a variety of formats
  • Additional devices and development platforms on the Device Configuration     Database for out-of-the-box JTAG debug compatibility

主要特性

                                
 

專業的端到端偵錯程式 

 
  •   
  • Single intuitive user interface for all software       layers, from bootloader to native application debug  
  • Debugs code generated by ARMCC and GCC compilers  
  • Professionally supported solution, bringing       reliability and responsiveness for software development  
  • One license for all supported ARM application cores 
 
 

高階會話控制  & 系統檢視 

 
  •   
  • Control multiple simultaneous debug sessions, to one       or more targets, from a single debugger environment  
  • Run and stop mode debugging seamlessly supported  
  • Full system visibility: memory, CPU registers,       peripheral registers, frame buffer (screen), and more 
 
   

非侵入式的跟蹤分析   

 
  •   
  • Instruction (ETM) and instruction flow (PTM) tracing       with source code synchronization  
  • Instruction and function views for trace log analysis  
  • Up to 4 GB off-chip trace buffer with DSTREAM 
 
   

Linux 相關  

 
  •   
  • Linux kernel and user space context awareness,       including process and threads  
  • Modules view, listing dynamically loaded modules and       shared libraries 
 
 

高效率特徵 

 
  •   
  • Automated workflow: connect, download, and run  
  • GDB-like command line console and scripting       capabilities  
  • Complete target file system explorer  
  • Device database, and fast flash memory programming 
 

相容的除錯工具

DSTREAM™High-Performance Debug and Trace

 

  • Run control debug and trace unit supporting all ARM and     Cortex processors
  • USB 2.0 and Ethernet interface allows direct and remote     connections from the host PC
  • Support for JTAG and Serial-Wire Debug target     interfaces
  • Code download at speeds of up to 2500 KBytes per second
  • JTAG clocks of up to 60 MHz provide fast software     upload over the existing debug port
  • 16-bit wide trace capture at 300 MHz DDR (600 Mbit/s     per pin)
  • Flexible trace clock positioning (relative to trace     data)
  • Large 4 GB trace buffer enables long-time trace on fast     target
  • Device bring-up and test utilities
  • Support for Virtual Ethernet link over JTAG
  • Third party IP and debugger support

RVI™ Run-Control Debug Unit

  • Run control debug unit supporting all ARM and Cortex     processors
  • USB 2.0 and Ethernet interface allows direct and remote     connections from the host PC
  • Support for JTAG and Serial-Wire Debug target     interfaces
  • Device bring-up and test utilities
  • Support for Virtual Ethernet link over JTAG
  • Third party IP and debugger support

 

1.1DS-5 偵錯程式: 會話控制

                      
 

除錯會話配置

 
 

New  DS-5 Debugger connections are easily configured through a simple dialog  (shown below) where users can select their device/development board from a  database of supported platforms, define type of debug session (bare metal,  Linux application, or Linux kernel and drivers), load symbol files, set  target environment variables, and much more. Once saved, the session  configuration can be re-invoked at any time with a simple double-click,  saving developers precious time at every debug interaction.

   
 

除錯控制檢視

 
 

Managing debug connections, visualizing context and  controlling program execution is very easy with the Debug Control view. Debug  connections listed here and can be launched with just one click regardless of  connection type (e.g. JTAG, GDB). On the top bar, the run control commands  allow developers to execute the program with great flexibility.  When the execution is paused, deliberately or because of a breakpoint hit,  process, thread, and call stack information is immediately displayed.  Finally, the Debug Control view allows multiple simultaneous connections, to  one or more targets, and automatically refreshes all other debugger views  when the user focuses on a different connection.

 
 

Source Code &  Assembly Stepping

 
 

For  developers interested in low level debug or optimization, DS-5 Debugger  features a disassembly view that can automatically or manually decode ARM or  Thumb instructions. Fully synchronized with program execution, the  Disassembly view highlights all instructions matching the selected source  code line and can also be used to step through machine instructions, in  addition to source code level. From the Debug Control view, program execution  can be controlled through run, pause and step in/over/out icons.

 
 

Command Line Interface &  Scripting

 
 

Already  familiar with GDB's command line interface? Wish to automate further the  debug setup or reproduce recent steps that you cannot remember? DS-5 Debugger  implements its own GDB-like command line interface, extending the  functionality of GNU's tool and encompassing both JTAG/SWD and GDB  connections. DS-5 debugger command prompt can be accessed inside DS-5 IDE or  externally, via console, with the former featuring auto-completion and  tool-tip help for convenience (screen shot below). All debugger actions, CLI  or GUI driven, are displayed in the Commands view and logged in the History  view, allowing users to convert any sequence of commands into a script by  simply selecting the text, dragging and dropping it on the Scripts view.  Saved scripts can then be invoked at any time by the user or automatically  executed in the initialization or when a breakpoint is hit.

   
 

Breakpoints & Data  Watchpoints

 
 

Breakpoints and watchpoints have always been an important part  of software debug, but DS-5 Debugger has made them more powerful and easy to  use. Software and hardware breakpoints can be easily set from the source code  and are listed in the Breakpoints view, along with watchpoints. This view is  used to disable, enable, remove or configure breakpoints and watchpoints  properties to make sure the execution stops in the correct context. The  Breakpoint Properties dialog (shown on the right) allows developers to set  stop condition expressions, ignore count, run saved scripts and automatically  continue executing, or even stop on specific threads only. Similarly, data  watchpoints in DS-5 Debugger are very flexible and can be triggered when a  memory location is accessed in a particular way, when an expression evaluates  true, or when the ignore count is reached. Data watchpoints are set either  from the Variables view or Memory view.

 

1.2 DS-5 偵錯程式: 跟蹤

              
 

非侵入式跟蹤

 
 

When  debugging software on many occasions the side effects of a bug is apparent  but its root cause is located much earlier in the program execution. ARM  CoreSight™ ETM and PTM, supported by DS-5 Debugger, provide non-intrusive  program trace that allow developers to review instructions (and the  associated source code) as they have occurred. It also offers developers the  ability to debug time-sensitive issues otherwise not picked up with intrusive  conventional stepping techniques. DS-5 Debugger currently uses DSTREAM to capture trace on the ETB. Support will be added  for the 4 GB off-chip trace buffer fitted in this debug & trace probe.

 
 

Flexible Trace Visualization

 
 

Trace  is a valuable tool for debugging and short-time performance analysis.  However, there is very little developers can do with only a long list of  executed machine instructions. In DS-5, great emphasis has been given to  present this data the way high-level language developers can easily make  sense of it, for example linking the instructions to the respective source  code, showing function-level trace analysis, or offering graphical trace visualizations.

   
 

Trace-Based Profiling

 
 

Based  on trace data DS-5 Debugger also generates timeline charts with information  to help developers to quickly understand how their software executes on the  target and which functions are using the CPU the most. Offering various zoom  levels, the timeline can display a heat map based on the number of  instructions per time unit or, at its highest resolution, provide per-instruction  visualization color-coded by the typical latency of each group of  instructions.

   

1.3 DS-5 偵錯程式: 系統檢視

                 
 

暫存器檢視

 
 

In DS-5 Debugger core, co-processor and peripheral registers  are all listed in the Registers view (screenshot). This hierarchical tree  view groups registers and bit fields in a logical manner, making it easy for  users to navigate its contents. All registers and fields are labelled and  validated according manufacturer's official documentation so that users do  not need to waste time searching for addresses, bit fields and acceptable  values on endless datasheets. Moreover, developers can, at any point, freeze  this view keeping all content unchanged for comparison with a later snapshot. 

 
 

儲存器, 變數 & 表示式 檢視

 
 

There  are many ways to view and modify memory contents using DS-5 Debugger. The  Memory view is a traditional linear visualization of a memory space. Very  useful for low level debugging, the view can be configured to display the  data in different formats (hexadecimal by default) and widths, accepts  expressions and symbols as start address and can be used to set data watchpoints at specific memory addresses. The  powerful Variables view provides a logical and contextual visualization of  content, type, size and address of all local and global variables. Just like  the Registers view, this one also highlights in yellow the  value of variables that have been modified in the previous step/run (screen  shot below). Finally, the Expressions view provides a quick way to evaluate  the value of regularly used expressions and variables.

   
 

螢幕檢視 & Semihosting

 
 

To make the life of those responsible for board bring-up / low  level debug easy, DS-5 features a screen buffer viewer and an I/O channel  through the debug agent. The Screen view brings to life on the host machine  the contents of the screen buffer, allowing developers to visualize the video  output without any hardware attached. Similarly, semihosting may be used to  as a standard I/O for console before other peripherals and their drivers are  up.

 

1.4 DS-5 偵錯程式: Linux 相關

                 
 

Context Awareness

 
 

DS-5 Debugger has full visibility of processor cores, OS  processes and threads, and call stack. The Debug Control view displays all  this information with an intuitive hierarchical layout, on a  per-debug-connection basis, making it extremely easy for developers to  identify the current context and switch between stack frames. Additionally,  DS-5 breakpoints are customized for Linux-based system debug, enabling  thread-specific conditional breakpoints and pending breakpoints in kernel  modules not yet inserted.

 
 

遠端系統管理

 
 

The Remote Systems view provides convenient and quick access  to services commonly used in Linux-based system development. Building on  secure shell connections (SSH), DS-5 embeds a remote file system explorer  where files and directories can be fully managed, directly edited and  transferred between host and target as easily as a simple drag-and-drop  operation. Also in the IDE, remote terminal views can be launched at any time  directly from the Remote Systems view.

 
 

模組檢視

 
 

The  Modules view is an OS-specific productivity tool to accelerate debugging  activities involving shared libraries and kernel modules. This data panel can  be used to visualize and manage shared libraries used by the application  being debugged and kernel modules installed since the debugger has been  connected. Furthermore, whenever it becomes important to investigate what  happens inside one or more of these libraries or modules, developers can  easily load their debug symbols using the Modules view.

   

2 Streamline

2.1充分利用 ARM 支援的系統

ARMStreamline 效能分析器為軟體開發人員提供了一種直觀的方法來優化在 ARM 支援的平臺上執行的基於 Linux 的系統。 Streamline 基於低開銷的抽樣技術,特有以使用者為中心的圖形介面,可顯示從系統範圍的 CPU 負載到原始碼中的熱點等資訊,這樣,開發人員就能夠輕鬆確定效能瓶頸、多執行緒問題和一般的資源利用率低下問題。

ARMStreamline 作為 ARMDevelopment Studio 5 的元件發行。

2.2益處

程式碼執行速度更快 負載均衡 資源效率

 
 

無需除錯或跟蹤硬體即可執行系統範圍的分析

 

  Streamline 只需要通過標準 TCP/IP 網路連線到目標以獲取和分析系統範圍的效能資料。 此外,也無需在目標上載入除錯符號, 而是使用包含 Streamline 用於目標的軟體的實際生產軟體映像來進行分析。 另外,開發人員還可選擇在支援原始碼級和指令級效能分析的主機上載入焦點二進位制的除錯符號。

 
 

支援嵌入: 佔用的記憶體空間小、CPU 開銷低

 

Streamline用於目標的軟體可以選擇將收集的所有資料通過網路連線流式傳輸到主機,因此,目標上無需大的緩衝區,並可在幾小時內完成效能分析。 而且,還可通過配置抽樣頻率來控制 Streamline自身的開銷,通常將減少 5% 且明確顯示在每個分析結果中,以便開發人員對於探針效果不會感到意外。

 
 

基於時間的分析: 瞭解簡單分析背後的內容

 

“時間表”檢視提供了一種創新的顯示方法,其中顯示有關目標上執行的軟體的資訊以及該軟體對與效能相關的系統引數的影響,如整體 CPU 負載、快取記憶體未命中次數、中斷數和核心週期。 使用此檢視,開發人員可以輕鬆地確定與執行緒序列、負載均衡、非同步事件和更多內容相關的問題。 “詳細資訊”欄是對“時間表”檢視的補充,方便開發人員調查任何給定時刻哪些函式/程式佔用了更多 CPU 時間,並且只需單擊即可將它們與效能計數器相關聯。

 
 

確定關鍵路徑

 

  每個函式的行為千差萬別,具體取決於它所在的呼叫鏈。“呼叫路徑”檢視顯示出按程式和執行緒彙總的分層 CPU 使用情況統計資訊,以便開發人員可以檢查在特定執行緒內呼叫函式或庫與從其他位置呼叫它們相比是否要佔用更多 CPU 時間。 呼叫圖形是以圖形方式對映函式之間的關係,幫助開發人員更好地瞭解軟體流。

3 ARM Compiler

3.1The Best-In-Class Compiler forthe ARM® Architecture

TheARM Compiler in ARM DS-5™ Professional Edition is the only commercial compilerco-developed with the ARM processors and specifically designed to optimallysupport the ARM architecture. It is the result of 20 years of development andis recognized as the industry standard C and C++ compiler for buildingapplications targeting the ARM, Thumb®, Thumb-2, VFP and NEON™ instructionsets.

  • ARM processors are designed to best execute code     generated by the ARM Compiler
  • ARM Compiler enables the new processor features in all     the ARM processors
  • The ARM Compiler supports building of Symbian OS and     ARM Linux applications and libraries

TheARM Compiler v4.1 reduces the best codesize by up to 5% and improves the bestperformance by 10-15% when compared to RVDS 4.0 compiler.

3.2 Vectorizing Compiler

Inaddition to the ARM Compiler, the state-of-the-art NEON Vectorizing Compiler,enables the automatic generation of ARM NEON SIMD code sequences from standard Cand C++ code. The NEON Vectorizing Compiler can speed-up critical multimediakernels by 4X, resulting in a 2X overall application performance increase.

3.3 Development for SeverelyCost-Sensitive Devices

Tofurther improve code density for the range of ARM processor-based applications,the ARM Compiler features an optional microlib C library (a subset of the ISOstandard C runtime library), which has been minimized in size formicrocontroller applications. The microlib C library achieves a 92* percentreduction in runtime library code size.

Whencombined with a Cortex™-Mclass processor, the microlib C library provides a completely C-baseddevelopment environment without the need to revert to assembly language - evenfor interrupt service routines. This removes the need for specific knowledge ofthe ARM architecture.

*Memorysavings provided by the microlib C library will depend on the application

3.4 Reducing Risk for LinuxApplication Development

TheABI for the ARM architecture created by the ARM Compiler team is alsoimplemented in the GNU compiler for ARM. This enables the creation and use oflibraries that can be shared between development environments.

Thecompatibility between the GNU Compiler and the ARM Compiler means that Linuxapplications can be built using the ARM Compiler. The ARM Compiler providesyour development team with high-quality support and the performance, stabilityand code size benefits you expect from a quality commercial toolkit.

3.5 Accurate Code Generation

Manyalgorithms are now automatically generated from mathematical modeling softwareusing floating point representations for data. Therefore, the accuracy of IEEEbit representation and floating point representations is essential for correctoperation of the generated code. The default library selected by the ARMCompiler offers a full complement of C/C++ functionality, including C++exception handling and IEEE 754 floating point support. The compiler canoptionally generate code to use either software floating point or any of the ARMhardware floating point units. Independent of the method used, the compilergenerates full IEEE 754-compliant code. This means that your application willgenerate exactly the same data regardless of the target processor, speedingporting from one device to another.

3.6Targeting Advanced Maths andDSP-Style Solutions

Intrinsicfunctions provide support for common code sequences or instructions that do notmap well onto high-level languages.

  • ETSI intrinsics provide telecom primitives, which are     used in a number of example algorithms
  • TI C55 intrinsics provide for support for algorithms     written to exploit TI-specific extensions Cortex-M4 intrinsics for     targeting the onboard DSP
  • Other intrinsics allow access to all ARM hardware     instructions not easily accessible from C, reducing the need to write code     in assembly language

Wherepossible, intrinsics are emulated on early processors.

4 RTSM 模擬器

4.1實時系統模型

通過 DS-5 應用版本中的 Cortex-A8 RTSM,不需要硬體目標就可以開發 Linux 應用程式。 RTSM 是 ARM 硬體平臺的一個實時模擬模型,其中包括執行復雜的作業系統和應用程式所需的處理器、記憶體控制器和外設。

藉助於 Cortex-A8 RTSM,不需要任何硬體就可以基於ARM 處理器開發 Linux 應用程式。

  • 在典型的桌面 PC 上模擬速度超過 250MHz
  • 將使用主機 PC 上的資源模擬外設介面,包括 LCD 控制器、鍵盤、滑鼠、觸控式螢幕、UART 和乙太網控制器

DS-5 包括一個移植到 Cortex-A8 RTSM 的基於 ARM 處理器的 Linux 發行版示例。 當從 Eclipse 中啟動時,此模型自動引導 Linux 並進入可載入和除錯應用程式的狀態。

5 GNU 編譯器

5.1概述

GNU 編譯器 (GCC) 是 DS-5 中的入門級 C/C++ 編譯器。

5.2增強的 GNU 編譯器

預置且經過驗證的 GNU 編譯器版本,提供對 ARM 體系結構的 ARM Linux 增強支援。

  • 為 ARM Cortex 處理器上使用的常用混合 32/16 位 Thumb®-2 指令集提供更好的支援
  • 支援最新的 ARM Cortex-A 系列處理器 -     Cortex-A5、Cortex-A8 和 Cortex-A9
  • 基於 GCC 4.4.1

5.3示例專案

為了使您快速開始 Linux 開發,DS-5 提供一個完整的 Linux 示例,該示例可以在 ARM Versatile 板或 Cortex-A8 SoC 的整合RTSM 模型上執行。

5.4驗證

預置的 GNU 編譯工具已經過廣泛驗證,以確保正確的操作,包括:

  • 已完成 FSF GNU 編譯器集合迴歸測試套件
  • 通過生成 ARM 嵌入式 Linux 示例進行驗證

6 Eclipse IDE

6.1Workbench和 IDE 概述

DS-5 基於標準 Eclipse 開發環境,提供一流的視窗管理、專案管理和 C/C++ 原始碼編輯工具。

使用者可以將 DS-5 安裝為獨立的 Eclipse 或用作現有 Eclipse 環境的外掛。

6.2原始碼編輯

Eclipse IDE 的功能齊全C/C++ 原始碼編輯器可以幫助您將更多時間用於編寫程式碼,減少更正語法錯誤的時間。

  • 列出函式、變數和宣告的大綱檢視
  • 突出顯示您的 C/C++ 原始碼中的語法錯誤
  • 針對 C/C++ 和 ARM/Thumb/Thumb2 彙編的可配置語法顏色方案和程式碼格式
  • 完整的更改歷史記錄,可以與常見的原始碼控制系統(包括 CVS 和 SVN)整合

6.3到目標的檔案傳輸

DS-5 包括一個遠端系統瀏覽器 (RSE) 視角,可以將應用程式和庫輕鬆傳輸到目標上的 Linux 檔案系統。

  • 提供到目標的 FTP 連線,可以瀏覽其檔案系統、建立新資料夾以及從主機拖放檔案
  • 通過在 FTP 檢視中雙擊相應的檔案來開啟目標的檔案系統上的檔案。 在 Eclipse 中編輯它們並將它們直接儲存到目標的檔案系統
  • 通過 Shell 和終端視窗可以在目標系統上執行 Linux 命令,而無需顯示器和鍵盤
  • 顯示在目標上執行的程式列表

6.4視窗管理

Eclipse 中的靈活視窗管理系統使您可以充分利用可視工作區。

  • 支援多個原始碼和偵錯程式檢視
  • 根據需要排列您的視窗:浮動(分離)、停靠、選項卡式或最小化到“快速檢視”欄
  • 通過將分離的視窗拖放到其他顯示器支援多螢幕設定