This repository provides a highly optimized, minimalistic DevContainer for Zephyr RTOS development, specifically tailored for modern C++23.
Before starting, ensure you have the following installed based on your operating system.
- Docker Desktop: Download and install. Ensure "Use the WSL 2 based engine" is checked in Settings.
- WSL 2: Run
wsl --installin PowerShell. - DevPod: Download and install.
- Git: Download and install.
- Docker Desktop: Download and install.
- DevPod: Install via Homebrew:
brew install devpod. - Git: Usually pre-installed, or
brew install git.
- Docker: Install Docker Engine.
- Post-install: Add your user to the
dockergroup:sudo usermod -aG docker $USER. - DevPod: Download the latest binary.
- Git: Install via your package manager (e.g.,
sudo apt install git).
-
Clone the repository:
git clone https://github.com/Bilel-Eljaamii/Zephyr-Dev-Workspace.git cd Zephyr-Dev-Workspace -
Launch the environment: Use DevPod to build and open the environment in VS Code:
devpod up . --ide vscode -
Initialize Zephyr (Inside the container terminal): Once VS Code opens, run the following to set up the Zephyr project:
west init -m https://github.com/zephyrproject-rtos/zephyr --mr main . west update west zephyr-export
The DevContainer is configured with --privileged and /dev/bus/usb mapping.
- Linux: Works out of the box.
- Windows: Use usbipd-win to attach USB devices to WSL2.
- macOS: USB passthrough to Docker containers is limited; consider using remote debugging or a network-attached debugger.
For more technical details about the container architecture, see .devcontainer/README.md.