March 2, 2025 Dimitrije Lilić

Firmware Energy Profiling Library for Devices Under Test (DUT)

Documentation
Firmware Energy Profiling Library for Devices Under Test (DUT)

FEPLib provides an interface for setting up and managing communication between DUT(user device) and OpenEPT Device. It abstracts platform-specific functions by calling low-level MCU-specific APIs. Complete library source code is available on the official GitHub repository .

The overall architecture of this library is presented in Figure 1.

As can be seen from the figure, this library includes the following parts:

As can be seen from the figure, this library includes the following parts:

As can be seen from the figure, this library includes the following parts:

Energy Debugging Protocol APIs provides a unified set of functions that allow easy communication with OpenEPT device. Functions available within this layer are:

The unified platform API ensures that EDP functionalities operate independently of the underlying hardware platform, providing flexibility for implementation across different systems. It allows end users to define platform-specific functionalities within a dedicated platform abstraction layer, ensuring that the required features are properly implemented for their specific hardware.

There are three directories available on the official GitHub repository :

The FEPLib is designed to be portable, allowing you to integrate it with different microcontrollers (MCUs) and platforms. The porting process for FEPLib is straightforward if the platform is already supported and the necessary code is available in the official GitHub repository under the platforms directory. In this case, the porting procedure involves the following steps:

For a straightforward linking process, ensure that the platform directory copied from the platforms directory, located on the GitHub repository, is placed at the same directory hierarchy level as feplib . However, if this is not the case, you will need to manually update the include path in platform.c by modifying the line:

#include "../../feplib/feplib.h"

to the appropriate path where feplib.h is located.

If the platform is not already supported, procedure is still straightforward but require a little more time. The porting process primarily involves implementing platform-specific functions that the library uses for hardware interaction, communication, and synchronization of DUT and OpenEPT Device. For the OpenEPT ED library to function correctly on a new platform, the user will need to implement platform-specific functions. These functions are the low-level interfaces to the hardware, and they include:

To simplify the porting process, a platform driver template file named platform_template.c is provided in the platforms/template directory. When creating a platform-specific file, users simply need to follow the instructions in the comments within this template and implement the required platform-specific functionalities.

The full example for STM32H755ZIQ and ESP32 board are available on the official GitHub repository under examples directory.

About the author

Dimitrije Lilić

Dimitrije Lilić

Firmware and Application Developer

Master electrical engineer specialized in low-level programming for embedded systems, firmware and GUI. With a solid five-year track record in the field, I thrive in the dynamic nature of my work, constantly seeking opportunities to expand my knowledge base. My dedication to pushing the boundaries of technology is evident in my pursuit of innovation and my enthusiasm for learning something new with each passing day.