Zephyr Lab Installation and Preparation - nxp-mcuxpresso/vscode-for-mcux GitHub Wiki
In this lab, you will learn to install/import the tools below. This guide is written for Windows11. Linux or macOS can also follow similar steps.
The necessary installations include:
- Visual Studio Code
- MCUXpresso Extension for VS Code
- Dependencies for Zephyr development, including the Zephyr SDK
- Zephyr Repository in VS Code
- (Optional) MCUXpresso SDK Repository in VS Code
This lab guide was written with the following versions
- MCUXpresso extension for VS Code v25.3.72
- MCUXpresso Installer v24.12
- Zephyr v4.1.0
- Zephyr SDK v0.17.0
- LinkServer v25.3.31
Before importing the Zephyr repository, determine the Zephyr revision to checkout. Upstream Zephyr manages the revisions with Git: Zephyr releases have Git tags for the versions, or the latest code is in the main
branch.
For development, it is ideal to use a Zephyr release. Releases go through the Zephyr Project's release flow and quality checks. This is why the Repository Importer in the MCUXpresso extension defaults to the latest Zephyr release. To learn more about Zephyr releases, see Releases.
One resource available to confirm support in different revisions is the Zephyr Project documentation. For example, the Supported Boards and Shields is a living document for the hardware currently in the main
branch, and is updated frequently.
-
To install Visual Studio Code (VS Code), download the installer here: https://code.visualstudio.com/download
-
Open VS Code, and install the MCUXpresso extension. a. Click the extensions view ( CTRL+Shift+X ) b. In the search field at the top of the extension view type MCUXpresso c. Click the Install button
The MCUXpresso extension will be added to the installed list after successful installation.
Zephyr development environment needs some host dependencies like: CMake, Python, Devicetree, Zephyr SDK, and other… LinkServer is also required to debug with the NXP on-board probes.
Note this lab guide assumes a LinkServer debug probe is used, which is default on the evaluation boards. When utilizing other supported debug probes, this installer can additionally integrate support for Segger JLink and PEmicro tools.
- Open the MCUXpresso Extension. In the Quickstart Panel, click Open MCUXpresso Installer
- After selecting the install options: Zephyr Developer, and LinkServer click the Install button. The status bar at the bottom shows how the installation is progressing.
- Restart VS Code to enable the changes to environment variables.
-
To import the Zephyr repository, open the MCUXpresso view in VS Code and click Import Repository in the Quickstart Panel.
-
Select Zephyr Repository, choose the latest revision v4.1.0, finally choose the folder location C:\Users...\zephyrproject. When finished, click Import.
Note This import step takes a long time to clone the Zephyr repo, and dependency repos (currently 70!). VS Code shows a progress bar pop-up with the status of the West tool as it clones all the repos. The repository should be added to the Imported Repository view once the import is successful.
- Optionally, the MCUXpresso SDK repository can be imported the same way. This is not required when working with Zephyr. But the debugger guide in Training Zephyr Getting Started shows how to add the Peripheral Register view to the debugger, and this requires some SVD files located in the MCUXpresso SDK repository.
Select the following board settings to import the MCUXpresso SDK repository:
-
Repository
select MCUXpresso SDK - 24.12 or newer -
Revision
choose the latest release v25.03.00 -
Location
select the folder location: C:\Users\...\mcux-sdk -
Click Import
The repositories are successfully added to the Imported Repository view once the import is successful.
-
To import any example application from the Zephyr Repository, click Import Example from Repository in the Quickstart Panel.
-
To ensure successful installation, follow the steps in the Hello World guide to run the hello_world example from the Zephyr repo.
Lab completed. Return to the Zephyr Labs Overview Training Zephyr Getting Started