AnsweredAssumed Answered

CW10.5 c++ config, Kinetis and MQX4.1

Question asked by David E Seymour Employee on Mar 31, 2014
Latest reply on Apr 11, 2014 by David E Seymour

Hello,

I'm submitting this for a customer as I am not expert with C++ project in CW10.5 with MQX:

I'd like to know the proper configuration for a C++ and MQX project (preferably with 2009 C++).  I'm having a problem with I/O and printf (and related).   I'm getting an undefined reference to __pformatter, and when I start chasing this, it leads to UART symbols.   Here is a simple example to see the problem.

 

 

  •         Start with the cplus example in MQX 4.1 and change it to C+2009 ( gnu extensions).

 

  •         Replace cplus.cpp with the one enclosed (only two lines changed).

 

  •         Add the two additional files to the project.   Nothing MQX specific in these.

 

  •         Compile.

 

If I modify the source of cmds_memory.cpp to include mqx.h and fio.h in place of cstdio, then all is well (except I have to remove the std:: namespace on printf and sprint).

 

What is the proper configuration here?  Is there a configuration supporting the standard  be avoided in favor of mqx.h/fio.h.  I'm concerned my C++ environment configuration is not correct.

 

Regards,

David

 

David Seymour

Freescale FAE

Dallas, Tx

1-(469)-400-5345

Please attend:

FTF Americas

April 8-11, 2014

Gaylord Texan Resort & Convention Center

Dallas, Texas

http://www.Freescale.com/FTF

Original Attachment has been moved to: commands.h.zip

Original Attachment has been moved to: cplus.cpp.zip

Original Attachment has been moved to: cmds_memory.cpp.zip

Outcomes