In this tutorial we will create a basic FreeRTOS-based project for the ultra high-speed STM32H7-Nucleo board and will then measure the performance of several critical paths comparing it to the STM32F4-Discovery and the STM32F7-Nucleo boards. We will measure and compare the performance of 4 different actions:

The time to compute a sine value of a hardcoded argument (using the hardware floating point).

The time between one thread releasing a FreeRTOS semaphore and a higher-priority thread that was waiting for it executing some meaningful code.

The time to sort a list of 100 elements using the std::list::sort() function. Although this is not the optimal way sort small lists on embedded devices, comparing relative performance of the sorting gives a basic idea about the performance of memory-intense algorithms.

Finally we will measure the run time of an empty function in order to estimate the overhead of profiling the embedded code.

Before you begin, install VisualGDB 5.3 or later and ensure you have the latest version of the STM32 package and OpenOCD.