This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CCSTUDIO: Changing an example project to c++

Part Number: CCSTUDIO
Other Parts Discussed in Thread: CC1310

Tool/software: Code Composer Studio

I am trying to take an example project, specifically rfEchoTx (NoRTOS) which I can build fine, and convert it to a c++ based project.  I can successfully change some files to cpp (like rfEchoTx.c to rfEchoTx.cpp) if I make an associated header and call out extern "c", but I cant seem to change the main_nortos.c to main_nortos.cpp it gives me unresolved symbol errors for things like NoRTOS_start(), but the nortos.h isnt rapped in cpluscplus defines like other TI code is.  Can someone help me out? Thanks!

  • I am not familiar with this particular example.  It is likely it is not documented to work with C++.  

    You need to decide where the boundary between C and C++ is.  It may not make sense to change everything from C to C++.  Once you have that settled, this FAQ (not from TI) shows how to transition between C and C++.

    You also need to understand how the compiler knows to compile a source file as C or C++.  In the typical case, it is based on the file extension.  .c means a C file and .cpp means a C++ file.  For further details, please see the compiler manual.  You don't say which TI device you use.  Just for now, I presume it is an ARM device, and you use the TI ARM compiler.  In that case, please search the TI ARM compiler manual for the sub-chapter titled Specifying Filenames.

    Thanks and regards,

    -George

  • It is one of the RF devices like a CC1310 or CC1352.

  • Keith Barkley said:
    It is one of the RF devices like a CC1310 or CC1352.

    Yes cc1312 I think.