NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

System Analyzer Tutorial 3B

From Texas Instruments Wiki
Jump to: navigation, search

System Analyzer Tutorial 3B: Real-time Visibility for SysBios[edit]

Configuring the NDK to enable UIA to use Ethernet as a Transport[edit]

UIA Transports[edit]

So far in these tutorials, we've used the following transports to move events from the target to System Analyzer running on the host:

These transports are convenient, in that they work across a broad range of devices and require little setup. They do require a JTAG connection (or the use of a simulator) however, and are limited by the bandwidth of the JTAG connection itself (Debug Server's JTAG data steam bandwidth is typically around 150 KBytes / sec). As well, currently only C64X+ and C66 devices support the JTAG Run Mode transport and are thus capable of streaming events up from the target while the target is running.

In Tutorial 3B, we're going to explore Non-JTAG transports - in particular, we'll be using TCP/IP over Ethernet (port 1234) to send commands between the target and System Analyzer on the host, and using UDP (port 1235) to upload events from the target to System Analyzer, all while the target is running, and with a much higher bandwidth than is possible than when using JTAG. The following table from the System Analyzer User's Guide (spuh43b) provides a summary of the various upload modes:

EventUploadModes.gif

The Network Development Kit (NDK)[edit]

For this Tutorial, we'll be using the Network Development Kit (NDK) to provide the network stack on the target, as well as chip-support libraries from the Platform Development Kit (PDK), both of which are provided by the Multicore Software Development Kit (MCSDK). MCSDK 1.x supports the C64X+ family (specifically the TMS320C6474, C6472 and C6457 devices), and MCSDK 2.x supports the C66X family. More info on the NDK is available at http://www.ti.com/tool/ndktcpip . Please see the UIA Release notes in <uia install folder>\docs\relnotes_archive for version compatibility info.

So, let's use the project we built in tutorial 3A as a starting point, and modify it to use Ethernet as a transport. You will need an EVM board that is supported by either MCSDK 1.x (e.g. the TMS320C6474L-EVM or TMS320C6472 EVM) or MCSDK 2.x (e.g. the TMS320C6678L EVM). The same basic flow can be used by boards supported by the Network Support Package (NSP) (e.g. the evmOMAPL138 and evm6748 boards).

A good way to quickly discover what is needed is to look at the build settings for the examples that ship with the MCSDK. Two walk-throughs that show how to do this are provided, one showing how to work with C64X+ devices and MCSDK 1.X, and the second showing how to work with C66X devices and MCSDSK 2.X:

Examples:

Connecting to a target that also has a JTAG connection[edit]

If you are using CCS and have a JTAG connection to the target, System Analyzer monitors the strings that are output to the console window to automatically detect the IP address that is assigned to the target. A "System Analyzer Welcome" view will open up when it detects the IP address to let you know that System Analyzer has all the info it needs to start monitoring the events logged by the target.

The following steps show how to launch and run the target, and configure System Analyzer to view the log events we saw in Tutorial 3A, only this time, they will be uploaded via Ethernet:

  • Launch the target
  • View / Target Configurations / (the .ccxml file for your target)
  • Connect core 0 and load the program
  • it should run to main
Make sure that the "System Analyzer Welcome" window has not been disabled
  • If you have previously checked the "Do not show again" checkbox on the System Analyzer Welcome window, you can clear this setting by manually opening the view (Window / Show View / Other.../ UIA / System Analyzer Welcome) and then closing it normally.
  • Run the program
  • you should see information about the status of the network connection displayed in the Console window.
  • when the IP address is established it will open up the System Analyzer Welcome view, which will report the IP address that was detected.

Start System Analyzer

  • Tools / System Analyzer / Live / check the "Until data transfer is manually paused" radio button, Run

Connecting to a remote target[edit]

If you are accessing a system in the field, you will need to know it's IP address and will need to provide this information to System Analyzer by creating a System Analyzer configuration file.

To do this, open System Analyzer / Live and click on the "Create UIA Config File" button in the upper right corner of the Live Parameters dialog box. This will open up a UIA Config view.
UIAconfig.gif

1. Delete any items that are displayed in the UIA Config view table

  • right-click on each item in the table and select "Delete".
  • (Alternatively, you can edit existing items by right-clicking on each item and selecting "Edit". For this tutorial, the following text assumes you have deleted all items.)

2. Add an Event Transport

  • Right click on the table and select "Add an event transport".
  • Transport Type : UDP
  • Address : If you have configured your target with a static IP address or know what address has been assigned, enter the IP address in the Address field. Otherwise, enter 127.0.0.0 for now (we can change it later in the Tools / System Analyzer / Live dialog).
  • Port Number : 1235.
  • (Note that this is currently hard-coded in releases up to and including uia_1_00_02_22; other port numbers are not supported)
  • click OK

3. Add a Control & Status Transport

  • Right click on the table and select "Add a Control & Status Transport"
  • Transport Type : TCPIP
  • Address : enter the same value you entered for the Event transport
  • Port Number : 1234.
  • (Note that this is currently hard-coded in releases up to and including uia_1_00_02_22; other port numbers are not supported)
  • click OK

4. Add an Endpoint

  • Right click on the table and select "Add an endpoint"
  • Name : if you have a live debug session, select the CPU name from the name field drop-down list. (Using a valid debug session name for the CPU is very important for JTAG connections. It is not critical for Ethernet connections; if you are not connected, simply enter "CPU0" for the name of the first CPU on the device).
  • Endpoint Address : 0 (used where Ethernet transport is used to connect to a single CPU core)
  • In multicore devices where one CPU acts as a 'master' CPU (and runs the Ethernet stack) and the others act as 'slave' CPUs, the endpoint address must correspond to the ServiceMgr module’s Core ID, which usually defaults to the index number of the ti.sdo.utils.MultiProc ID from IPC. For C6X cores, it is typically the same as the value returned in the CPU's DNUM register.
  • .out file : The filename of the compiled and linked target application.
  • Click the ElipsisButton.gif button and browse to find the file.
  • The file extension may by .out or may contain the platform, for example, .x64P.
  • When you click OK, the dialog checks to make sure this file exists.
  • .uia.xml file (the UIA metadata file) : This is typically auto-discovered when you select a.out file.
  • If it is not, or the file does not exist, click the ElipsisButton.gif button to manually specify which file to use.
  • Typically, starting in the same folder that the .out file was in, the uia.xml file will be in the \configPkg\package\cfg subdirectory.
  • Select the file that ends with ".uia.xml" and click OK.
  • .rta.xml file (the SysBios metadata file) : This is typically auto-discovered when you select a .out file.
  • If the file cannot be found automatically, click the ElipsisButton.gif button and browse to find the file. This file is likely to be stored in the same directory as the .uia.xml file.
  • Clock freq (MHz) : Enter the clock speed for this CPU in MHz.
  • If you do not provide the correct value here, the durations reported by System Analyzer will not be converted to nanoseconds correctly.
  • Cycles per tick : 1 (the number of cycles per clock tick used by the local CPU timestamp).
  • If you do not provide the correct value here, the durations reported by System Analyzer will not be converted to nanoseconds correctly.
  • Stopmode JTAG monitor : leave unchecked.
  • Check this box if you want records to be transferred via JTAG when the target is halted. That is, check this box if the target application on this endpoint is configured to use any of the following settings for the eventUploadMode parameter of the LoggingSetup module: Upload_SIMULATOR, Upload_PROBEPOINT, or Upload_JTAGSTOPMODE

5. Save the file

  • Click Save and save as DefaultSession.usmxml (e.g. in the main folder of your project)

Now, back in the System Analyzer "Live Parameters" dialog (i.e. the one that opens when you select Tools / System Analyzer / Live):

  • click on the ElipsisButton.gif button and select the file you just created.
  • If the NDK has been configured for DHCP, you can override the IP Address field with whatever IP address is currently assigned to the board.
  • Click on the "Until data transfer is manually paused" radio button and click Run.
  • The Ethernet connection should then be established with the remote system and the Log view should open up automatically.


Next: Tutorial 3C: The Execution Graph, CPU Load Graph and Task Load Graph.

Links:

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article System Analyzer Tutorial 3B here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article System Analyzer Tutorial 3B here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article System Analyzer Tutorial 3B here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article System Analyzer Tutorial 3B here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article System Analyzer Tutorial 3B here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article System Analyzer Tutorial 3B here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article System Analyzer Tutorial 3B here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article System Analyzer Tutorial 3B here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article System Analyzer Tutorial 3B here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity