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/embedded-and-microcontrollers/zephyr_cs320_mps4/how-to-1.md
+136-5Lines changed: 136 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,141 @@ weight: 2
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Set up the development environment
10
-
This section describes the tools and environment you need for Corstone-320 MPS4 development with Zephyr.
9
+
## Set up the development environment
11
10
12
-
### Install the Zephyr build tools
11
+
Before you build Zephyr for the Corstone-320 MPS4 platform, you need to install the required host packages, initialize a Zephyr workspace, and install the Arm GNU Toolchain.
13
12
14
-
- Follow the Zephyr Project [Getting Started Guide — Zephyr Project Documentation](https://docs.zephyrproject.org/latest/develop/getting_started/index.html) to install the required packages and set up the Zephyr workspace.
15
-
- Download and install the Arm GNU Toolchain from the [Arm GNU Toolchain downloads page](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads). Select the `arm-none-eabi` package for your host architecture: `aarch64-arm-none-eabi` for aarch64 Linux, or `x86_64-arm-none-eabi` for x86_64 Linux.
13
+
## Install host dependencies
14
+
15
+
Update your package list and install the packages that Zephyr requires. Select the tab for your host architecture:
xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
33
+
```
34
+
{{< /tab >}}
35
+
{{< /tabpane-normal >}}
36
+
37
+
Verify that the installed versions meet Zephyr's minimum requirements (CMake 3.20.5, Python 3.12, dtc 1.4.6):
38
+
39
+
```bash
40
+
cmake --version
41
+
python3 --version
42
+
dtc --version
43
+
```
44
+
45
+
## Set up the Zephyr workspace
46
+
47
+
Create a Python virtual environment and use `west` to initialize the Zephyr workspace. The following commands place the workspace in `~/zephyrproject`, but you can choose a different location.
48
+
49
+
Create and activate the virtual environment:
50
+
51
+
```bash
52
+
python3 -m venv ~/zephyrproject/.venv
53
+
source~/zephyrproject/.venv/bin/activate
54
+
```
55
+
56
+
After activation, your shell prompt is prefixed with `(.venv)`. Run `source ~/zephyrproject/.venv/bin/activate` each time you open a new terminal before working with Zephyr.
57
+
58
+
Install `west` and download the Zephyr source code:
59
+
60
+
```bash
61
+
pip install west
62
+
west init ~/zephyrproject
63
+
cd~/zephyrproject
64
+
west update
65
+
```
66
+
67
+
Export the Zephyr CMake package so that CMake can automatically load the boilerplate required for Zephyr builds:
68
+
69
+
```bash
70
+
west zephyr-export
71
+
```
72
+
73
+
Install the Python packages that Zephyr requires:
74
+
75
+
```bash
76
+
west packages pip --install
77
+
```
78
+
79
+
## Install the Arm GNU Toolchain
80
+
81
+
The Corstone-320 target uses the Cortex-M85 processor, so you need the `arm-none-eabi` bare-metal toolchain from the Arm GNU Toolchain. For a detailed installation guide covering all platforms, refer to the [Arm GNU Toolchain](/install-guides/gcc/arm-gnu/) install guide.
82
+
83
+
{{% notice Note %}}
84
+
The following commands use Arm GNU Toolchain version 15.2.Rel1. The same commands work with other versions. Replace the file used in these steps with the file for your version of choice. To find the latest version, see [Arm GNU Toolchain downloads](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads).
85
+
{{% /notice %}}
86
+
87
+
Download, unpack, and add the Arm GNU Toolchain to your `PATH` for your host architecture:
arm-none-eabi-gcc (Arm GNU Toolchain 15.2.Rel1 (Build arm-15.86)) 15.2.1 20251203
120
+
Copyright (C) 2025 Free Software Foundation, Inc.
121
+
This is free software; see the source for copying conditions. There is NO
122
+
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
123
+
```
124
+
125
+
## Configure the toolchain for Zephyr
126
+
127
+
Zephyr uses two environment variables to locate the Arm GNU Toolchain. Set these each time you open a new terminal, or add them to your shell configuration file:
0 commit comments