Worked examples for CSAT600

Here are some examples of using CSAT600 to perform particular tasks. Because CSAT600 is a flexible tool with many applications, these example are here to show you the kind of command call order and possible output that you might see from the commands.

  • Example 1 Manually specify the scan chain

    This example shows how to manually specify the scan chain using the chain (chn) command. In the CSAT600 tool, only the devices on the scan chain are specified. The CSAT600 tool does not specify all the CoreSight devices.  For the chain (chn) command, JTAG scan chain devices are listed in the order in which they appear on the scan chain. 

    Optionally, for the connect (con) command, you can use the Platform Configuration Editor (PCE) tool to generate a System Description File (SDF). If an SDF is not specified, the chain (chain) and autodetect (auto) commands produce a temporary SDF for the debug probe connection. Use the SDF generated by PCE or the connect (con) command for subsequent connections to the target.

    C:\Program Files\Arm\Development Studio 2019.0\bin>csat -cs600
    **********************************
    **  Welcome to CSAT for SoC600  **
    **********************************

    %> con TCP:255.255.255.255
    Connecting to TCP:255.255.255.255 ...
    Connected to: DSTREAM-ST
    Base H/W: V1 Rev A-05
    FPGA build 0x0014, Debug 1V8, Trace 1V8
    Firmware: 5.0.0, Build 7
    Configuration file: C:\Users\<user>\AppData\Local\Temp\csat_scanchain_devices3560597998775515521.sdf
    %> chain dev=ARMCS-DP
    ------------+--------------------------------+---------
     Device No. | DTSL Device Name (& Address)   | AP No.
    ------------+--------------------------------+---------
              0 |                      ARMCS-DP  |
    %> disconnect
    Disconnected from TCP:255.255.255.255
    %> exit
  • Example 2 Target autodetection

    This example shows how to autodetect the target and read its ROM table. With a CoreSight SoC-600 target, the CSAT600 tool presents all components in a linear sequence, no matter how the Access Ports (APs) are structured. Each device detected is accessible using a device number (Device No.). CSAT600 logging is also enabled to capture a log of the autodetection process.

    C:\Program Files\Arm\Development Studio 2019.0\bin>csat -cs600
    **********************************
    **  Welcome to CSAT for SoC600  **
    **********************************

    %> con TCP:255.255.255.255
    Connecting to TCP:255.255.255.255 ...
    Connected to: DSTREAM-ST
    Base H/W: V1 Rev A-05
    FPGA build 0x0014, Debug 1V8, Trace 1V8
    Firmware: 5.0.0, Build 7
    Configuration file: C:\Users\<user>\AppData\Local\Temp\csat_scanchain_devices1844853173103486319.sdf
    %> log on C:\Users\<user>\AppData\Local\Temp\log.txt
    Logging is enabled with logfile: C:\Users\<user>\AppData\Local\Temp\log.txt
    %> autodetect read-rom
    Detecting platform...
    ------------+--------------------------------+---------
     Device No. | DTSL Device Name (& Address)   | AP No.
    ------------+--------------------------------+---------
              0 |                      ARMCS-DP  |
              1 |         CSMEMAP_0 (0x00000000) | 0
              2 |      Cortex-A53_0 (0x80410000) | 0
              3 |           CSCTI_0 (0x80420000) | 0
              4 |           CSPMU_0 (0x80430000) | 0
              5 |           CSETM_0 (0x80440000) | 0
              6 |      Cortex-A53_1 (0x80510000) | 0
              7 |           CSCTI_1 (0x80520000) | 0
              8 |           CSPMU_1 (0x80530000) | 0
              9 |           CSETM_1 (0x80540000) | 0
             10 |           CSTMC_0 (0x80800000) | 0
             11 |            CSTPIU (0x80820000) | 0
             12 |           CSTMC_1 (0x80830000) | 0
             13 |           CSTMC_2 (0x80840000) | 0
             14 |           CSTMC_3 (0x80850000) | 0
             15 |             CSSTM (0x80860000) | 0
             16 |           CSCTI_2 (0x80870000) | 0
             17 |           CSCTI_3 (0x80880000) | 0
             18 | CSATBReplicator_0 (0x80890000) | 0
             19 | CSATBReplicator_1 (0x808A0000) | 0
             20 |       CSTFunnel_0 (0x808B0000) | 0
             21 |       CSTFunnel_1 (0x808C0000) | 0
             22 |         CSMEMAP_1 (0x00000000) | 1
    %> log off
    Logging is disabled.
    %> disconnect
    Disconnected from TCP:255.255.255.255
    %> exit

     

  • Example 3 Reading CoreSight component registers using the MEMAP APB

    This example shows how to read and set CoreSight component registers using the Memory AP (MEMAP) APB. The debug probe connection is using a previously generated SDF.

    C:\Program Files\Arm\Development Studio 2019.0\bin>csat -cs600
    **********************************
    **  Welcome to CSAT for SoC600  **
    **********************************

    %> con TCP:255.255.255.255 C:\Users\<user>\AppData\Local\Temp\AMIS FPGA.sdf
    Connecting to TCP:255.255.255.255 ...
    Connected to: DSTREAM-ST
    Base H/W: V1 Rev A-05
    FPGA build 0x0014, Debug 1V8, Trace 1V8
    Firmware: 5.0.0, Build 7
    Configuration file: C:\Users\<user>\AppData\Local\Temp\AMIS FPGA.sdf
    %> list
    ------------+--------------------------------+---------
     Device No. | DTSL Device Name (& Address)   | AP No.
    ------------+--------------------------------+---------
              0 |                      ARMCS-DP  |
              1 |         CSMEMAP_0 (0x00000000) | 0
              2 |      Cortex-A53_0 (0x80410000) | 0
              3 |           CSCTI_0 (0x80420000) | 0
              4 |           CSPMU_0 (0x80430000) | 0
              5 |           CSETM_0 (0x80440000) | 0
              6 |      Cortex-A53_1 (0x80510000) | 0
              7 |           CSCTI_1 (0x80520000) | 0
              8 |           CSPMU_1 (0x80530000) | 0
              9 |           CSETM_1 (0x80540000) | 0
             10 |           CSTMC_0 (0x80800000) | 0
             11 |            CSTPIU (0x80820000) | 0
             12 |           CSTMC_1 (0x80830000) | 0
             13 |           CSTMC_2 (0x80840000) | 0
             14 |           CSTMC_3 (0x80850000) | 0
             15 |             CSSTM (0x80860000) | 0
             16 |           CSCTI_2 (0x80870000) | 0
             17 |           CSCTI_3 (0x80880000) | 0
             18 | CSATBReplicator_0 (0x80890000) | 0
             19 | CSATBReplicator_1 (0x808A0000) | 0
             20 |       CSTFunnel_0 (0x808B0000) | 0
             21 |       CSTFunnel_1 (0x808C0000) | 0
             22 |         CSMEMAP_1 (0x00000000) | 1
    %> dvo 1
    Connected to device no. 1: CSMEMAP_0
    %> mr 0x80540000 8
    Reading from device no. 1: CSMEMAP_0
    0x80540000 : 0x00000000
    0x80540004 : 0x00000000
    0x80540008 : 0x00000000
    0x8054000c : 0x00000003
    0x80540010 : 0x00000001
    0x80540014 : 0x00000000
    0x80540018 : 0x00000000
    0x8054001c : 0x00000000
    %> mw 0x80540004 0
    Writing to device no. 1: CSMEMAP_0
    Wrote 4 bytes.
    %> mr 0x80540004 1
    Reading from device no. 1: CSMEMAP_0
    0x80540004 : 0x00000000
    %> dvc
    Disconnected from device no. 1
    %> dcn
    Disconnected from TCP:255.255.255.255
    %> x
  • Example 4 Changing a DSTREAM configuration item

    This example shows how to autodetect a target and change the SRSTOnConnect DSTREAM configuration item.

    C:\Program Files\Arm\Development Studio 2019.0\bin>csat -cs600
    **********************************
    **  Welcome to CSAT for SoC600  **
    **********************************

    %> con TCP:255.255.255.255
    Connecting to TCP:255.255.255.255 ...
    Connected to: DSTREAM-ST
    Base H/W: V2 Rev A-06
    FPGA build 0x0014, Debug 1V8, Trace 1V8
    Firmware: 5.3.0, Build 4
    Configuration file: C:\Users\<user>\AppData\Local\Temp\csat_scanchain_devices3925139137141746493.sdf
    %> chain dev=auto
    Detecting scanchain...
    ------------+--------------------------------+---------
     Device No. | DTSL Device Name (& Address)   | AP No.
    ------------+--------------------------------+---------
              0 |                      ARMCS-DP  |
    %> auto read-rom
    Detecting platform...
    ------------+--------------------------------+---------
     Device No. | DTSL Device Name (& Address)   | AP No.
    ------------+--------------------------------+---------
              0 |                      ARMCS-DP  |
              1 |         CSMEMAP_0 (0x00000000) | 0
              2 |      Cortex-A53_0 (0x80410000) | 0
              3 |           CSCTI_0 (0x80420000) | 0
              4 |           CSPMU_0 (0x80430000) | 0
              5 |           CSETM_0 (0x80440000) | 0
              6 |      Cortex-A53_1 (0x80510000) | 0
              7 |           CSCTI_1 (0x80520000) | 0
              8 |           CSPMU_1 (0x80530000) | 0
              9 |           CSETM_1 (0x80540000) | 0
             10 |           CSTMC_0 (0x80800000) | 0
             11 |            CSTPIU (0x80820000) | 0
             12 |           CSTMC_1 (0x80830000) | 0
             13 |           CSTMC_2 (0x80840000) | 0
             14 |           CSTMC_3 (0x80850000) | 0
             15 |             CSSTM (0x80860000) | 0
             16 |           CSCTI_2 (0x80870000) | 0
             17 |           CSCTI_3 (0x80880000) | 0
             18 | CSATBReplicator_0 (0x80890000) | 0
             19 | CSATBReplicator_1 (0x808A0000) | 0
             20 |       CSTFunnel_0 (0x808B0000) | 0
             21 |       CSTFunnel_1 (0x808C0000) | 0
             22 |         CSMEMAP_1 (0x00000000) | 1
    %> device 2
    Connected to device no. 2: Cortex-A53_0, JTAG ID: 0x1ba06477, version 0x00000006
    Msg returned from device: Cortex-A53 Template
    %> help cfgbox
    Command: cfgbox
            Configure the DSTREAM probe.
    Aliases:
            cfb
    Usage:
            cfgbox [<item_name> [<item_value>]]
            cfb [<item_name> [<item_value>]]
    %> cfgbox
    Linked_SRST_TRST     : 0
    SRSTOnConnect        : 0
    UserOutputPin  s     : 000000
    UseDeprecatedSWJ     : 0
    DSTREAMCS20          : 0
    TResetOnInitConnect  : 1
    AllowTRST            : 1
    ResetHoldTime        : 100
    TRSTOnConnect        : 1
    PROBE                : 90112
    RvcHash              : 1362632482
    MinimalConnect       : 0
    nTRSTHoldTime        : 10
    PowerUpGPR           : 1
    GdbConnCmdSeq        :
    SessionPause         : 0
    nTRSTPostResetTime   : 10
    UserOut_P5           : 0
    TRSTPostResetTime    : 10
    UserOut_P4           : 0
    SWJEnable            : 0
    JtagClockFreq        : 7500000
    SWOMode              : 0
    VCC                  : 805306368
    JTAGAutoMaxFreq      : 200000000
    ProbeMode            : 1
    PostResetDelay       : 1000
    nSRSTHighMode        : 1
    ClusterDescription   :
    UserOut_DBGRQ        : 0
    CONNECTOR            : ARM JTAG 20 (JTAG)
    nSRSTLowMode         : 0
    TRSTHoldTime         : 10
    AllowConInReset      : 0
    SWOBaudRate          : 0
    UserOut_P3           : 0
    UserOut_P2           : 0
    DoSoftTAPReset       : 1
    UserOut_P1           : 0
    DoSoftTRST           : 1
    AP_V3_ADDR_IDX_MAP   :
    AllowICELatchSysRst  : 1
    AllowICETAPReset     : 1
    nTRSTHighMode        : 0
    LVDSProbeMode        : 1
    SResetOnInitConnect  : 0
    ResetOperation       : 0
    nTRSTLowMode         : 0
    FPGARegOffset        : 0
    PythonScript         :
    FPGARegValue         : 24576
    UserOut_P6_COAX      : 0
    JtagClockType        : 2
    ScriptTimeout        : 1000
    TCKOnIdle            : 0
    PowerFilterTime      : 100
    ScanChainJtagFreqs   : 7500000T
    %> cfb SRSTOnConnect 1
    SRSTOnConnect: 1
    %> cfb SRSTOnConnect
    SRSTOnConnect: 1
    %> dvc 2
    Disconnected from device no. 2
    %> dcn
    Disconnected from TCP:255.255.255.255
    %> x
    Disconnected from TCP:255.255.255.255
  • Example 5 Reading and writing registers using the dpregread and dpregwrite commands

    This example performs various register reads and writes using the dpregread and dpregwrite commands.

    The example accesses the below registers:

    • Advanced eXtensible Interface (AXI) Access Port 0 Transfer Access Register (AP0.TAR)
    • Advanced Peripheral Bus (APB) Access Port 1 Transfer Access Register (AP1.TAR)
    • AXI Access Port 0 Identification Register (AP0.IDR)
    • Advanced High-performance Bus (AHB) for Cortex-M Access Port 2 Identification Register (AP2.IDR or device44.0x341)
    • Advanced High-performance Bus (AHB) for Cortex-M Transfer Access Register (device44.TAR or CSMEMAP_2.TAR)

    Note: The example assumes that you have:

    • Started CSAT600 (csat -cs600).
    • A debug probe connection is in place. See connect (con).
    • Discovered CoreSight devices. See autodetect (auto) or chain (chn).

    %> list
    ------------+--------------------+-----------------+--------------+--------
     Device No. |    Device Name     |   Device Type   | Base Address | AP No.
    ------------+--------------------+-----------------+--------------+--------
              0 |         ARMCS-DP_0 |        ARMCS-DP |         None |
              1 |          CSMEMAP_0 |          AXI-AP |   0x00000000 | 0
              2 |          CSMEMAP_1 |          APB-AP |   0x00000000 | 1
              3 |            CSTMC_0 |           CSTMC |   0x80010000 | 1
              4 |            CSCTI_0 |           CSCTI |   0x80020000 | 1
              5 |             CSTPIU |          CSTPIU |   0x80030000 | 1
              6 |        CSTFunnel_0 |       CSTFunnel |   0x80040000 | 1
              7 |            CSTMC_1 |           CSTMC |   0x80070000 | 1
              8 |              CSSTM |           CSSTM |   0x80100000 | 1
              9 |            CSCTI_1 |           CSCTI |   0x80110000 | 1
             10 |  CSATBReplicator_0 | CSATBReplicator |   0x80120000 | 1
             11 |        CSTFunnel_1 |       CSTFunnel |   0x80130000 | 1
             12 |            CSTMC_2 |           CSTMC |   0x80140000 | 1
             13 |        CSTFunnel_2 |       CSTFunnel |   0x80150000 | 1
             14 |            CSCTI_2 |           CSCTI |   0x80160000 | 1
             15 |       Cortex-A72_0 |      Cortex-A72 |   0x82010000 | 1
             16 |            CSCTI_3 |           CSCTI |   0x82020000 | 1
             17 |            CSPMU_0 |           CSPMU |   0x82030000 | 1
             18 |            CSETM_0 |           CSETM |   0x82040000 | 1
             19 |       Cortex-A72_1 |      Cortex-A72 |   0x82110000 | 1
             20 |            CSCTI_4 |           CSCTI |   0x82120000 | 1
             21 |            CSPMU_1 |           CSPMU |   0x82130000 | 1
             22 |            CSETM_1 |           CSETM |   0x82140000 | 1
             23 |        CSTFunnel_3 |       CSTFunnel |   0x820C0000 | 1
             24 |              ELA_0 |             ELA |   0x820D0000 | 1
             25 |       Cortex-A53_0 |      Cortex-A53 |   0x83010000 | 1
             26 |            CSCTI_5 |           CSCTI |   0x83020000 | 1
             27 |            CSPMU_2 |           CSPMU |   0x83030000 | 1
             28 |            CSETM_2 |           CSETM |   0x83040000 | 1
             29 |       Cortex-A53_1 |      Cortex-A53 |   0x83110000 | 1
             30 |            CSCTI_6 |           CSCTI |   0x83120000 | 1
             31 |            CSPMU_3 |           CSPMU |   0x83130000 | 1
             32 |            CSETM_3 |           CSETM |   0x83140000 | 1
             33 |       Cortex-A53_2 |      Cortex-A53 |   0x83210000 | 1
             34 |            CSCTI_7 |           CSCTI |   0x83220000 | 1
             35 |            CSPMU_4 |           CSPMU |   0x83230000 | 1
             36 |            CSETM_4 |           CSETM |   0x83240000 | 1
             37 |       Cortex-A53_3 |      Cortex-A53 |   0x83310000 | 1
             38 |            CSCTI_8 |           CSCTI |   0x83320000 | 1
             39 |            CSPMU_5 |           CSPMU |   0x83330000 | 1
             40 |            CSETM_5 |           CSETM |   0x83340000 | 1
             41 |        CSTFunnel_4 |       CSTFunnel |   0x830C0000 | 1
             42 |              ELA_1 |             ELA |   0x830D0000 | 1
             43 |         ARMCS-DP_1 |        ARMCS-DP |         None |
             44 |          CSMEMAP_2 |        AHB-AP-M |   0x00000000 | 0
             45 |          Cortex-M3 |       Cortex-M3 |   0xE000E000 | 0
             46 |              CSDWT |           CSDWT |   0xE0001000 | 0
             47 |              CSFPB |           CSFPB |   0xE0002000 | 0
             48 |              CSITM |           CSITM |   0xE0000000 | 0
             49 |            CSETM_6 |           CSETM |   0xE0041000 | 0
             50 |        CSTFunnel_5 |       CSTFunnel |   0xE0042000 | 0
             51 |              CSSWO |           CSSWO |   0xE0043000 | 0
             52 |            CSCTI_9 |           CSCTI |   0xE0044000 | 0
             53 |  CSATBReplicator_1 | CSATBReplicator |   0xE0045000 | 0
    
    %> dpregread AP0.TAR
    Device no. 1 is active.
    Reading from device no. 1: CSMEMAP_0
    AP0:0x341 : 0x00000FF0
    
    %> dpregwrite AP0.TAR 0xEFC4AFC0
    Device no. 1 is active.
    Writing to device no. 1: CSMEMAP_0
    
    %> dpregread AP0.TAR
    Device no. 1 is active.
    Reading from device no. 1: CSMEMAP_0
    AP0:0x341 : 0xEFC4AFC0
    
    %> dpregread AP1.TAR
    Device no. 2 is active.
    Reading from device no. 2: CSMEMAP_1
    AP1:0x341 : 0x830C0FCC
    
    %> dpregread AP0.IDR
    Device no. 1 is active.
    Reading from device no. 1: CSMEMAP_0
    AP0:0x37F : 0x14770004
    
    %> dpregread AP2.IDR
    Device no. 44 is active.
    Reading from device no. 44: CSMEMAP_2
    AP2:0x37F : 0x24770011
    
    %> dpregwrite device44.TAR 256
    Device no. 44 is active.
    Writing to device no. 44: CSMEMAP_2
    
    %> drr CSMEMAP_2.TAR
    Device no. 44 is active.
    Reading from device no. 44: CSMEMAP_2
    CSMEMAP_2:0x341 : 0x00000100
    
    %> drw device44.0x341 0xF00F
    Device no. 44 is active.
    Writing to device no. 44: CSMEMAP_2
    
    %> drr CSMEMAP_2.TAR
    Device no. 44 is active.
    Reading from device no. 44: CSMEMAP_2
    CSMEMAP_2:0x341 : 0x0000F00F
  • Example 6 Adding additional probe

    This example shows how to load, set, and connect to an additional probe called MyProbe.

    Note: The example assumes that you have started CSAT600 (csat -cs600).

    %> loadprobes c:\work\probes.xml
    Parsing file c:\work\probes.xml...
    Probe MyProbe was loaded.
    
    %> listprobes
    * DSTREAM         built-in
       DSTREAM-HT      built-in
       DSTREAM-PT      built-in
       DSTREAM-ST      built-in
       MyProbe         from c:\work\probes.xml
       RealView ICE    built-in
    
    %> setprobe MyProbe
    Probe type was set to MyProbe.
    
    %> listprobes
       DSTREAM         built-in
       DSTREAM-HT      built-in
       DSTREAM-PT      built-in
       DSTREAM-ST      built-in
    * MyProbe         from c:\work\probes.xml
       RealView ICE    built-in
    
    %> connect MyProbeAddress
    Connecting to MyProbeAddress ...
    Starting debug server...
    Debug server started successfully.
    Connected to: MyProbe
    Configuration file: C:\Users\<user>\AppData\Local\Temp\csat_scanchain_devices5986504949331606589.sdf
    
    %> disconnect
    Disconnected from MyProbeAddress
    
    %> setprobe DSTREAM
    Probe type was set to DSTREAM.
    
    %> connect MyProbe:MyProbeAddress
    Probe type was set to MyProbe.
    Connecting to MyProbeAddress ...
    Starting debug server...
    Debug server started successfully.
    Connected to: MyProbe
    Configuration file: C:\Users\<user>\AppData\Local\Temp\csat_scanchain_devices2078644656863206288.sdf
    
    %> disconnect
    Disconnected from MyProbeAddress

Previous