Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Open Source Software and Platforms
Open Source Software and Platforms
Wiki Guide to Set Up Debugging Environment for Total Compute Software Stack
  • Help
  • Jump...
  • Cancel
  • About this wiki
  • Supported platforms
  • Obtaining support
  • +Arm Reference Platforms deliverables
  • -A-class platforms
    • +Juno
    • +FVPs
    • -Total Compute Platforms
      • Guide to Set Up Debugging Environment for Total Compute Software Stack
      • Guide to Debug RSS Firmware Booting on Total Compute Platform
      • Guide to Debug SCP Firmware Booting on Total Compute Platform
      • Guide to Set Up TF-A Firmwares Debug Environment on Arm DS for Total Compute Platform
      • Guide to Debug Hafnium on Total Compute Platform
      • Guide to Disable AP Secure Images on Total Compute Platform
      • Guide to Run OpenEuler Embedded on TC2 Platform
      • Guide to add "Hello World" application into edk2 of TC2 LSC platform?
      • Guide to Set Up Linux Kernel Debug Environment on Arm DS for Total Compute Platform
      • Guide to Set Up U-boot Debug Environment on Arm DS for Total Compute Platform
    • +Morello Platform
    • +System Guidance for Infrastructure (SGI)
    • +System Guidance for Mobile (SGM)
    • Corstone-500
    • Cortex-A5 DesignStart
    • +Neoverse N1 SDP
    • Neoverse Reference Designs
    • +Legacy platforms
  • +M-class platforms
  • +R-class platforms
  • +FPGA prototyping boards
  • +Open source software

You are currently reviewing an older revision of this page.

  • History View current version

Guide to Set Up Debugging Environment for Total Compute Software Stack

Arm Total Compute Solutions (TCS) is the platform for mobile computing, with double double-digit gains in CPU performance and efficiency to power the next generation of AI and immersive mobile gaming experiences.

Total Compute (TC) software stack is a reference software stack for the Arm Total Compute Fixed Virtual Platform (FVP). The TC software consists of firmware, kernel and file system components that can run on the associated FVP.

Some of its main components are as follows:

  • RSS firmware, which provides Hardware Root of Trust
  • SCP firmware, which is responsible for system initialization, clock and power control;
  • AP firmware, which is Trusted Firmware-A (TF-A)
  • Secure Partition Manager - Hafnium
  • Secure Partitions:
    • OP-TEE Trusted OS in Buildroot
    • Trusted Services in Buildroot
    • Trusty Trusted OS in Android
  • U-Boot, which loads and verifies kernel and rootfs
  • Linux Kernel

This blog shows you how to set up the debugging environment step by step, including how to configure the debug environments for RSS, SCP, and AP.

Prerequisites

This blog assumes that you already set up the following environment:

  • Host PC (Ubuntu Linux 20.04)
  • TC2 Fast Model platform (FVP) (version 11.23.17)
  • Arm Development Studio (Latest version)
  • Download and build TC2 software stack, by following the Total Compute User Guide. 

Overview

This blog describes the following steps to set up debugging environment for Total Compute Software Stack:

Step 1: Import TC FVP Model into Arm DS.

Step 2: Start FVP and launch the Iris debug server.

Step 3: Establish debug connections in Arm DS, including:

Application Processor debug connection.
System Control Processor debug connection.
Runtime Security Subsystem debug connection.

Step 4: Load corresponding symbol tables file and start debugging.

Step 1: Import TC FVP Model into Arm DS

Arm DS supports some built-in FVP models, but TC2 FVP is not included in the built-in models of Arm DS. Before you start debugging TC2, you must use the Model Configuration wizard in Arm DS to create debug configurations for new models:

  1. Open the Model Configuration wizard
    From the Main menu, select File -> New -> Other -> Configuration Database -> Model Configuration and click Next, as follows:



  2. Create the configuration database where you want to include your TC2 model, as follows:



  3. Choose Configuration Database and click Next, as follows:



  4. Select Iris as the model interface for connecting to your model, as follows:



  5. Select the Launch and connect to specific to your model, as follows:



  6. In Model Selection from File System dialog box, click File to browse for a model and select it, as follows:



  7. Click the Import button to import the TC2 FVP model, as follows:

  8. Verify whether the import is successful, by checking for the imported model in the Project Explorer, as follows:



Note: If you encounter a smiliar error message, as shown in the following figure, during the import process, it is because the current version of Arm DS cannot recognize the latest CPU type. In this case, you must update Arm DS to the latest version to support this CPU type.

Step 2: Start FVP and launch the Iris debug server

By default, to run the software stack for TC, the following command is used to launch the FVP.

./run-scripts/tc2/run_model.sh -m <model binary path> -d <distro>

For debugging TC software with Arm DS, it is necessary to start the Iris debug server when starting the FVP. This allows Arm DS to connect to the debug server later. To initiate the Iris debug server during FVP startup, include an additional option -I. When connecting Arm DS to the Iris debug server, the server port is required. To print this port during startup, include an additional parameter -p. This way, the FVP can be launched by using the following command:

./run-scripts/tc2/run_model.sh -m <model binary path> -d <distro> -- -I -p

By default, FVP uses xterm to initialize the serial port output and input for TC platform. In certain situations, the xterm font might appear relatively small, so copying and pasting operations might not be as convenient. For example:

If you want to replace it with the default terminal of Ubuntu, you must add additional parameters as follows:

./run-scripts/tc2/run_model.sh -m <model binary path> -d <distro> -- -I -p \
-C css.terminal_uart1_ap.terminal_command="gnome-terminal -t %title -- telnet localhost %port" \
-C css.terminal_uart_ap.terminal_command="gnome-terminal -t %title -- telnet localhost %port"  \
-C soc.terminal_s0.terminal_command="gnome-terminal -t %title -- telnet localhost %port"  \
-C soc.terminal_s1.terminal_command="gnome-terminal -t %title -- telnet localhost %port "

The serial ports of the TC FVP are as follows:

After running this command, the output is as follows:

Iris server started listening to port 7100
INFO: GPU Model initialized.
INFO: TC2.css.cmn: CI-700 r1p0 model, periphbase=0x0000000050000000, mesh_config_file='TC2_ci700.yml'

terminal_uart_ap: Listening for serial connection on port 5006
terminal_uart1_ap: Listening for serial connection on port 5007
terminal_s0: Listening for serial connection on port 5008
terminal_s1: Listening for serial connection on port 5009
terminal_0: Listening for serial connection on port 5010
terminal_1: Listening for serial connection on port 5011

You can observe the port of the Iris debug server, which can be used later.

Step 3: Establish debug connections in Arm DS