开发者

Unit Testing on Embedded C++ (ARM9)

I come from the world of Java and JUnit. I made a demonstration of Hudson and all what I achieve there with JUnit among other things. I would like to do the same with C++ code on an embedded device but can't find where to start.

THe project is compiled with iccarm.exe (IAR compiler) Right now the output is converted into an image file using romutil.exe to be flashed to the ARM9 board.

I tried to follow this tutorial: http://netbeans.org/kb/docs/cnd/c-unit-test.html but I'm having issues trying to figure out how to port it to my case.

  1. Can I run unit tests on the C++ code outside of the device? (i.e. for doing it with Hudson to gather reports and so on)
  2. Can I t开发者_StackOverflow中文版urn the output into an exe? (looks like Netbeans expects it to be)
  3. What's the most appropriate unit framework for my case? (CppUnit, CUnit, etc)

Any help/direction is more than welcome.


1) You could build a cross-compiler, and then instead of using iccarm.exe, use the cross compiler. There are lots of tutorials on the net how to build a cross compiler using gcc. Then instead of building for the target (using cross compiler) build for your host using normal compiler.

3) Whatever you like. cppunit, google unit tests, etc

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜