Skip to content

Commit 059ddeb

Browse files
Zena debug part 1
1 parent b96db01 commit 059ddeb

File tree

7 files changed

+304
-0
lines changed

7 files changed

+304
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Debug Arm Zena CSS Reference Software Stack with Arm Development Studio
3+
4+
description: Learn how to set up a debug environment for Arm Zena CSS Reference Software Stack
5+
6+
minutes_to_complete: 60
7+
8+
who_is_this_for: This topic is for software developers who wish to use Arm Development Studio to explore and debug the Arm Zena CSS Reference Software Stack
9+
10+
learning_objectives:
11+
- Set up debug configuration for the Arm Zena CSS FVP
12+
- Debug System Control Processor (SCP) from boot time
13+
- Debug Safety Island (SI) processor
14+
- Debug Linux OS on Applications Processor
15+
- Debug Linux application
16+
17+
prerequisites:
18+
- Ubuntu 22.04 host machine
19+
- Arm Development Studio 2024.1 (or later) and an appropriate license
20+
- A basic understanding of the Arm Zena CSS software stack
21+
22+
author: Ronan Synnott
23+
24+
### Tags
25+
skilllevels: Introductory
26+
subjects:
27+
armips:
28+
- Arm Zena CSS
29+
operatingsystems:
30+
- Linux
31+
tools_software_languages:
32+
- Arm Development Studio
33+
34+
35+
further_reading:
36+
- resource:
37+
title: Arm Zena Compute System (CSS)
38+
link: https://developer.arm.com/Compute%20Subsystems/Arm%20Zena%20Compute%20Subsystem
39+
type: website
40+
- resource:
41+
title: Arm Development Studio
42+
link: https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio
43+
type: website
44+
45+
46+
### FIXED, DO NOT MODIFY
47+
# ================================================================================
48+
weight: 1 # _index.md always has weight of 1 to order correctly
49+
layout: "learningpathall" # All files under learning paths have this same wrapper
50+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
51+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# User change
3+
title: "Model Configuration"
4+
5+
weight: 4 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
# Debug Configuration
12+
13+
Arm Development Studio requires a `Debug Configuration` of the target that it will connect to.
14+
15+
As of 2025.0, there is no such configuration provided 'out-of-the-box' for the Zena CSS FVP. However creating such a configuration is straight forward.
16+
17+
See the Arm Development Studio [Getting Started Guide](https://developer.arm.com/documentation/101469/latest/Migrating-from-DS-5-to-Arm-Development-Studio/Connect-to-new-or-custom-models) for full instructions, but summarized below.
18+
19+
## Launch FVP
20+
21+
As per previous section, launch FVP with the Iris server enabled:
22+
23+
```command
24+
kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose -- --iris-server --iris-port 7100"
25+
```
26+
27+
## Configuration Database
28+
29+
Debug Configurations are stored in a configuration database. You must first create a local database in which to store the configuration.
30+
31+
Navigate to `File` > `New` > `Other`, and then select `Configuration Database` > `Configuration Database` from the drop-down list.
32+
33+
![New Configuration Database](configdb.png)
34+
35+
Click `Next`. Give the Database a meaningful name, and click `Finish`.
36+
37+
## Debug Configuration
38+
39+
Navigate to the same wizard as above, and select `Model Configuration`.
40+
41+
Click `Next`, and you will be prompted to select the above `Configuration Database`. Click `Next` again, and you will be prompted to select a Model Interface.
42+
43+
Select `Iris` from the pulldown, and click `Next`.
44+
45+
You will then be prompted to locate the model to connect to.
46+
47+
Select `Browse for model running on local host`. The FVP will be detected and interrogated by the debugger.
48+
49+
A `model.mdf` file will be created that identifies all CPUs within the FVP.
50+
51+
You can change the `Manufacturer Name` and `Platform Name` to something more meaningful (such as `Arm` and `Zena_CSS_FVP`), then `Save`, and `Import` into the configuration database.
52+
53+
The debugger is now aware of the FVP and you are ready to debug.
27.3 KB
Loading
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
# User change
3+
title: "Debug Connections"
4+
5+
weight: 5 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
You are now ready to create debug connections for each of the sub-systems within Zena CSS. This section will create the connections, which will be subsequently enhanced in the following section. You may prefer to fully set up one such connection before moving to others.
12+
13+
Development Studio has full support for Heterogeneous systems such as Zena CSS, and so you can connect to all processors simultaneously.
14+
15+
### Debug connection project
16+
17+
It may be sensible to create a project to store these connections (`.launch` files) in.
18+
19+
Select `File` > `New...` > `Project` > `General` > `Project`, and give it a meaningful name (`Connections`).
20+
21+
## RSE (Cortex-M55)
22+
23+
Runtime Security Engine (RSE) is based on [Cortex-M55](https://developer.arm.com/Processors/Cortex-M55) core and is a security subsystem fulfilling the role of Root of Trust.
24+
25+
Select `File` > `New` > `Model Connection`.
26+
27+
{{% notice Note %}}
28+
You can also use `File` > `New` > `Other` > `Arm Debugger` > `Model Connection`, or
29+
30+
`Create a debug connection...` shortcut in the `Debug Control` pane.
31+
{{% /notice %}}
32+
33+
Specify a connection name (`RSE`), and associate with the above project. Click `Next`.
34+
35+
Locate the FVP based on the name you gave it previously (`Zena_CSS_FVP`). The text filter can help locate easily.
36+
37+
You will then be presented with the `Edit configuration` pane. In the `Connection` tab, scroll down to locate `Bare Metal Debug` > `Arm_Cortex-M55`.
38+
39+
As we shall be later launching the FVP with the software stack loaded, select `Connect to an already running model`.
40+
41+
Assuming the same host will be running both the FVP and the debugger, specify the `Connection address` as the default `127.0.0.1:7100`.
42+
43+
{{% notice Note %}}
44+
`127.0.0.1` is the same as `localhost`. It is also possible to connect to a remote host by specifying appropriate address.
45+
46+
`7100` is the default port number. You may need to change this if necessary.
47+
{{% /notice %}}
48+
49+
Click `Apply` to save the connection information, and `Close`. Observe that `RSE.launch` is created inside the `Connections` project.
50+
51+
## Safety Island (Cortex-R82AE)
52+
53+
The Safety Island is a subsystem based on [Cortex-R82AE](https://developer.arm.com/Processors/Cortex-R82AE) core. The software running on the Safety Island is responsible for power, clock and CMN control.
54+
55+
The procedure to create this connection is very similar to the above, other than to select `Bare Metal Debug` > `Arm_Cortex-R82AE` from the pull down.
56+
57+
You can copy-and-paste `RSE.launch` as `SI.launch` and open to change the CPU.
58+
59+
## Primary Compute (Cortex-A720AE)
60+
61+
The Primary Compute consists of four processor clusters to run a rich OS such as Linux. Each processor cluster includes four [Cortex-A720AE](https://developer.arm.com/Processors/Cortex-A720AE) cores and a [DSU-120AE](https://developer.arm.com/Processors/DSU-120AE) DynamIQ Shared Unit.
62+
63+
The application processors will be debugged in an SMP configuration with Linux Kernel awareness.
64+
65+
As above, create `Primary.launch` connection and scroll to `Linux Kernel Debug` > `ARM_Cortex-A720AEx16 SMP Cluster 1`.
66+
67+
This will connect to all Cortex-A720AE processors present in the FVP, though only cores 0-3 are used.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
# User change
3+
title: "Launch FVP"
4+
5+
weight: 3 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
From the [documentation](https://arm-auto-solutions.docs.arm.com/en/v2.0/rd-aspen/user_guide/reproduce.html#run-the-fvp) the default command to launch the FVP with the software stack loaded is:
12+
13+
```command
14+
kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose"
15+
```
16+
17+
However this does not enable the Iris debug server inside the model, and so will not be debuggable. Additional command options are necessary.
18+
19+
We will use the following. See output of `FVP_RD_Aspen --help` for full list and explanation. Options are case-sensitive.
20+
21+
| Option | Alias | Notes |
22+
|---------------------- |--------- |---------------------------------------------- |
23+
| \-\-iris-server | -I | Start Iris Debug Server |
24+
| \-\-iris-port | | Specify a port number (default = `7100`) |
25+
| \-\-run | -R | Run simulation when debug server started |
26+
| \-\-iris-allow-remote | -A | Allow remote connections (if different hosts) |
27+
28+
## Launch FVP with additional options
29+
30+
To launch the FVP with additional options, modify the above command by adding `--` and then the options.
31+
32+
For example, to launch the model with the debug server and hold at the initial reset condition:
33+
34+
```command
35+
kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose -- --iris-server --iris-port 7100"
36+
```
37+
38+
To launch the model and start running (so that it can start to boot up):
39+
40+
```command
41+
kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose -- --iris-server --iris-port 7100 --run"
42+
```
43+
44+
To launch the model so that remote hosts can access it (not recommended if not needed), using options aliases:
45+
46+
```command
47+
kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose -- -I -A --iris-port 7100"
48+
```
49+
50+
{{% notice Note %}}
51+
It is recommended to specify the port number used even if it is the default as that must match the debug connection setting (see later).
52+
{{% /notice %}}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
# User change
3+
title: "Getting started"
4+
5+
weight: 2 # 1 is first, 2 is second, etc.
6+
7+
# Do not modify these elements
8+
layout: "learningpathall"
9+
---
10+
11+
# Arm Zena Compute Subsystem
12+
13+
The Arm Zena Compute Subsystem (CSS) consists of a high-performance Arm Cortex-A720AE Application Processor (Primary Compute) system augmented with an Arm Cortex-R82AE based Safety Island (SI) and real-time domain to host additional system safety monitoring and real-time services.
14+
15+
The system additionally includes a Runtime Security Engine (RSE) used for the secure boot of the system elements and the runtime secure services.
16+
17+
The Arm Zena CSS software stack provides an open-source, integrated solution running on a Fixed Virtual Platform (FVP).
18+
19+
The reference software stack and the FVP are freely available.
20+
21+
For more information, see [Arm Zena Compute Subsystem (CSS)](https://developer.arm.com/Compute%20Subsystems/Arm%20Zena%20Compute%20Subsystem) and associated links.
22+
23+
## Build software stack
24+
25+
The steps to download and build the software stack are described in the [User Guide](https://arm-auto-solutions.docs.arm.com/en/v2.0/rd-aspen/user_guide/reproduce.html).
26+
27+
The default `Arm Automotive Solutions Demo` build is used.
28+
29+
{{% notice Note %}}
30+
This learning path is focused on **debugging** the software stack only.
31+
{{% /notice %}}
32+
33+
## Verify correct build and execution
34+
35+
Once the software stack has been built, you can verify that it runs successfully with the command:
36+
37+
``` command
38+
kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose"
39+
```
40+
41+
The system will run through the boot process until a Linux prompt is available (in `terminal_ns_uart0`).
42+
43+
Use `Ctrl+C` on the command terminal to terminate.
44+
45+
## Install FVP (optional)
46+
47+
The FVP is downloaded and installed as part of the build process above.
48+
49+
The `Arm-Zena-CSS-FVP` can also be independently downloaded from the Arm Developer [website](https://developer.arm.com/Tools%20and%20Software/Fixed%20Virtual%20Platforms/Automotive%20FVPs).
50+
51+
See also the Arm Ecosystem FVPs and Architecture Envelope Models [Install Guide](/install-guides/fm_fvp/eco_fvp/).
52+
53+
{{% notice Note %}}
54+
For legacy reasons the FVP is named is `FVP_RD_Aspen`.
55+
{{% /notice %}}
56+
57+
# Arm Development Studio
58+
59+
Arm Development Studio is a software development solution with support of multicore debug for Arm CPUs. It provides the earliest support for the latest processors.
60+
61+
The CPUs implemented within Arm Zena CSS are supported by Arm Development Studio 2024.0 and later, though 2024.1 or later is recommended for appropriate Linux OS support. At time of writing the latest version available is 2025.0, and that is the version used for screenshots etc in this learning path.
62+
63+
For more information see [Arm Development Studio](https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio).
64+
65+
Arm Development Studio is a commercial, license managed, product. For installation and set up instructions, see this [Install Guide](/install-guides/armds/).
66+
67+
Launch the IDE. We recommend creating a new workspace folder.
68+
69+
If prompted by the launcher (this is disabled by default) create a new folder there, else select `File` > `Switch Workspace` > `Other...`.
70+
71+
{{% notice %}}
72+
To enable this prompt by default, navigate to `Window` > `Preferences` > `General` > `Startup and Shutdown` > `Workspaces`, and enable `Prompt for workspace on startup`.
73+
{{% /notice %}}

0 commit comments

Comments
 (0)