You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/microcontrollers/mlek/build.md
+93-24Lines changed: 93 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,69 +7,138 @@ weight: 2 # 1 is first, 2 is second, etc.
7
7
# Do not modify these elements
8
8
layout: "learningpathall"
9
9
---
10
-
The [Arm ML Evaluation Kit (MLEK)](https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ml-embedded-evaluation-kit) provides a number of ready-to-use ML applications. These allow you to investigate the embedded software stack and evaluate performance on the Cortex-M55 and Ethos-U55 processors.
10
+
The [Arm ML Evaluation Kit (MLEK)](https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ml-embedded-evaluation-kit) provides a number of ready-to-use ML applications. These allow you to investigate the embedded software stack and evaluate performance on the Cortex-M55 and Ethos-U85 processors.
11
11
12
-
You can use the MLEK source code to build sample applications and run them on the [Corstone reference systems](https://www.arm.com/products/silicon-ip-subsystems/), for example the [Corstone-300](https://developer.arm.com/Processors/Corstone-300) Fixed Virtual Platform (FVP).
12
+
You can use the MLEK source code to build sample applications and run them on the [Corstone reference systems](https://www.arm.com/products/silicon-ip-subsystems/), for example the [Corstone-320](https://developer.arm.com/Processors/Corstone-320) Fixed Virtual Platform (FVP).
13
13
14
14
## Before you begin
15
15
16
16
You can use your own Ubuntu Linux host machine or use [Arm Virtual Hardware (AVH)](https://www.arm.com/products/development-tools/simulation/virtual-hardware) for this Learning Path.
17
17
18
-
The Ubuntu version should be 20.04 or 22.04. The `x86_64` architecture must be used because the Corstone-300 FVP is not currently available for the Arm architecture. You will need a Linux desktop to run the FVP because it opens graphical windows for input and output from the software applications.
18
+
The Ubuntu version should be 20.04 or 22.04. These instructions have been tested on the `x86_64`architecture. You will need a way to interact visually with your machine to run the FVP, because it opens graphical windows for input and output from the software applications.
19
19
20
20
If you want to use Arm Virtual Hardware the [Arm Virtual Hardware install guide](/install-guides/avh#corstone) provides setup instructions.
21
21
22
-
### Compilers
22
+
##Build the example application
23
23
24
-
The examples can be built with [Arm Compiler for Embedded](https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Embedded) or [Arm GNU Toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain).
24
+
### Install the dependencies
25
25
26
-
Use the install guides to install the compilers on your computer:
27
-
-[Arm Compiler for Embedded](/install-guides/armclang/)
28
-
-[Arm GNU Toolchain](/install-guides/gcc/arm-gnu)
26
+
Run the following commands to install some necessary tools.
29
27
30
-
Both compilers are pre-installed in Arm Virtual Hardware.
The examples can be built with [Arm Compiler for Embedded](https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Embedded) or [Arm GNU Toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain).
33
35
34
-
To install the Corstone-300 FVP on your computer refer to the [install guide for Arm Ecosystem FVPs](/install-guides/fm_fvp).
36
+
Install the GNU toolchain (`gcc`).
35
37
36
-
The Corstone-300 FVP is pre-installed in Arm Virtual Hardware.
The default build is Ethos-U55 and Corstone-300. The default build for Ethos-U85 is Corstone-320. Use the `npu-config-name` flag to set Ethos-U85.
56
71
57
-
The default compiler is `gcc`, but `armclang` can also be used.
72
+
The default compiler is `gcc`, but `armclang` can also be used. Number after `ethos-u85-*` is number of MACs, 128-2048 (2^n).
58
73
59
74
You can select either compiler to build applications. You can also try them both and compare the results.
60
75
61
76
- Build with Arm GNU Toolchain (`gcc`)
62
77
63
78
```
64
-
./build_default.py
79
+
./build_default.py --npu-config-name ethos-u85-256 --toolchain gnu
65
80
```
66
81
67
82
- Build with Arm Compiler for Embedded (`armclang`)
68
83
69
84
```console
70
-
./build_default.py --toolchain arm
85
+
./build_default.py --npu-config-name ethos-u85-256 --toolchain arm
71
86
```
72
87
73
88
The build will take a few minutes.
74
89
75
-
When the build is complete, you will find the example images (`.axf` files) in the `cmake-build-*/bin` directory. The `cmake-build` directory names are specific to the compiler used and Ethos-U55 configuration.
90
+
When the build is complete, you will find the examples (`.axf` files) in the `cmake-build-*/bin` directory. The `cmake-build` directory names are specific to the compiler used and Ethos-U85 configuration. Verify that the files have been created by observing the output of the `ls` command
91
+
92
+
```bash
93
+
ls cmake-build-mps4-sse-320-ethos-u85-256-gnu/bin/
94
+
```
95
+
96
+
The next step is to install the FVP and run it with these example audio clips.
97
+
98
+
99
+
## Corstone-320 FVP {#fvp}
100
+
101
+
This section describes installation of the Corstone-320 to run on your local machine. If you are using Arm Virtual Hardware, that comes with the Corstone-300 FVP pre-installed, and you can move on to the next section. You can review Arm's full FVP offer and general installation steps in the [Fast Model and Fixed Virtual Platform](/install-guides/fm_fvp) install guides.
102
+
103
+
{{% notice Note %}}
104
+
The rest of the steps for the Corstone-320 need to be run in a new terminal window.
105
+
{{% /notice %}}
106
+
107
+
Open a **new terminal window** and download the Corstone-320 archive.
The FVP requires an additional dependency, `libpython3.9.so.1.0`, which can be installed using a script. Note that this will tinkle with the python installation for the current terminal window, so make sure to open a new one for the next step.
If you are running with Arm Virtual Hardware substitute `VHT_Corstone_SSE-300_Ethos-U55` as the executable name.
64
85
{{% /notice %}}
65
86
66
-
Open the file `parameters.txt` to see all of the possible parameters and the default values.
87
+
Open the file `parameters.txt` to see all of the possible parameters and the default values.
67
88
68
89
### Set parameters
69
90
70
-
Individual parameters can be set with the `-C` command option.
91
+
Individual parameters can be set with the `-C` command option.
71
92
72
93
For example, to put the Ethos-U component into fast execution mode:
73
94
74
95
```console
75
-
FVP_Corstone_SSE-300_Ethos-U55 -a cmake-build-mps3-sse-300-ethos-u55-128-gnu/bin/ethos-u-kws.axf -C ethosu.extra_args="--fast"
96
+
FVP_Corstone_SSE-320 -a cmake-build-mps4-sse-320-ethos-u85-256-gnu/bin/ethos-u-kws.axf -C mps4_board.subsystem.ethosu.extra_args="--fast"
76
97
```
77
98
{{% notice Note %}}
78
99
Do not use fast execution mode whilst benchmarking performance.
@@ -83,14 +104,16 @@ To set multiple parameters it may be easier to list them in a text file (without
83
104
For example, use a text editor to create a file named `options.txt` with the contents:
84
105
85
106
```console
86
-
mps3_board.visualisation.disable-visualisation=1
87
-
ethosu.extra_args="--fast"
107
+
mps4_board.visualisation.disable-visualisation=1
108
+
mps4_board.subsystem.ethosu.extra_args="--fast"
88
109
```
89
110
90
111
Run the FVP with the `-f` option and the `options.txt` file:
91
112
92
113
```console
93
-
FVP_Corstone_SSE-300_Ethos-U55 -a cmake-build-mps3-sse-300-ethos-u55-128-gnu/bin/ethos-u-kws.axf -f options.txt
114
+
FVP_Corstone_SSE-320 -a cmake-build-mps4-sse-320-ethos-u85-256-gnu/bin/ethos-u-kws.axf -f options.txt
94
115
```
95
116
96
117
Full instructions are provided in the evaluation kit [documentation](https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ml-embedded-evaluation-kit/+/HEAD/docs/quick_start.md).
118
+
119
+
You have now run an example application on an Arm Fixed Virtual Platform.
0 commit comments