Zephyr Lab Installation and Preparation - nxp-mcuxpresso/vscode-for-mcux GitHub Wiki

Zephyr lab installation and preparation

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

Software Versions

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

Zephyr Revision

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.

Installation Steps

VS Code and MCUXpresso extension

  1. To install Visual Studio Code (VS Code), download the installer here: https://code.visualstudio.com/download

  2. 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

    Install MCUXpresso Extension The MCUXpresso extension will be added to the installed list after successful installation.

Zephyr dependencies and debugger tools

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.

  1. Open the MCUXpresso Extension. In the Quickstart Panel, click Open MCUXpresso Installer Open MCUXpresso Installer

  1. 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.

Installer for Zephyr

  1. Restart VS Code to enable the changes to environment variables.

Import the software repositories

  1. To import the Zephyr repository, open the MCUXpresso view in VS Code and click Import Repository in the Quickstart Panel. Import Repository

  2. Select Zephyr Repository, choose the latest revision v4.1.0, finally choose the folder location C:\Users...\zephyrproject. When finished, click Import. Import Zephyr main branch

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.

  1. 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 Import MCUX Repository

    The repositories are successfully added to the Imported Repository view once the import is successful. Imported Repositories

  1. To import any example application from the Zephyr Repository, click Import Example from Repository in the Quickstart Panel. Import Zephyr Example

  2. 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

⚠️ **GitHub.com Fallback** ⚠️