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

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

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

710 Views
stevenneves
Contributor I

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.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

479 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Steven,

this is what I achieved on using C++ with MQX for KSDK.

How to Create a C++ Project Using MQX RTOS for KSDK1.2

If you have a specific use case that does not work would you share a simple code please?

Regards,

Carlos

0 Kudos
Reply