Skip to content

mylonics/zephyr-ide

Repository files navigation

Zephyr IDE for VS Code

Zephyr IDE for Visual Studio Code

The Zephyr IDE for VS code extension provides tools to aide in your Zephyr Project work flow. This extension helps you to build Zephyr projects and share them with your team.

Please check out our new extension pack that bundles in additional tools.

You can read a little bit more about the motivation behind the project here.

Features

  • Sets up a west environment
  • Installs the Zephyr SDK using West SDK commands
  • Provides west.yml templates to start with or you can provide your own
  • Allows you to add projects from scratch or from templates
  • Create multiple projects
  • For each project, you can create multiple builds
  • Each project may have its own kconfig files and overlay files
  • Each build may have a unique board, kconfig files, and overlay files and runner
  • Each build may be bound to a launch/debug configuration for debug, build and debug and attach.
  • GUI Panels to show the full project tree and active projects
  • Automatically changing active project based on the last viewed file in the editor
  • All commands that are available in the GUI are available in the command palette.
  • Provides useful functions to set up custom launch/debug configurations
  • Provides the user with a terminal to manually run west commands
  • Saves/loads project structure to workspace in a human readable and editable file
  • Works with all platforms zephyr supports
  • Code Quality Tools: Includes unused code detection to help maintain clean codebases

Code Quality

This extension includes tools to help maintain code quality:

  • Unused Code Detection: Static analysis tool to identify potentially unused files and exports
    • Available via command palette: "Zephyr IDE: Detect Unused Code"
    • Also available via npm script: npm run detect-unused
    • See detailed documentation for more information

Getting Started

There is a manual available to help get started along with a couple Youtube tutorials.

Getting Started with Zephyr IDE

STM32 Board Setup And Debugging with Zephyr IDE

You can have a look at this sample directory to also help with getting started and sharing project.

Requirements

In order for this application to work correctly the zephyr require build tools need to be installed and available on the path. These include cmake, python3, and Devicetree Compiler.

See the Install Dependecies Section of the Zephyr Getting Started Guide

Testing

This extension includes integration tests that validate the complete Zephyr IDE workflow with west development tools.

Prerequisites

Required for integration tests:

  • Zephyr SDK
  • west (Zephyr meta-tool): pip install west
  • cmake, ninja-build
  • Python 3.8+

Running Tests

# Install dependencies
npm install

# Compile TypeScript
npm run test-compile

# Run all tests (includes integration tests)
npm test

# Run integration tests only (requires Zephyr tools)
node scripts/run-integration-tests.js

# Run tests with custom script
node scripts/run-tests.js

Test Coverage

The integration tests validate:

  • Real workspace creation with west init and update
  • Actual project creation from Zephyr blinky sample
  • STM32 build configuration for nucleo_f103rb board
  • Complete build execution with west build
  • Build artifact verification (binary, ELF files)

CI/CD Integration

Integration tests run in CI environments on:

  • Ubuntu (with full Zephyr host tools)

For more details, see docs/TESTING.md.

Known Issues

  • When using dev containers with WSL and Windows folders, the setup may not work correctly. If you're using dev containers in a WSL environment, ensure your workspace folder is located within the Ubuntu file system (e.g., /home/username/project) rather than in mounted Windows directories (e.g., /mnt/c/Users/...). This is an issue inherent with the west boards command.

Release Notes

See CHANGELOG for release notes

Development and Debugging

See the Zephyr IDE for VS Code Developer's Guide for development and debugging instructions.