Skip to main content
Blog

Increasing Flexibility: Software Defined Hardware Interfaces on Heterogeneous SoCs with Zephyr

By June 11, 2025No Comments
Increasing Flexibility Software Defined Hardware Interfaces on Heterogeneous SoCs with Zephyr - Blog by Peter Fecher. Phytec

This blog is written by Peter Fecher, Software Developer, Phytec Messtechnik GmbH

As embedded systems continue to grow in complexity, the demand for flexibility at the hardware interface level has become more and more interesting for engineers. During my Bachelor’s thesis at Hochschule RheinMain in cooperation with PHYTEC Messtechnik GmbH, I explored how NXP’s FlexIO peripheral can be harnessed to build a software-defined hardware layer — paving the way for more configurable embedded platforms. At the heart of this solution: Zephyr RTOS and OpenAMP.

Increasing Flexibility Software Defined Hardware Interfaces on Heterogeneous SoCs with Zephyr - Blog by Peter Fecher. Phytec

The Challenge 

Modern System-on-Chips (SoCs) like the NXP i.MX93 family offer an increasingly diverse array of integrated peripherals. FlexIO is one such IP-block — designed to emulate standard interfaces such as UART, SPI, or I2C purely through software-defined configuration. However, while powerful, FlexIO comes with constraints: it 

lacks large buffers and operates with tight timing requirements. Attempting to run FlexIO drivers directly from Linux leads to unacceptable processor overhead and potential data loss at higher baud rates due to too many interrupts. 

To overcome this, we leverage the i.MX93’s heterogeneous architecture, specifically the ARM Cortex-M33 coprocessor, to move interface emulation out of the Linux domain and into a real-time execution environment. This allows Linux to remain responsive while still benefiting from flexible peripheral emulation. 

Moreover, the software defined hardware shall be as modular as possible to be able to use it in different projects, on different platforms, and with different interfaces. 

Why Zephyr? 

Zephyr RTOS proved to be the best fit for the coprocessor firmware. It provides a modular and scalable foundation, is cross-platform compatible, and supports OpenAMP for interprocessor communication. After comparing alternatives—including BareMetal and NXP’s MCUXpresso SDK—Zephyr emerged as the most balanced solution in terms of maintainability, performance, and portability. 

Architecture Overview 

The system consists of a Zephyr application running on the Cortex-M33 that emulates the selected interface (e.g., UART via FlexIO) and communicates with the Linux host through OpenAMP and RPMsg. A custom Linux kernel module then presents this virtualized device to the user as a standard /dev/ interface. 

The architecture cleanly separates responsibilities: 

Zephyr (on M33) handles real-time peripheral emulation and buffering. 

Linux (on A55) remains the application host, receiving data via RPMsg and interfacing through a kernel module.

This division drastically reduces interrupt load and scheduling overhead in Linux—particularly important in systems with multiple high-throughput interfaces. 

The goal of high modularity and platform independency was achieved by separating emulatable interfaces into distinct modules that will be created as configured in Devicetree. 

On the Linux side, one kernel module handles a specific type of interface (e.g., UART). The kernel detects the configured interfaces via the RPMsg channel name, which will be created by the corresponding Zephyr device-module, and loads the appropriate driver module for that interface. Detecting the interfaces in this way allows maximum flexibility on the Linux side, because no additional configuration besides the Zephyr device-tree is needed. 

Because of the nature of OpenAMP, just needing a shared memory region and a mailbox for communication, the same architecture can be used on different platforms given these requirements. 

From Concept to Prototype 

While initial development targeted the i.MX93, limitations in Zephyr’s driver support for its newer TRDC (Trusted Resource Domain Controller) and mailbox peripheral led to a pivot toward the i.MX8M Plus platform for prototyping. This board was fully supported by Zephyr and allowed testing of the concept using standard hardware UARTs, acting as stand-ins for FlexIO. 

The architecture remains platform-agnostic. Once Zephyr support for the i.MX93 matures, adding a FlexIO UART interface on that target should require minimal changes. 

Results and Outlook 

The Prototype shows a base framework of how (real-time restricted) software defined hardware can be implemented to work with Linux. Through the modular nature of the implementation additional protocols and interfaces (e.g., SPI, I2C) or even self engineered protocols can be added just with writing the Zephyr device module and the corresponding Linux kernel module. 

This implementation of a software defined hardware demonstrates how combining Zephyr, OpenAMP, and a thoughtful hardware/software partitioning can unlock new capabilities for embedded platforms. It also opens up exciting possibilities for more dynamic hardware configuration in future Products.

If you are interested in the prototype, take a look at this repository: https://github.com/pefech/software-defined-hardware-public

OSZAR »