AnsweredAssumed Answered

KSDK w/MQX True C++ support (i.e. <iostream> <string> etc.)?  Needed for CppUnit

Question asked by Steven Neves on Aug 19, 2015
Latest reply on Aug 20, 2015 by Carlos_Musich

I'm using KSDK 1.2 with MQX (full).  I've used the previous CW MQX BSP's in the past but have migrated to KSDK with the goal of using C++.  The main reason behind this is the stitch in CppUnit (C++ based unit testing framework).  In the past I've had to link in my applications source and run in it via cygwin, completely bypassing MQX and guarding my code to ignore any OS level calls during my unit test build.  I want to be able to run my unit test build on hardware.  I've created test projects that had .cpp files in it with a relatively simple class and a few public functions.  Everything seemed fine until I decided to use <iostream> and <string>.  Basically stdio.h (MQX's implementation) re-declares FILE which the C++ compiler does not appreciate very much.  After much struggling I was actually able to get CppUnit to compile but it doesn't properly launch and is stuck in a reset loop at line 69 of boot.S.  Does anyone have any experience implementing a unit test framework into KSDK with MQX, and what exactly is the extent of C++ support if using MQX.  Thanks.

Outcomes