Unit-testing in MCUXpresso?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Unit-testing in MCUXpresso?

4,291 次查看
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!

标签 (1)
标记 (2)
0 项奖励
回复
2 回复数

4,140 次查看
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

4,140 次查看
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