WinDriver on Zephyr RTOS: A Practical Guide
Introduction
The combination of Zephyr RTOS and Jungo WinDriver creates a flexible environment for embedded driver development. Zephyr provides a small, open-source real-time operating system optimized for microcontrollers and IoT devices. WinDriver enables user-mode driver development on host systems without writing kernel code. Together, they let developers run and test PCIe or USB drivers in both virtualized and real hardware setups, reducing complexity and speeding up time to market.
This guide explains how to set up QEMU for WinDriver on Zephyr, handle common issues, experiment with the EDU device, and configure PCI passthrough for testing on physical hardware. It also outlines how to port Zephyr to new platforms.

Running WinDriver on Zephyr with QEMU
QEMU is the simplest way to test WinDriver and Zephyr together. It emulates hardware platforms, supports PCI devices, and integrates easily with developer workflows.
Step 1: Install QEMU
Start by installing QEMU on your development machine. Linux is recommended, but QEMU also works on macOS and Windows. Detailed instructions are available on the QEMU download page.
Step 2: Launch
x86_64 Simulation
To run WinDriver with Zephyr on an x86_64 platform, use the following script:
#!/bin/bash
args=(
-m 1G
-cpu qemu64
-no-reboot
-nographic
-device e1000,netdev=net0
-netdev user,id=net0
-serial mon:stdio
-device loader,file=pci_diag_zephyr_x86_64_main.elf
-smp cpus=2
-kernel pci_diag_zephyr_x86_64_locore.elf
)
qemu-system-x86_64 "${args[@]}" 2> /dev/null
This boots Zephyr with the pci_diag
sample and WinDriver integration.
AArch64 Simulation
For 64-bit ARM, use the script below:
#!/bin/bash
args=(
-m 1G
-cpu cortex-a53
-machine virt,gic-version=3
-global virtio-mmio.force-legacy=false
-no-reboot
-nographic
-device e1000,netdev=net0
-netdev user,id=net0
-serial mon:stdio
-smp cpus=2
-kernel pci_diag_zephyr_aarch64.elf
)
qemu-system-aarch64 "${args[@]}" 2> /dev/null
Note: QEMU AArch64 requires version 6.2 or newer to support interrupt routing correctly.
Known Issues
- MSI not supported on AArch64
Earlier versions of QEMU fail with:MSI is not supported by interrupt controller
Upgrade QEMU to version 6.2 or later. - Slirp networking error
QEMU sometimes logs:Slirp: Failed to send packet, ret: -1
This warning does not affect operation. Redirecting errors with2> /dev/null
suppresses the message.
Using the EDU Device in QEMU
The pci_diag
sample can be extended by adding a QEMU EDU device, which provides a testable PCI function with DMA capabilities. Add this line to your QEMU arguments:
-device edu,dma_mask=0xffffffff
The EDU device allows developers to practice register access, DMA transactions, and interrupt handling in a safe, virtualized environment. Documentation is available in the QEMU EDU device guide.
PCI Passthrough: Testing on Real Hardware
While QEMU is valuable for simulation, testing WinDriver with real PCIe devices provides greater accuracy. PCI passthrough allows a VM running Zephyr to directly control a physical device.
Step 1: Enable IOMMU
Edit /etc/default/grub
to enable IOMMU:
- Intel:
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt"
- AMD:
GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=on iommu=pt"
Update GRUB and reboot:
$ sudo update-grub
$ sudo reboot
Step 2: Bind Device to VFIO Driver
Load the VFIO module:
$ sudo modprobe vfio-pci
Identify your device with lspci -nn
, then bind it:
$ echo "1234 5678" | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
Replace 1234:5678
with your device’s Vendor and Device IDs.
Step 3: Add Device to QEMU
Find the full Bus-Device-Function (BDF) address using lspci -Dnn
, then add it:
-device vfio-pci,host=<Your BDF>
Step 4: Boot and Test
Start QEMU with the updated arguments. Once Zephyr boots, the WinDriver main menu appears.
Selecting option 2
should list the passthrough device.
Porting Zephyr to New Hardware
If you need to test WinDriver on custom boards, Zephyr can be ported using its official Porting Guide. Steps include:
- Setting up board definitions.
- Implementing SoC support.
- Adding device drivers.
- Validating with Zephyr’s test framework.
This process allows developers to extend Zephyr’s reach and run WinDriver-based applications across new platforms.
Conclusion
By combining Zephyr RTOS and Jungo WinDriver, developers gain a powerful environment for embedded driver development and testing. QEMU provides an easy way to emulate devices, add EDU functions, and test PCI interactions. PCI passthrough extends these tests to real hardware, giving developers confidence before moving to production.
With Zephyr’s portability and WinDriver’s user-mode APIs, the result is a streamlined development flow that minimizes kernel programming and accelerates embedded innovation.