Reputation: 706
I am trying to compile Google Test Framework using IAR compiler for ARM, but I face difficulties related to the lack of system libraries such as pthread.
Has anybody been able to compile Google Framework using IAR compiler for ARM?
Upvotes: 3
Views: 3367
Reputation: 618
I have tried for the past few days to get GoogleTest to work so that I can perform unit testing on our ARM microcontroller in IAR using the simulator and I've given up. Like you stated, I was running into issues like threading and libraries that aren't available in the IAR toolchain.
Instead, we've decided to move forward using a different framework that we've had success with so far called CppUTest. It also offers a mocking framework which we've been able to use. There's also the ability for CppUTest to use the GoogleMock mocking framework (which I haven't tried yet).
We've demonstrated that we're able to use CppUTest using GCC and IAR which allows us to use the GCOV capability provided by GCC but then switch over to the IAR compiler to verify the code will compile for our target.
A great reference that I found has been the book: Test Driven Development for Embedded C by James W. Grenning. It uses both CppUTest and Unity for their unit testing framework examples.
There may be plenty of other frameworks out there that will work as well we settled on CppUTest since there's examples in the book and it does everything we've needed so far.
I know it isn't the answer you were looking for, but I hope it helps!
Upvotes: 4