I am looking for advice on how to do unit testing on my STM32F7 platform. What have people done in the past? What horror stories do you have? What would you do differently? What is problematic with my current plan?
My Setup
- STM32 Nucleo-144 with a custom carrier PCB
arm-atollic-eabi-gcc
compiler (no C++, for now)- Using Atollic TrueStudio as an IDE
- Development done from Ubuntu 16.04
- Running FreeRTOS on the board
My Testing Plan
There are different levels of testing; I am specifically talking about unit testing a library / set of functionality that does NOT depend on external hardware. Things like "does my ring buffer implementation correctly handle rolling over without memory leaks" and "does this bit-shift operation result in the correct endianness in the resulting variable"? So I am focused on those kinds of tests.
- Convert my project to compile with C++ (and all the associated
extern C
required) - Refactor my code into a "library" portion and an "application" portion.
- Build
googletest
(this is what we use for other parts of our system) and link my library into it for testing. - Run the unit tests on the device while running a debug session through Atollic.