ARM DS-5 Quick Start (i.MX53)

From BlueWiki

Jump to: navigation, search

The reference software development tool suite for ARM processors

Developed by ARM Architecture experts, the ARM DS-5™ toolchain enables engineers to develop robust and highly optimized embedded software for ARM application processors, such as the Cortex™-A series, Cortex-R real-time processors and other ARM embedded processors. The DS-5 toolchain comprises tools such as the best-in-class ARM C/C++ Compiler, a powerful Linux/Android™/RTOS-aware debugger, the ARM Streamline™ system-wide performance analyzer and real-time system model simulators, all conveniently packaged in a user friendly integrated development environment (IDE) based on the Eclipse.


1 Introduction

This is a quick start for ARM DS-5 software, DSTREAM debugging hardware, and Bluetechnix i.MX53 products (CM-i.MX53, Qseven-i.MX537).

This document is not exhaustive, please refer to the Further reading chapter how to retrieve documentation about DS-5.

2 What you will need

  • ARM DS-5 software for Linux or Windows
  • ARM DSTREAM Debug and Trace unit (optional)
  • Ethernet connection between host and target (optional)

3 What is supported

  • DS-5 Community Edition
    • Linux application debugging (gdbserver)
    • Streamline™ system-wide performance analyzer
  • DS-5 Professional Edition & DSTREAM
    • Bare Metal Debug (via JTAG)
    • Linux Kernel/Device Driver Debug (via JTAG)
    • Tracing using the Cortex-A8 ETB (Embedded Trace Buffer) (via JTAG)

4 Install ARM DS-5

You may start with the free DS-5 Community Edition, which is available at

Evaluation licenses for the Professional Edition are available - see

5 Adding target support

If your version of DS-5 does not have support for CM-i.MX53/Qseven-i.MX537 yet, you can add a User Configuration Database.

5.1 How to check

  • Start DS-5.
  • Click Run from the menu and choose Debug Configurations....
  • Right-click on DS-5 Debugger and click New.
  • On the Connection tab, in the Select target area, search for BluetechnixCM-i.MX53/Qseven-i.MX537.
  • If the target is not available, proceed.

5.2 Add support

  • Download containing the Configuration Database Entry from
  • Unpack the ZIP file.
  • Open DS-5.
  • Click Window from the menu and choose Preferences.
  • On the left, expand the DS-5 configuration item and select Configuration Database.
  • In the User Configuration Databases area, click on Add, and select the configdb folder from the unpacked ZIP file.
  • Click on the Rebuild database... button. You are finished!

6 U-Boot debugging with DSTREAM

DS-5 and DSTREAM are used to initialize the i.MX53 target (including SDRAM), load the U-Boot ELF file to the target's memory, and debug/trace it.

You can download the SDRAM initialization script cmimx53.ds for DS-5 from

How to create a proper debug configuration.

  • Click Run from the menu and choose Debug Configurations....
  • Right-click on DS-5 Debugger and click New.
  • On the Connection tab, in the Select target area, select BluetechnixCM-i.MX53/Qseven-i.MX537.
  • Choose debug target Bare Metal Debug.

  • Open the Files tab.
  • Select the U-Boot ELF file u-boot (from U-Boot's top build directory) as application to download, and check the Load symbols box.

  • Now open the Debugger tab.
  • Select Debug from entry point.
  • Select the target initialization script cmimx53.ds (download link above).
  • If you like U-Boot to start as soon as you start the DS-5 debugging session, put continue in the debugger commands field.
  • Finally, add U-Boot's source folder as a source search directory.

The following screenshot shows DS-5 while U-Boot debugging, in processor-stopped state, with ETB tracing enabled.

7 Linux kernel debugging with DSTREAM

7.1 Compile the kernel with debug info

This is required if you want to debug your kernel via JTAG using DSTREAM.

  • Go to kernel directory
cd btmxc-linux/
  • Configure the kernel
source set-cross-envs
make menuconfig
  • Enable the following options in the Kernel hacking menu:
[*] Kernel debugging
[*] Compile the kernel with debug info
  • Rebuild and deploy the kernel

7.2 Configure U-Boot

In order to allow JTAG access while the Linux kernel is running on the target, you have to tell the kernel with the following argument


To accomplish this,

  • Reset or boot the CM-i.MX53/Qseven-i.MX537 with the serial terminal connected and ready.
  • Stop booting with any key.
  • At the U-Boot prompt, enter
set bootargs_base $(bootargs_base) jtag=on
  • Reset

7.3 Create a DS-5 debug configuration

  • Click Run from the menu and choose Debug Configurations....
  • Right-click on DS-5 Debugger and click New.
  • On the Connection tab, in the Select target area, select BluetechnixCM-i.MX53/Qseven-i.MX537.
  • Choose between available debug targets.

  • For a kernel debugging session, you have to add a debugger command and add a source search directory in order to enable source-level debugging.
  • Go to the Debugger tab within the debug configuration.
  • Select Execute debugger commands, and add
add-symbol-file "<your-path>/vmlinux" S:0x0
  • Add the directory where your Linux kernel sources are as a Source search directory.

8 Enable Tracing

DS-5 may use the on-chip ETB of the i.MX53 to capture a small amount of real time trace data.

  • In the debug configuration dialog, go to the Connection tab.
  • Click the Edit... button for DTSL options.

  • In the DTSL (Debug and Trace Services Layer) Configuration Editor, set the Trace capture method to On Chip Trace Buffer (ETB).

  • On the Core Trace tab, enable Cortex-A8 trace, and select other options according to your wishes.

  • Click OK and Debug in the parent dialog to start debugging.
  • If the processor is now halted, e.g. by a breakpoint, the Trace view update with instruction trace and source-level function analysis.
  • If the Trace view is not yet opened, select Window from the menu, Show View, and Trace.

9 Using DS-5 Streamline

  • Streamline works over an Ethernet connection.
  • No JTAG connection nor debugger hardware is required.
  • Supported by the DS-5 Community Edition.

9.1 Prepare the Linux kernel

In order to use Streamline, some configuration options must be enabled in the kernel configuration.

General setup -->
  Kernel Performance Events And Counters -->
    [*] Kernel performance events and counters
General setup -->
  [*] Profiling Support
Kernel features -->
  [*] Tracers
    [*] Trace process context switches and events
Kernel hacking -->
  [*] Kernel debugging
  [*] Compile the kernel with debug info

Afterwards, recompile the kernel and boot the target with the new kernel.

9.2 Prepare the target

Streamline needs a kernel module (gator.ko) and a userspace daemon (gatord) to run on the target. We offer these two pre-compiled, ready to be installed on the target.

insmod gator.ko
  • Start the gator daemon
./gatord &

9.3 Start streaming

  • If the Streamline view is not visible, open Window from the menu, and select Show View, Other....
  • In the opened window, from folder ARM Streamline, select the Streamline Data view.
  • Enter the IP address of your i.MX53 target in the top field of the Streamline view, and click the Start Capture button right of it. Choose a folder for storing the capture data afterwards.

  • Now, you can see a live view of the running system, including CPU Activity, Memory usage, Disk I/O etc.
  • After you have stopped streaming, you may analyse the data in the Capture_Cxx_Axx view.

10 Further reading

Personal tools