The latest development version of this page may be more current than this released 3.7.0 version.

Zephyr’s device emulators/simulators

Overview

Zephyr includes in its codebase a set of device emulators/simulators. With this we refer to SW components which are built together with the embedded SW and present themselves as devices of a given class to the rest of the system.

These device emulators/simulators can be built for any target which has sufficient RAM and flash, even if some may have extra functionality which is only available in some targets.

Note

Zephyr also includes and uses many other types of simulators/emulators, including CPU and platform simulators, radio simulators, and several build targets which allow running the embedded code in the development host.
Some of Zephyr communication controllers/drivers include also either loopback modes or loopback devices.
This page does not cover any of these.

Note

Drivers which are specific to some platform, like for example the native_sim specific drivers which emulate a peripheral class by connecting to host APIs are not covered by this page.

Available Emulators

ADC emulator
  • A fake driver which pretends to be actual ADC, and can be used for testing higher-level API for ADC devices.

  • Main Kconfig option: CONFIG_ADC_EMUL

  • DT binding: zephyr,adc-emul

DMA emulator
EEPROM emulator
EEPROM simulator
External bus and bus connected peripheral emulators
  • Documentation

  • Allow emulating external buses like I2C or SPI and peripherals connected to them.

Flash simulator
GPIO emulator
I2C emulator
RTC emulator
SPI emulator
MSPI emulator
UART emulator