Unit-testing in MCUXpresso?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unit-testing in MCUXpresso?

3,225 Views
urban_sharon
Contributor III

My target is a Cortex-M4 processor. In my project, I have already separated out the testable core-logic into a static-library, and now, I would like to conveniently unit-test it.

How can this be achieved using the MCUXpresso IDE?

Thanks!

Labels (1)
0 Kudos
Reply
2 Replies

3,074 Views
eldarfiring
Contributor III

Hi,

I am using Google Test Framework as unit test for the libraries (C++). I have defined GCC/x64 target (in addition to M4-Debug/Release) in MCUXpresso. The test application is an executable file which you can run from a "DOS" console window to test your library code.  You can also install "C/C++ Unit Testing Support" in MCUXpresso and set test runner to be "Google Test Runner".  The results are then presented as simple graphics inside MCUXpresso.

Best Regards,

Eldar

3,074 Views
ErichStyger
Specialist I

Hi sharon,

there are different framework availble depending on your needs. If things are in a static library is not really relevant, as long as you have the logic in place. What I'm using with MCUXpresso is uCUnit, see Tutorial: μCUnit, a Unit Test Framework for Microcontrollers | MCU on Eclipse 

I hope this helps,

Erich