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/MSP-EXP430F5529: GUI Composer Beginner: Is it possible to use the aJSON library along with the CCS or it is only available to Energia?

Part Number: MSP-EXP430F5529
Other Parts Discussed in Thread: ENERGIA,

Tool/software: Code Composer Studio

Hi, 

I am getting started with the GUI Composer and just followed this tutorial: ( https://dev.ti.com/gc/designer/help/Tutorials/Serial/index.html ) with my board MSP-EXP430F5529. It worked properly as well as the out of the box example. But now I'ld like to use the facilities from the aJSON library along with the out of the box example to build my complete application though GUI Composer.

I don't know if it is possible to use an Energia library along with codes generated trhough CCS.  It's unclear for me.

thanks,

Sara

  • Hi Sara,

    It should be possible to build the firmware project with CCS desktop and the online IDE. You can create a Energia MSP432F5529 project, copy&paste the example project ino file content into the ino file in CCS.

    Regards,
    Patrick

  • Hi Patrick,

    thanks for answering! But I can't understand. Energia generates main code in a ino file, while CCS generates in a C main file. I don't know if I made myself clear, but I would like to reuse the libraries that come within the out of the box example project that is in C along with the aJSON library from Energia to make it possible to send data to my GUI application!

    Thanks Patrick!

    best regards.

    Sara

  • By the way, it's not MSP-EXP432F5529 nor MSP-EXP430F5529LP, It's MSP-EXP430F5529.
  • Thanks for the clarification. I haven't try to include an energia library into a C project. Let me ask one of the engineer that works on the project build system.

  • Hi Sara,
    I asked around, it doesn't seem like it is possible to do what you want. Including an energia library in a non-energia project.

    Is there any reason why you don't want to use an energia project for your firmware?

    Regards,
    Patrick
  • Hi Patrick,

    Yes, I just realized that it's only possible to import energia library in Energia projects inside the Code Composer Studio because Energia uses C++ language while CCS projects use C language. I think it's even possible to use C++ libraries along with a C main code. But I have no idea. (mainly because it involves Structural and Object Driven Languages)

    The opposite is easier since the C++ was born from C. To do this I used extern "C" in the libraries that contains the signatures of the functions in C.  

    So, I created an Energia project inside Code Composer Studio, imported the aJSON library, used the extern "C" that I mentioned in the librarie I wanted to use provided into the "out of the box project package" and finally got to use aJSON along with the C accelerometer library that came with the package. My next step is to send accelerometer data to GUI through aJSON packages. 

    I'd like to do the opposite since there are many C libraries that I'd have to change if I wanted to use. And in the other side I have only one cpp library I need to use that is aJSON. But It doens't seem simple as I mentioned. And there is another point here, CCS IDE seems to run better when making all this, I did the same in Energia and it gave-me errors I couldn't solve. Compilers things, I believe.

    thanks Patrick!

    best regards, 

    Sara