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
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
- Emulated DMA controller 
- Main Kconfig option: - CONFIG_DMA_EMUL
- DT binding: - zephyr,dma-emul
 
- EEPROM emulator
- Emulate an EEPROM on a flash partition 
- Main Kconfig option: - CONFIG_EEPROM_EMULATOR
- DT binding: - zephyr,emu-eeprom
 
- EEPROM simulator
- Emulate an EEPROM on RAM 
- Main Kconfig option: - CONFIG_EEPROM_SIMULATOR
- DT binding: - zephyr,sim-eeprom
- Note: For native targets it is also possible to keep the content as a file on the host filesystem. 
 
- External bus and bus connected peripheral emulators
- Allow emulating external buses like I2C or SPI and peripherals connected to them. 
 
- Flash simulator
- Emulate a flash on RAM 
- Main Kconfig option: - CONFIG_FLASH_SIMULATOR
- DT binding: - zephyr,sim-flash
- Note: For native targets it is also possible to keep the content as a file on the host filesystem. Check the native_sim flash simulator section. 
 
- GPIO emulator
- Emulated GPIO controllers which can be driven from SW 
- Main Kconfig option: - CONFIG_GPIO_EMUL
- DT binding: - zephyr,gpio-emul
 
- I2C emulator
- Emulated I2C bus. See bus emulators. 
- Main Kconfig option: - CONFIG_I2C_EMUL
- DT binding: - zephyr,i2c-emul-controller
 
- RTC emulator
- Emulated RTC peripheral. See RTC emulated device section 
- Main Kconfig option: - CONFIG_RTC_EMUL
- DT binding: - zephyr,rtc-emul
 
- SPI emulator
- Emulated SPI bus. See bus emulators. 
- Main Kconfig option: - CONFIG_SPI_EMUL
- DT binding: - zephyr,spi-emul-controller
 
- MSPI emulator
- Emulated MSPI bus. See bus emulators. 
- Main Kconfig option: - CONFIG_MSPI_EMUL
- DT binding: - zephyr,mspi-emul-controller
 
- UART emulator
- Emulated UART bus. See bus emulators. 
- Main Kconfig option: - CONFIG_UART_EMUL
- DT binding: - zephyr,uart-emul