ARM Technical Support Knowledge Articles

How can I use the DAP logger tool?

Applies to: DS-5, DSTREAM, RealView ICE and Trace (RVI / RVT)

Answer

The DAP Logger tool can be used to record DAP register transactions between DSTREAM/RealView ICE and CoreSight targets. The accesses can be logged to a text file which can be very helpful when diagnosing connectivity issues.

If you are experiencing problems with connecting to your target, time outs, autodetection failures (using Platform Configuration Editor), or even trace issues, a DAP log can provide invaluable information to our Support Engineers.

 

Note: Does not support ULINK family of devices.


Steps for all DS-5 versions:


A) Power cycle the target and the DSTREAM/RVI unit.

B) Start the DAP logging process. Instructions are shown below depending on your DS-5 version.

...

C) Recreate failing scenario with DS-5 (E.g.: attempt to connect if that is the issue under investigation).

D) Exit the logging application by hitting CTRL-C in the command window.

E) Zip the resulting log file and send to ARM Support for investigation.

F) Once completed, power-cycle the DSTREAM/RVI.


Step B: To start the DAP logging process (DS-5 v5.19 and later versions):


Open a command line interface and navigate to your DS-5 installation folder's bin directory. The default installation directory is typically "C:\Program Files\DS-5 v5.25.0\bin"
Issue the two following commands depending on your DSTREAM/RVI to PC connection type:

For USB connection (nnnnnnnn is the DSTREAM/RVI USB number):

 

C:\Program Files\DS-5 v5.25.0\bin> dbghw_log_client -daplog full USB:nnnnnnnn
C:\Program Files\DS-5 v5.25.0\bin> dbghw_log_client USB:nnnnnnnn > C:\temp\dstream.log


For Ethernet connection (aaa.bbb.ccc.ddd is the DSTREAM/RVI TCP/IP address):

 

C:\Program Files\DS-5 v5.25.0\bin> dbghw_log_client -daplog full TCP:aaa.bbb.ccc.ddd
C:\Program Files\DS-5 v5.25.0\bin> dbghw_log_client TCP:aaa.bbb.ccc.ddd > C:\temp\dstream.log

 

Resume from step C.


Step B: To start the DAP logging process (DS-5 versions prior to v5.19):


We strongly advise you to update to the most current version of DS-5. The DAP logging tool did not come standard with earlier versions. If, for some reason, you MUST use an earlier version of DS-5, please follow the steps below:

Note: USB connections are not supported.
Note: This DAP logger utility only works under Windows.

1. Unzip the attachment (rvi_daplog.zip located at the bottom of this KA) to a suitable directory (E.g.: C:\daplog).

2. Power cycle the target and the DSTREAM/RVI unit.

3. Open a command line interface and navigate to the above directory.

4. Issue the two following commands (aaa.bbb.ccc.ddd is the DSTREAM/RVI TCP/IP address):

 

C:\DAPlog\rvi_daplog> .\rvidaplog.exe -host=TCP:aaa.bbb.ccc.ddd -logging=on
C:\DAPlog\rvi_daplog> rvi_log_client TCP:aaa.bbb.ccc.ddd > C:\temp\dstream.log

 

Resume from step C.

 

Modifying the debug acceleration level:

 

Note: This is not necessary unless a Support representative has asked you to do so.
Note: This does not apply to any Cortex-M class cores or cores on the JTAG-AP.
Note: This does not apply to any ARMv8 Architecture cores.
Note: This is not necessary if the issue under investigation is PCE failure during autodetection.

 

Some extra modification on the platform support files for the target may be necessary for the DAP logger to show pertinent transactions, due to optimizations at the DSTREAM/RVI level. These changes ensure that DAP accesses are not optimized and the full detail is displayed.

1. Locate your target's Debug Configuration entry.

2. Copy the debug configuration files (.rvc, .rcf, .py, .xml files) to a new folder located within the same top directory structure, and append the "with_logging" to the name of the folder.

3. Open up the .rvc file with a text editor. If there isn't an .rvc file, open the .rcf file.

4. For .rvc: Locate and modify the string:

     <DEBUG_ACCEL Type = "Str">0</DEBUG_ACCEL>

to reflect the following:

    
<DEBUG_ACCEL Type = "Str">2</DEBUG_ACCEL>  


For .rcf: Locate the core (or cores) that you will be connecting to, and add the line
 
    
<config_item name="DEBUG_ACCEL">2</config_item>  

under <config_items>

 

For example:

                  
<device name="Cortex-A15" type="Cortex-A15">
            <config_items>
                <config_item name="CORESIGHT_BASE_ADDRESS">0x80001000</config_item>
                <config_item name="CORESIGHT_AP_INDEX">0</config_item>
                <config_item name="DEBUG_ACCEL">2</config_item>


                       
5. Save the changes you made.    

6. Open up DS-5, go to Window -> Preferences -> DS-5 -> Configuration Database, click the "Rebuild database" button, and then "Apply" button, and then "OK."
This will rebuild your configuration database to include the new configuration you just created.

Please then follow steps A through F listed in the beginning of this KA to capture a DAP log. Ensure that you are connecting to your target at step C using this new debug configuration with the modified acceleration level.    

               

Attachments: rvi_daplog.zip

Article last edited on: 2016-08-16 19:19:13

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential