Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/learning-paths/automotive/zenacssdebug/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ learning_objectives:

prerequisites:
- Ubuntu 22.04 host machine
- Arm Development Studio 2024.1 or later with a valid license - for support see the [Install Guide for ADS](/install-guides/armds)
- Arm Development Studio 2024.1 or later with a valid license - for support see the [Install Guide for Arm DS](/install-guides/armds)
- Basic understanding of the Arm Zena CSS software stack, Armv8-A/Armv9-A cores, and Linux

author: Ronan Synnott
Expand Down
18 changes: 13 additions & 5 deletions content/learning-paths/automotive/zenacssdebug/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,27 @@ Debug configurations are stored in a configuration database. Create a local data
- Open the same wizard (**File > New > Other**), then choose **Configuration Database > Model Configuration**.
- Click **Next**, select the **Configuration Database** you created, then click **Next**.
- For **Model Interface**, choose **Iris**, then click **Next**.
- Choose **Browse for model running on local host**. The debugger detects and interrogates the FVP.
- Choose **Browse for model running on local host**. Select your FVP and click **Finish**. The debugger detects and interrogates the FVP.
- If connecting remotely, choose **Connect to model running on either local or remote host** and provide the host and port.

{{% notice Tip %}}
The name of the FVP may be displayed as `RD_ASD` or other.

If unsure, use the port number to identify the correct FVP.
{{% /notice %}}

Arm Development Studio generates a `model.mdf` file that enumerates all CPUs in the FVP.

Optionally, update **Manufacturer Name** (for example, `Arm`) and **Platform Name** (for example, `Zena_CSS_FVP`). Then **Save** and **Import** the model into the configuration database.
Optionally, update **Manufacturer Name** (for example, `Arm`) and **Platform Name** (for example, `Zena_CSS_FVP`).

**Save** and **Import** the model into the configuration database.

{{% notice Tip %}}
If the FVP is not detected, verify the Iris server is running on the expected port (`7100` by default) and that your firewall allows local connections. For remote connections, confirm the host is reachable and the port is open.
If the FVP is not detected, verify the Iris server is running on the expected port (`7100` by default) and that your firewall allows local connections.

For remote connections, confirm the host is reachable and the port is open.
{{% /notice %}}

A `model.mdf` file will be created that identifies all CPUs within the FVP.

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.

The debugger is now aware of the FVP and you are ready to debug.
19 changes: 14 additions & 5 deletions content/learning-paths/automotive/zenacssdebug/primarycompute.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ For example the processors start in `EL3` and move to `EL2N` when the Linux kern

``` text
stop
add-symbol-file /arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-a/2.11.0+git/image/firmware/bl2.elf EL3:0x0
add-symbol-file "/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-a/2.13.0+git/image/firmware/bl2.elf" EL3:0x0
tbreak bl2_entrypoint

```

{{% notice Note %}}
Expand All @@ -41,12 +42,20 @@ Symbol loading is Exception Level–aware. If execution changes Exception Level,

## Debug the Linux kernel with OS awareness (symmetric multiprocessing)

Switch to the `Primary_Linux.launch` connection you created earlier to enable Arm Development Studio OS awareness for the Linux kernel. Load the kernel symbols and set source mapping if your kernel sources are located outside the default paths:
{{% notice Note %}}
OS awareness for Linux Kernel 6.12 (as used with Reference Software Stack 2.1) is not currently supported as of Arm Development Studio 2025.0.

It will be supported in a future Development Studio version.
{{% /notice %}}

Disconnect `Primary_init.launch` and use the `Primary_Linux.launch` connection you created earlier to enable Arm Development Studio OS awareness for the Linux kernel.

Load the kernel symbols and set source mapping if your kernel sources are located outside the default paths:

```text
stop
add-symbol-file /arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/linux-yocto/6.6.54+git/linux-fvp_rd_aspen-standard-build/vmlinux EL2N:0x0
set substitute-path /usr/src/kernel/ /arm-auto-solutions/build/tmp_baremetal/work-shared/fvp-rd-aspen/kernel-source/
add-symbol-file "/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/linux-yocto-rt/6.12.30+git/linux-fvp_rd_aspen-preempt-rt-build/vmlinux" EL2N:0x0
set substitute-path "/usr/src/kernel/" "/arm-auto-solutions/build/tmp_baremetal/work-shared/fvp-rd-aspen/kernel-source/"
```

Run the FVP until the OS prompt appears.
Expand All @@ -73,7 +82,7 @@ You might see a warning like:
```text
WARNING(ROS60): Could not enable OS support as the OS does not appear to be initialized. This might be caused by a mismatch between the loaded symbols and the code on the target or because the OS is not up and running. Enabling OS support will be re-attempted when the target next stops.
```
This occurs if the OS has not completed boot when you connect; it is safe to ignore and will clear after the next target stop.
This occurs if the OS has not completed boot when you connect; it is safe to ignore and will clear when stopping target after the OS has booted.
{{% /notice %}}

You have successfully learnt how to use Arm Development Studio to explore and debug the Arm Zena CSS Reference Software Stack.
18 changes: 11 additions & 7 deletions content/learning-paths/automotive/zenacssdebug/rse.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ Load TF‑M symbols and map sources:

- In **Debug Control**, open the pane menu and choose **Load...**
- Select **Add Symbols file**.
- Choose the TF‑M image, for example:
- Locate the TF‑M image, for example:
```bash
/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.1.0/build/bin/bl1_1.axf
/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.2.1+git/build/bin/bl1_1.axf
```
When prompted for **substitute path**, map build-time paths to your local sources, for example:
```bash
/usr/src/debug/trusted-firmware-m/2.1.0/
/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.1.0/git/tfm/
/usr/src/debug/trusted-firmware-m/2.2.1+git/
/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.2.1+git/git/tfm/
```

Step one instruction to fetch the reset handler and stop there:
Step one instruction to fetch the reset handler and stop there. In the debugger `Commands` pane enter:
```text
stepi
```
Expand All @@ -78,10 +78,14 @@ Automate the connection steps by adding **Debugger Commands** to the `.launch` c

```text
stop
add-symbol-file /arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.1.0/build/bin/bl1_1.axf
set substitute-path /usr/src/debug/trusted-firmware-m/2.1.0/ /arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.1.0/git/tfm/
add-symbol-file "/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.2.1+git/build/bin/bl1_1.axf"
set substitute-path "/usr/src/debug/trusted-firmware-m/2.2.1+git/" "/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/trusted-firmware-m/2.2.1+git/git/tfm/"
stepi
```

{{% notice Note %}}
Use the `Commands` or `History` pane to see and copy the equivalent debugger commands of the GUI actions.
{{% /notice %}}

![RSE.launch in Arm Development Studio showing Debugger pane with TF-M symbols loaded and path substitution mapping alt-text#center](debugger_commands.png "RSE Debugger pane with TF-M symbol loading and source path substitution")

22 changes: 15 additions & 7 deletions content/learning-paths/automotive/zenacssdebug/safetyisland.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Configure the **SI** model connection similarly to **RSE**. Add the following **

```text
stop
add-symbol-file /arm-auto-solutions/build/tmp_baremetal/deploy/images/fvp-rd-aspen/si0_ramfw.elf
set substitute-path /usr/src/debug/scp-firmware/2.14.0/ /arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/scp-firmware/2.14.0/git/
add-symbol-file "/arm-auto-solutions/build/tmp_baremetal/deploy/images/fvp-rd-aspen/si0_ramfw.elf"
set substitute-path "/usr/src/debug/scp-firmware/2.16.0+git/" "/arm-auto-solutions/build/tmp_baremetal/work/fvp_rd_aspen-poky-linux/scp-firmware/2.16.0+git/git/"
b arch_exception_reset
```

Expand All @@ -53,10 +53,7 @@ When RSE enables Safety Island, you will see a log message like:
The full output log is shown here for your reference:

``` output
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
[INF] [CC3XX] Init OK PIDR0: 0xc1
[INF] Starting TF-M BL1_1
[INF] Jumping to BL1_2
[INF] Starting TF-M BL1_2
Expand All @@ -65,12 +62,23 @@ Escape character is '^]'.
[INF] BL2 image validated successfully
[INF] Jumping to BL2
[INF] Starting bootloader
[INF] [CC3XX] Init OK PIDR0: 0xc1
[INF] PSA Crypto init done, sig_type: EC-P256
[INF] BL2: SI CL1 not present, skip loading
[INF] BL2: SI CL0 pre load start
[INF] BL2: SI CL0 pre load complete
[INF] Primary slot: version=0.0.7+0
[INF] Secondary slot: version=0.0.7+0
[INF] Image 3 Secondary slot: Image not found
[INF] Image 3 RAM loading to 0x70083c00 is succeeded.
[INF] Key 0 hash found for image 3
[INF] Image 3 loaded from the primary slot
[INF] BL2: SI CL0 post load start
[INF] BL2: SI ATU region 0: [0x80000000 - 0xbfffffff]->[0x1_00000000 - 0x1_3fffffff]
[INF] BL2: SI ATU region 1: [0xc0000000 - 0xcfffffff]->[0x1_40000000 - 0x1_4fffffff]
[INF] BL2: SI ATU region 2: [0xd0000000 - 0xd001ffff]->[0x20000_d8000000 - 0x20000_d801ffff]
[INF] BL2: SI ATU region 3: [0xd0020000 - 0xd002ffff]->[0x20000_d0200000 - 0x20000_d020ffff]
[INF] BL2: SI ATU region 4: [0xd0030000 - 0xd003ffff]->[0x20000_d0400000 - 0x20000_d040ffff]
[INF] BL2: SI ATU region 5: [0xd0040000 - 0xd006ffff]->[0x20000_d0100000 - 0x20000_d012ffff]
[INF] BL2: SI ATU region 6: [0xe0030000 - 0xe0031fff]->[0x0_00000000 - 0x0_00001fff]
[INF] BL2: SI ATU region 7: [0xe0130000 - 0xe0135fff]->[0x0_00100000 - 0x0_00105fff]
```
14 changes: 9 additions & 5 deletions content/learning-paths/automotive/zenacssdebug/zena.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ For more information, see [Arm Zena Compute Subsystem (CSS)](https://developer.a

## Build the software stack

Follow the steps to download and build the software stack in the [Arm Zena CSS User Guide](https://arm-auto-solutions.docs.arm.com/en/v2.0/rd-aspen/user_guide/reproduce.html).
Follow the steps to download and build the software stack in the [Arm Automotive Solutions Software Reference Stack User Guide](https://arm-auto-solutions.docs.arm.com/en/latest/rd-aspen/user_guide/reproduce.html).

Here the default **Arm Automotive Solutions Demo** build is used.
The default **Cfg1, Arm Automotive Solutions Demo, Bare Metal** build is used in this learning path.

Software build will usually take at least one hour to complete, depending on host machine.

{{% notice Note %}}
The primary focus of this Learning Path is to demonstrate how to debug the software stack.

The latest version of software tested at time of writing is `2.1`. Screenshots show previous versions.
{{% /notice %}}

## Verify the build and execution
Expand All @@ -38,18 +42,18 @@ kas shell -c "../layers/meta-arm/scripts/runfvp -t tmux --verbose"

The system runs through the boot process until a Linux prompt is available (in `terminal_ns_uart0`).

Press **Ctrl+C** in the command terminal to terminate the process.
Press **Ctrl+C** in the command terminal (use `Ctrl+B` > `0` to swap to that terminal) to terminate the process.

## Install FVP (optional)

The FVP is downloaded and installed as part of the build process.

You can also separately download Arm-Zena-CSS-FVP from the Arm Developer [website](https://developer.arm.com/Tools%20and%20Software/Fixed%20Virtual%20Platforms/Automotive%20FVPs).
You can also separately download either `Arm-Zena-CSS-FVP` (`Cfg1` or `Cfg2`) from the Arm Developer [website](https://developer.arm.com/Tools%20and%20Software/Fixed%20Virtual%20Platforms/Automotive%20FVPs).

See also the Arm Ecosystem FVPs and Architecture Envelope Models [Install Guide](/install-guides/fm_fvp/eco_fvp/).

{{% notice Note %}}
For legacy reasons, the FVP is named `FVP_RD_Aspen`.
For legacy reasons, the FVP was previously named `FVP_RD_Aspen`.
{{% /notice %}}

## Arm Development Studio
Expand Down