Using Python and Segger command line tools to automate the compilation of executables, programming the embedded device, and measuring the execution timing and energy of a code of interest in embedded C. The energy was mesaured in joules using Joulescope. The timing was measured in number of CPU cycles using the Debug Watchpoint and Trace (DWT) unit in an ARM-based SoC. This number is then divided by the device’s operating frequency to get the execution time in seconds.

Simultaneously profiling the execution time and energy for the same piece of code using two identical embedded devices (nRF52832 DK).

The power supply used in the above picture, on the mid-left with a small display, is the one from a previous project - Build a Power Supply Monitoring and Control System.

Simultaneously profiling the execution time for different pieces of code on five identical embedded devices (nRF52840 DK).

The automation of the measurement is carried out using Python, which also stores the collected data in a database using local MongoDB instance for data logging purposes.