AnsweredAssumed Answered

EWL C++ in MQX.

Question asked by raulnorthstar on Mar 18, 2013
Latest reply on Jun 12, 2014 by Michael Wahler

Hi Freescale Community.

 

I need to use the EWL C++ in MQX project. I've started with the C++ example "cplus" from MQX example applications. And it works fine (this project doesn't include "${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C++/include"), then when I included the path "${MCUToolsBaseDir}/ARM_EABI_Support/ewl/EWL_C++/include" in "Include User Search Paths" it doesn't compile. I've reduced the errors putting "ewl_c++" on "Properties"->"C/C++ Build "->"Settings"->"Librarian"->"Model". Also I've enabled (MQX_ENABLE_CPP 1) on "user_config.h" and I've rebuilded MQX libraries.

The errors that CW shows are:

 

**** Build of configuration twrk40x256_Int_Flash_Debug for project MQX_C++ ****

 

C:\Freescale\CW MCU v10.3\gnu\bin\mingw32-make -j16 all

'Building file: ../Sources/cplus.cpp'

'Executing target #1 ../Sources/cplus.cpp'

'Invoking: ARM Compiler'

"C:/Freescale/CW MCU v10.3/MCU/ARM_Tools/Command_Line_Tools/mwccarm" -gccinc @@"Sources/cplus.args" -o "Sources/cplus_cpp.obj" -c "../Sources/cplus.cpp" -MD -gccdep

C:/Freescale/CW MCU v10.3/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Error

(C:\Freescale\Freescale_MQX_4_0\lib\twrk40x256.cw10\debug\psp\lwsem.h|89|4|12|3061|12)

=    QUEUE_STRUCT               TD_QUEUE; 

>undefined identifier 'QUEUE_STRUCT'

C:/Freescale/CW MCU v10.3/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Error

(C:\Freescale\Freescale_MQX_4_0\lib\twrk40x256.cw10\debug\psp\lwmem.h|63|3|20|2306|20)

=   QUEUE_ELEMENT_STRUCT LINK; 

>undefined identifier 'QUEUE_ELEMENT_STRUCT'

C:/Freescale/CW MCU v10.3/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Error

(C:\Freescale\Freescale_MQX_4_0\lib\twrk40x256.cw10\debug\psp\fio.h|103|8|5|3712|5)

=#define stdin     (MQX_FILE_PTR)_io_get_handle(IO_STDIN) 

>macro 'stdin' redefined

C:/Freescale/CW MCU v10.3/MCU/ARM_Tools/Command_Line_Tools/mwccarm|Compiler|Note

(C:\Freescale\CW MCU v10.3\MCU\ARM_EABI_Support\ewl\EWL_C\include\file_struc.h|182|8|5|3777|5)

=#define stdin   (&__std(__files[0])) 

>    (location of previous definition)

 

Errors caused tool to abort.

mingw32-make: *** [Sources/cplus_cpp.obj] Error 1



 

I am working with CW10.3 and MQX4.0 on Windows 7. Thanks in advance for any ideas to resolve the problem.

Outcomes