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.

CC2652P: c++ file in c project

Part Number: CC2652P


Hello, I found this topic, the solution of which, in theory, should completely solve my problem, but I can’t find such an item in the CSS settings. 

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/431544/include-hpp-file-in-c-project-give-errors

Maybe someone can tell in more detail where to find the function "Treat C files as C ++ files" in CSS 12?

  • Maybe there is another solution?
    The essence of the problem is as follows: for the project openthread CC26552, I want to enable the ability to send messages via mqtt. I try to base on github.com/.../openthread-mqttsn
    I copied the necessary files to my project, made an include of the mqttsn.h file, which describes the necessary functions. The complexity starts further: the implementation of these functions goes in the file mqttsn-api.cpp. When I don't try to call these functions, the assembly goes fine and files like mqttsn-api.o appear in the debug folder, but if I try to call, then everything crashes right away.

  • unfortunately, i can not delete the thread, but, fortunately, the problem was solved. the whole file was wrapped in an if with a check whether the functionality is included at all, which I did not immediately notice when I defined the OPENTHREAD_CONFIG_MQTTSN_ENABLE 1 property, then everything worked,