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

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

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

1,053 次查看
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.

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

822 次查看
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 项奖励
回复