Skip to content

Commit fcfa4d8

Browse files
authored
Merge branch 'ArmDeveloperEcosystem:main' into main
2 parents 9e5777a + b3ebace commit fcfa4d8

File tree

7 files changed

+170
-538
lines changed

7 files changed

+170
-538
lines changed

content/learning-paths/embedded-and-microcontrollers/linux-on-fvp/_index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ title: Run and Debug a Linux Software Stack on Arm Virtual Platforms
33

44
minutes_to_complete: 180
55

6-
draft: true
7-
cascade:
8-
draft: true
9-
106
who_is_this_for: This introductory topic is designed for developers interested in running Linux on Arm Fixed Virtual Platforms (FVPs) and debugging Trusted Firmware-A and the Linux Kernel using Arm Development Studio.
117

12-
learning_objectives:
8+
learning_objectives:
139
- Run a Linux software stack using Arm Fixed Virtual Platforms.
1410
- Debug the firmware and Linux kernel using Arm Development Studio.
1511

@@ -19,6 +15,10 @@ prerequisites:
1915

2016
author: Qixiang Xu
2117

18+
draft: true
19+
cascade:
20+
draft: true
21+
2222
### Tags
2323
skilllevels: Introductory
2424
subjects: Embedded Linux
@@ -33,7 +33,7 @@ tools_software_languages:
3333

3434
further_reading:
3535
- resource:
36-
title: Fast Models Fixed Virtual Platforms Reference Guide
36+
title: Fast Models Fixed Virtual Platforms Reference Guide
3737
link: https://developer.arm.com/documentation/100966/
3838
type: documentation
3939
- resource:

content/learning-paths/embedded-and-microcontrollers/linux-on-fvp/debug.md

Lines changed: 43 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,90 +6,32 @@ weight: 6
66
layout: learningpathall
77
---
88

9-
## Debug using Arm Development Studio
10-
11-
To debug TF-A and Linux kernel, you can use the Arm Development Studio (Arm DS) debugger. You can get it from the [Arm Development Studio download page](https://developer.arm.com/downloads/view/DS000B).
12-
13-
DWARF 5 is the default option in GCC 11 and Arm Development Studio version v2022.2 includes initial support for DWARF 5 debug information.
14-
15-
If your GCC version is later than GCC 11, download the latest Arm Development Studio to get support for DWARF 5.
16-
17-
Arm Development Studio includes the following Base FVP models:
18-
19-
* FVP_Base_Cortex-A32x1
20-
* FVP_Base_Cortex-A35x1
21-
* FVP_Base_Cortex-A510x2
22-
* FVP_Base_Cortex-A53x1
23-
* FVP_Base_Cortex-A55x1
24-
* FVP_Base_Cortex-A55x4+Cortex-A75x2
25-
* FVP_Base_Cortex-A55x4+Cortex-A76x2
26-
* FVP_Base_Cortex-A57x1
27-
* FVP_Base_Cortex-A57x2-A53x4
28-
* FVP_Base_Cortex-A65AEx2
29-
* FVP_Base_Cortex-A65x2
30-
* FVP_Base_Cortex-A710x2
31-
* FVP_Base_Cortex-A72x1
32-
* FVP_Base_Cortex-A72x2-A53x4
33-
* FVP_Base_Cortex-A73x1
34-
* FVP_Base_Cortex-A73x2-A53x4
35-
* FVP_Base_Cortex-A75x1
36-
* FVP_Base_Cortex-A76AEx2
37-
* FVP_Base_Cortex-A76x1
38-
* FVP_Base_Cortex-A77x2
39-
* FVP_Base_Cortex-A78AEx2
40-
* FVP_Base_Cortex-A78Cx2
41-
* FVP_Base_Cortex-A78x2
42-
* FVP_Base_Cortex-X1Cx2
43-
* FVP_Base_Cortex-X1x2
44-
* FVP_Base_Cortex-X2x2
45-
46-
Arm FVPs that are not provided by Arm DS installation must be defined in the PATH environment variable to be available for Arm Development Studio. Otherwise, you might get the following error when starting the debug connection.
47-
48-
![Connection Failed Screen #center](failed.png")
49-
50-
For Linux, set up the PATH in the appropriate shell configuration file.
51-
52-
For example, add the following line in your `~/.bashrc` file:
53-
54-
```console
55-
export PATH=<your model path>/bin:$PATH
56-
```
57-
58-
After changing the search PATH, you need to start Arm Development Studio from a terminal with the new PATH.
59-
60-
Start Development Studio by running the `armds_ide` command:
61-
62-
```console
63-
/opt/arm/developmentstudio-2022.2/bin/armds_ide
64-
```
65-
66-
![Arm DS IDE #center](armds_ide.png)
67-
68-
## FVP Debug Connection
69-
70-
Before debugging, the FVP model you want to use must be available in the Arm DS configuration database so that you can select it in the Model Connection dialog box.
71-
72-
If the FVP model is not available, you must import it and create a new model configuration. For details, see [create a new model](https://developer.arm.com/documentation/101470/2022-2/Platform-Configuration/Model-targets/Create-a-new-model-configuration).
9+
## Debug the Software Stack with Arm Development Studio
7310

74-
Most CPU FVP models are available for your edition of Arm DS and the FVPs are listed under the Arm FVP (Installed with Arm DS) and Arm FVP as shown in the following figure:
11+
Once your software stack is running on the FVP, you can debug Trusted Firmware-A and the Linux kernel using Arm Development Studio (Arm DS).
7512

76-
![Debug Configurations screen #center](debug_config.png)
13+
### Step 1: Install Arm Development Studio
7714

78-
To use Arm DS to connect to an FVP model for bare-metal debugging, perform the following steps:
15+
Download and install the latest version from the [Arm Development Studio download page](https://developer.arm.com/downloads/view/DS000B).
7916

80-
1. From the Arm Development Studio main menu, select Run > Debug Configurations.
17+
DWARF 5 is enabled by default in GCC 11 and later. Arm DS v2022.2 or newer is recommended to support DWARF 5 debug information.
8118

82-
2. Select the Generic Arm C/C++ Application from the left panel and click the new launch configuration button to create a new debug configuration.
8319

84-
3. In the Connection tab, select the target and connection settings:
8520

86-
In the Select target panel confirm the target selected. For example, select Arm FVP (Installed with Arm DS) Base_A55 x4 > Bare Metal Debug:
21+
Launch Arm DS:
22+
```
23+
/opt/arm/developmentstudio-2022.2/bin/armds_ide
24+
```
8725

88-
![Select target #center](Select_target.png)
8926

90-
Specify the Model parameters under the Connections. The model parameters are similar to those listed below. These parameters are described at the section Run software stack on FVP. Different CPU FVPs might have different parameters.
27+
### Step 2: Create a Debug Configuration
28+
1. Open Arm DS, go to Run > Debug Configurations.
29+
2. Select Generic Arm C/C++ Application and create a new configuration.
30+
3. In the Connection tab:
31+
- Choose your FVP model (e.g., Base_A55x4).
32+
- Enter model parameters:
9133

92-
```console
34+
```output
9335
-C pctl.startup=0.0.0.0 \
9436
-C bp.secure_memory=0 \
9537
-C cache_state_modelled=0 \
@@ -108,27 +50,40 @@ Specify the Model parameters under the Connections. The model parameters are sim
10850
--data cluster0.cpu0=<SRC_PATH>/output/aemfvp-a/aemfvp-a/fvp-base-revc.dtb@0x83000000
10951
```
11052

111-
4. Configure debugger settings in the Debugger
53+
### Step 3: Load Debug Symbols
11254

113-
In Run control, choose Connect only to the target.
55+
In the Debugger tab:
56+
- Select “Connect only to the target.”
57+
- Enable Execute debugger commands and add:
58+
```output
59+
add-symbol-file "~/arm/sw/cpufvp-a/arm-tf/build/fvp/debug/bl1/bl1.elf" EL3:0
60+
add-symbol-file "~/arm/sw/cpufvp-a/arm-tf/build/fvp/debug/bl2/bl2.elf" EL1S:0
61+
add-symbol-file "~/arm/sw/cpufvp-a/arm-tf/build/fvp/debug/bl31/bl31.elf" EL3:0
62+
add-symbol-file "~/arm/sw/cpufvp-a/linux/out/aemfvp-a/defconfig/vmlinux" EL2N:0
63+
```
11464

115-
5. Select the Execute debugger commands option and add load symbols commands if you want to debug your application at source level. For example, add TF-A and Linux kernel debug symbols as follows:
65+
Click Apply and then Close.
11666

117-
```
118-
add-symbol-file “~/arm/sw/cpufvp-a/arm-tf/build/fvp/debug/bl1/bl1.elf” EL3:0
119-
add-symbol-file “~/arm/sw/cpufvp-a/arm-tf/build/fvp/debug/bl2/bl2.elf” EL1S:0
120-
add-symbol-file “~/arm/sw/cpufvp-a/arm-tf/build/fvp/debug/bl31/bl31.elf” EL3:0
121-
add-symbol-file “~/arm/sw/cpufvp-a/linux/out/aemfvp-a/defconfig/vmlinux” EL2N:0
122-
```
67+
### Step 4: Start Debugging
68+
69+
1. In the Debug Control view, double-click your new configuration.
70+
2. Wait for the target to connect and symbols to load.
71+
3. Set breakpoints, step through code, and inspect registers or memory.
72+
73+
You might get the following error when starting the debug connection.
12374

124-
6. Click Apply and then Close to save the configuration settings and close the Debug Configurations dialog box.
75+
![Connection Failed Screen #center](failed.png)
12576

126-
7. In the Debug Control view, double-click the debug configuration that you create.
77+
This means your Arm FVP is not provided by default in the Arm DS installation. Set the `PATH` in this case:
12778

128-
This step starts the debug connection, loads the application on the model, and loads the debug information into the debugger.
79+
```bash
80+
export PATH=<your model path>/bin:$PATH
81+
```
12982

130-
8. Set breakpoints and click Continue running application to continue running your FVP.
83+
{{% notice tip %}}
84+
Ensure your FVP instance is running and matches the model and parameters selected in Arm DS.
85+
{{% /notice %}}
13186

132-
9. After these steps, you can debug the software stack as shown in the following figure:
87+
After these steps, you can debug the software stack as shown in the following figure:
13388

13489
![FVP running #center](Select_target.png)
Binary file not shown.
Lines changed: 29 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,46 @@
11
---
2-
title: Introduction to Arm Ecosystem Fixed Virtual Platforms
2+
title: Introduction to Arm Fixed Virtual Platforms (FVPs)
33
weight: 2
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9-
Arm Ecosystem Fixed Virtual Platforms (FVPs) model hardware subsystems and target different market segments and applications.
9+
Arm Fixed Virtual Platforms (FVPs) are simulation models that let you run and test full software stacks on Arm systems before physical hardware is available. They replicate the behavior of Arm CPUs, memory, and peripherals using fast binary translation.
1010

11-
FVPs use binary translation technology to deliver fast, functional simulations of Arm-based systems, including processor, memory, and peripherals. They implement a programmer's view suitable for software development and enable execution of full software stacks, providing an available platform to run software before silicon is available.
11+
### Why Use FVPs?
12+
FVPs are useful for developers who want to:
13+
- Prototype software before silicon availability
14+
- Debug firmware and kernel issues
15+
- Simulate multicore systems
1216

13-
Arm provides two different types of FVPs.
17+
FVPs provide a programmer's view of the hardware, making them ideal for system bring-up, kernel porting, and low-level debugging.
1418

15-
## Arm Ecosystem FVPs
19+
### Freely Available Arm Ecosystem FVPs
20+
Several pre-built Armv8-A FVPs can be downloaded for free from the [Arm Ecosystem Models](https://developer.arm.com/Tools%20and%20Software/Fixed%20Virtual%20Platforms#Downloads) page. Categories include:
21+
- Architecture
22+
- Automotive
23+
- Infrastructure
24+
- IoT
1625

17-
There are several freely available, pre-built Armv8‑A FVPs for download from [Arm Ecosystem Models](https://developer.arm.com/Tools%20and%20Software/Fixed%20Virtual%20Platforms#Downloads) on the Arm Developer website. You can use these FVPs without a license.
26+
A popular model is the **AEMv8-A Base Platform RevC**, which supports Armv8.7 and Armv9-A. The [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) is designed for this model.
1827

19-
There are multiple categories of Ecosystem FVPs such as:
20-
- Architecture FVPs
21-
- Automotive FVPs
22-
- Infrastructure FVPs
23-
- IoT FVPs
28+
### CPU-Specific Arm Base FVPs
29+
Other FVPs target specific CPU types and come pre-configured with a fixed number of cores. These are often called **CPU FVPs**.
2430

25-
For example, in the architecture category, the AEMv8-A Base Platform RevC FVP is freely available, and it supports the latest Armv8‑A architecture versions up to v8.7 and Armv9-A.
31+
Here are some examples:
32+
- FVP_Base_Cortex-A55x4
33+
- FVP_Base_Cortex-A72x4
34+
- FVP_Base_Cortex-A78x4
35+
- FVP_Base_Cortex-A510x4+Cortex-A710x4
2636

27-
The [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) is based on the above RevC model.
37+
To use these, request access via [[email protected]](mailto:support@arm.com).
2838

29-
## Arm Base FVPs specific CPU types
39+
### Setting Up Your Environment
40+
This Learning Path uses the [Arm reference software stack](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst).
3041

31-
Arm Base Armv8-A FVPs with specific CPU types are configured with a fixed number of cores. These are also called CPU FVPs because they specify the CPU types instead of the architecture version.
32-
33-
The FVP_Base_Cortex-\<xxx> FVP is available for you to build and run on Linux computers. Contact Arm Support [[email protected]](mailto:[email protected]) to request access.
34-
35-
You can use any of the FVPs listed below to run the reference software stack:
36-
37-
* FVP_Base_Cortex-A510x4
38-
* FVP_Base_Cortex-A510x4+Cortex-A710x4
39-
* FVP_Base_Cortex-A53x4
40-
* FVP_Base_Cortex-A55x4
41-
* FVP_Base_Cortex-A55x4+Cortex-A75x4
42-
* FVP_Base_Cortex-A55x4+Cortex-A78x4
43-
* FVP_Base_Cortex-A57x2-A35x4
44-
* FVP_Base_Cortex-A57x2-A53x4
45-
* FVP_Base_Cortex-A57x4
46-
* FVP_Base_Cortex-A57x4-A35x4
47-
* FVP_Base_Cortex-A57x4-A53x4
48-
* FVP_Base_Cortex-A65AEx4
49-
* FVP_Base_Cortex-A65AEx4+Cortex-A76AEx4
50-
* FVP_Base_Cortex-A65x4
51-
* FVP_Base_Cortex-A710x4
52-
* FVP_Base_Cortex-A72x2-A53x4
53-
* FVP_Base_Cortex-A72x4
54-
* FVP_Base_Cortex-A72x4-A53x4
55-
* FVP_Base_Cortex-A73x2-A53x4
56-
* FVP_Base_Cortex-A73x4
57-
* FVP_Base_Cortex-A73x4-A53x4
58-
* FVP_Base_Cortex-A75x4
59-
* FVP_Base_Cortex-A76AEx4
60-
* FVP_Base_Cortex-A76x4
61-
* FVP_Base_Cortex-A77x4
62-
* FVP_Base_Cortex-A78AEx4
63-
* FVP_Base_Cortex-A78Cx4
64-
* FVP_Base_Cortex-A78x4
65-
* FVP_Base_Cortex-X1Cx4
66-
* FVP_Base_Cortex-X1x4
67-
* FVP_Base_Cortex-X2x4
68-
* FVP_Base_Neoverse-E1x4
69-
* FVP_Base_Neoverse-N1x4
70-
71-
### Set up the environment
72-
73-
This Learning Path uses the [Arm reference software](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) stack.
74-
75-
Follow the [Armv-A Base AEM FVP Platform Software User Guide](https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/user-guide.rst) to set up the environment, download the software stack, and get the toolchain.
42+
To get started:
43+
1. Follow the software user guide to download the stack.
44+
2. Set up the required toolchain and environment variables.
7645

46+
Once configured, you’ll be ready to run and debug Linux on your selected Arm FVP model.

0 commit comments

Comments
 (0)