|
1 | 1 | --- |
2 | | -title: Install and Setup Zephyr Workbench in VS Code |
| 2 | +title: Install and configure Zephyr Workbench in VS Code |
3 | 3 | weight: 2 |
4 | 4 |
|
5 | 5 | ### FIXED, DO NOT MODIFY |
6 | 6 | layout: learningpathall |
7 | 7 | --- |
8 | 8 |
|
9 | | -## Set Up Your Zephyr Development Environment |
| 9 | +## Set up your Zephyr development environment |
10 | 10 |
|
11 | | -Setting up a [Zephyr](https://zephyrproject.org/) RTOS development environment from scratch can be challenging—requiring developers to manually install SDKs, configure toolchains, and initialize workspace directories. These steps often vary across operating systems and board vendors, leading to a fragmented and error-prone setup process. |
| 11 | +Setting up a [Zephyr](https://zephyrproject.org/) RTOS development environment from scratch can be challenging, requiring you to manually install SDKs, configure toolchains, and initialize workspace directories. These steps often vary across operating systems and board vendors, leading to a fragmented and error-prone setup process. |
12 | 12 |
|
13 | | -***[Zephyr Workbench](https://zephyr-workbench.com/)*** is an open-source Visual Studio Code extension that transforms Zephyr RTOS development into a streamlined IDE experience. Created by [Ac6](https://www.ac6.fr/en/), it automates toolchain setup, project management, and debugging—making Zephyr projects faster to start and easier to scale. |
| 13 | +[Zephyr Workbench](https://zephyr-workbench.com/) is an open-source Visual Studio Code extension that transforms Zephyr RTOS development into a streamlined IDE experience. Created by [Ac6](https://www.ac6.fr/en/), it automates toolchain setup, project management, and debugging, making Zephyr projects faster to start and easier to scale. |
14 | 14 |
|
15 | | -In this learning path, you’ll walk through the essential steps to install Zephyr Workbench and configure a complete development environment on your local machine. Once complete, you’ll be ready to create, build, and debug applications for Arm Cortex-M platforms using Zephyr RTOS. |
| 15 | +In this Learning Path, you'll learn the essential steps to install Zephyr Workbench and configure a complete development environment on your local machine. Once complete, you'll be ready to create, build, and debug applications for Arm Cortex-M platforms using Zephyr RTOS. |
16 | 16 |
|
17 | | -**Key capabilities:** |
18 | | - |
19 | | -- One-Click Environment Setup: Automatically installs required host tools including Python, CMake, Ninja, and Git. |
20 | | -- SDK and Toolchain Management: Supports importing and managing Zephyr SDKs with version and architecture selection. |
21 | | -- Workspace and Project Initialization: Initializes west workspaces and creates board-specific applications from samples. |
22 | | -- Integrated Build and Flash: Builds Zephyr applications and flashes to hardware directly from the VS Code interface. |
23 | | -- Advanced Debug and Memory Analysis: Provides breakpoint debugging and memory usage insights with hardware probe support. |
| 17 | +Zephyr Workbench provides one-click environment setup that automatically installs the required tools including Python, CMake, Ninja, and Git. It supports importing and managing Zephyr SDKs with version and architecture selection, while initializing west workspaces and creating board-specific applications from samples. The extension builds Zephyr applications and flashes hardware directly from the VS Code interface. It also provides breakpoint debugging and memory usage insights with hardware probe support. |
24 | 18 |
|
25 | 19 | ## What you need before installing Zephyr Workbench |
26 | 20 |
|
27 | | -To get started with Zephyr Workbench, ensure you have the following required Software: |
28 | | - |
29 | | -**Visual Studio Code:** |
30 | | - |
31 | | -- Download, install, and start Visual Studio Code on your desktop. |
32 | | - |
33 | | -**Windows Requirements:** |
34 | | - |
35 | | -- Windows 10 or later (64-bit) |
36 | | -- Administrator privileges for installing tools and drivers |
37 | | -- Internet connection for downloading packages and SDKs |
| 21 | +To get started with Zephyr Workbench you need to have Visual Studio Code downloaded, installed, and running on your computer. |
38 | 22 |
|
39 | | -Or |
| 23 | +For Windows, you need version 10 or later (64-bit), along with administrator privileges for installing tools and drivers. |
40 | 24 |
|
41 | | -**macOS Requirements:** |
42 | | - |
43 | | -- On macOS, the package manager "Homebrew" is required. |
44 | | -- To install Homebrew, run the following command: |
| 25 | +On macOS, the Homebrew package manager is required. To install Homebrew, run the following command: |
45 | 26 |
|
46 | 27 | ```bash |
47 | 28 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
48 | 29 | ``` |
49 | 30 |
|
50 | | -**Supported Hardware:** |
| 31 | +Zephyr Workbench supports STM32 development boards (STM32 Discovery, Nucleo series), Nordic Semiconductor boards (nRF52, nRF53, nRF91 series), NXP development boards (FRDM, LPCXpresso series), Espressif boards (ESP32-based boards), and many other Zephyr-supported platforms. You need a development board to try out the code examples. |
| 32 | + |
| 33 | +## Configure the Zephyr Workbench extension in Visual Studio Code |
51 | 34 |
|
52 | | -- STM32 development boards (STM32 Discovery, Nucleo series) |
53 | | -- Nordic Semiconductor boards (nRF52, nRF53, nRF91 series) |
54 | | -- NXP development boards (FRDM, LPCXpresso series) |
55 | | -- Espressif boards (ESP32-based boards) |
56 | | -- And many other Zephyr-supported platforms |
| 35 | +This section covers installing the Zephyr Workbench extension and configuring your Arm development environment. |
57 | 36 |
|
58 | | -## Set Up Zephyr Workbench Extension in Visual Studio Code |
| 37 | +### Install the extension |
59 | 38 |
|
60 | | -This module walks you through installing the Zephyr Workbench extension and setting up your Arm-ready development environment. |
| 39 | +To install the Zephyr Workbench extension, open Visual Studio Code and navigate to the Extensions view by selecting the Extensions icon in the Activity Bar. |
61 | 40 |
|
62 | | -### Install the Extension |
| 41 | +You can also use the keyboard shortcut `Ctrl+Shift+X` (Windows/Linux) or `Cmd+Shift+X` (macOS). |
63 | 42 |
|
64 | | -1. **Open VS Code Extension Marketplace** |
65 | | - - Open Visual Studio Code |
66 | | - - Navigate to the `Extensions view` by clicking the Extensions icon in the Activity Bar |
67 | | - - Or use the keyboard shortcut `Ctrl+Shift+X` (Windows/Linux) or `Cmd+Shift+X` (macOS) |
68 | | -2. **Search and Install** |
69 | | - - In the search box, type "Zephyr Workbench" |
70 | | - - Locate the official "Zephyr Workbench" extension by Ac6 |
71 | | - - Click "Install" to add the extension to VS Code |
72 | | -3. **Verify Installation** |
73 | | - - After installation, you should see the Zephyr Workbench panel in the VS Code sidebar |
74 | | - - The extension icon will appear in the Activity Bar |
75 | | - - A welcome message may appear confirming successful installation |
| 43 | +In the search box, type "Zephyr Workbench" and locate the official "Zephyr Workbench" extension by Ac6. Select **Install** to add the extension to VS Code. |
| 44 | + |
| 45 | +The extension icon appears in the Activity Bar, and a welcome message may appear confirming successful installation. |
76 | 46 |
|
77 | 47 | Once installed, the Zephyr Workbench icon appears in the sidebar with a welcome screen. |
78 | 48 |
|
| 49 | +### Install the required host tools |
79 | 50 |
|
| 51 | +In the Zephyr Workbench panel, select **Install Host Tools** to automatically install the required dependencies. |
80 | 52 |
|
81 | | -### Install Required Host Tools |
| 53 | +This process installs Python 3.x, CMake, the Ninja build system, Git, Device Tree Compiler (DTC), and the West meta-tool. |
82 | 54 |
|
83 | | -In the Zephyr Workbench panel, click ***Install Host Tools*** to automatically install dependencies: |
84 | | - - ***Python*** 3.x |
85 | | - - ***CMake*** |
86 | | - - ***Ninja*** build system |
87 | | - - ***Git*** |
88 | | - - ***Device Tree Compiler*** (DTC) |
89 | | - - ***West*** meta-tool |
90 | | - |
91 | | -  |
| 55 | + |
92 | 56 |
|
93 | 57 | {{% notice Note %}} |
94 | | -On Windows, you may be prompted for permission when tools are executed. Click "Allow" when requested. |
| 58 | +On Windows, you may be prompted for permission when tools are executed. Select "Allow" when requested. |
95 | 59 | {{% /notice %}} |
96 | 60 |
|
97 | | -After host tools installation, click ***Verify Host Tools*** to check the version of each installed packages. |
| 61 | +When the installation completes, select **Verify Host Tools** to check the version of each installed package. |
98 | 62 |
|
| 63 | +### Import and configure the toolchain |
99 | 64 |
|
100 | | -### Import and Configure Toolchain |
| 65 | +Next, download and configure the toolchain by selecting **Import Toolchain** in the Zephyr Workbench panel. Select the toolchain family (*Zephyr SDK*) and configure the SDK Type by choosing *Minimal* for basic functionality. |
101 | 66 |
|
102 | | -Next, download and configure the ***Toolchain***. |
| 67 | +Select your desired version (such as v0.17.0 or v0.17.3) and choose the target architectures. For this Learning Path, you only need to select *arm*. |
103 | 68 |
|
104 | | - - Click ***Import Toolchain*** in the Zephyr Workbench panel |
105 | | - - Select the toolchain family (***Zephyr SDK***) |
106 | | - - configure the ***SDK Type***: choose ***Minimal*** for basic functionality |
107 | | - - **Version:** Select desired version (e.g., v0.17.0 or v0.17.3) |
108 | | - - **Toolchains:** Select target architectures (In this learning path, you only need to select ***arm***) |
109 | | - - **Location:** Specify the parent directory for SDK installation |
110 | | - - Click **"Import"** to download and install the SDK |
111 | | - |
112 | | -  |
| 69 | +Specify the parent directory for SDK installation and select **Import** to download and install the SDK. |
113 | 70 |
|
| 71 | + |
114 | 72 |
|
115 | | -### Initialize the Zephyr Project Workspace |
116 | 73 |
|
117 | | -Zephyr uses a Git-based workspace manager called West to organize its source code, modules, and samples. Use Zephyr Workbench to initialize your first ***west workspace***. |
| 74 | +### Initialize the Zephyr project workspace |
118 | 75 |
|
119 | | -In the Zephyr Workbench panel, click “Initialize Workspace” and fill in the following settings: |
| 76 | +Zephyr uses a Git-based workspace manager called West to organize its source code, modules, and samples. Use Zephyr Workbench to initialize your first West workspace. |
120 | 77 |
|
121 | | - - Click "Initialize workspace" to set up your project environment |
122 | | - - Configure workspace settings in the opened page: |
123 | | - - **Source location:** Select "Minimal from template" |
124 | | - - **Path:** Use default `https://github.com/zephyrproject` |
125 | | - - **Template:** Choose target-specific template (e.g., STM32, NXP) |
126 | | - - **Branch:** Select Zephyr version (e.g., v3.7.0, v4.1.0) |
127 | | - - **Location:** Specify directory for workspace (takes ~10 minutes to initialize) |
128 | | - - Click "Import" to create and update the workspace |
129 | | - |
130 | | -  |
| 78 | +In the Zephyr Workbench panel, select **Initialize Workspace** to set up your project environment. Configure the workspace settings by selecting "Minimal from template" for the source location and using the default path `https://github.com/zephyrproject-rtos/zephyr`. |
| 79 | + |
| 80 | +Choose a target-specific template (such as STM32 or NXP) and select your Zephyr version (such as v3.7.0 or v4.1.0). Specify the directory for your workspace, keeping in mind that initialization takes approximately 10 minutes to complete. |
| 81 | + |
| 82 | +Select **Import** to create and update the workspace. |
| 83 | + |
| 84 | + |
131 | 85 |
|
132 | | - {{% notice Note %}} |
133 | | - The workspace initialization downloads the Zephyr source code and dependencies. This process may take several minutes depending on your internet connection. |
134 | | - {{% /notice %}} |
| 86 | +{{% notice Note %}} |
| 87 | +The workspace initialization downloads the Zephyr source code and dependencies. This process may take several minutes depending on your internet connection speed. |
| 88 | +{{% /notice %}} |
135 | 89 |
|
136 | | -### Verify Setup |
| 90 | +### Verify setup |
137 | 91 |
|
138 | | -**Test your setup** |
139 | | - - Confirm that the Zephyr Workbench panel shows all components as installed: |
140 | | - - Host Tools installed successfully |
141 | | - - SDK imported and detected |
142 | | - - West workspace initialized |
143 | | - - Ensure no error messages appear in the VS Code output panel |
| 92 | +Test your setup by confirming that the Zephyr Workbench panel shows all components as installed successfully. Verify the host tools are installed, the SDK is imported and detected, and the West workspace is initialized. Ensure no error messages appear in the VS Code output panel. |
144 | 93 |
|
145 | 94 | {{% notice Note %}} |
146 | 95 | **Troubleshooting tips:** |
147 | 96 | - Run VS Code as Administrator if host tool installation fails on Windows |
148 | 97 | - Ensure internet access is allowed through your firewall |
149 | | -- Check for minimum 2GB free disk space before importing SDK |
| 98 | +- Check for minimum 2 GB free disk space before importing SDK |
150 | 99 | {{% /notice %}} |
151 | 100 |
|
152 | | -You’re now ready to create and build your first Zephyr application targeting an Arm Cortex-M board. |
153 | | - |
154 | | -After completing this session, your environment is ready to create, build, and debug Zephyr applications in VS Code using Arm Cortex-M boards. |
| 101 | +You're ready to create and build your first Zephyr application targeting an Arm Cortex-M board. |
0 commit comments