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: Arduino-like Third party libraries

Other Parts Discussed in Thread: ENERGIA, MSP430G2553

Tool/software: Code Composer Studio

Hi all,

I know TI provides some example code, but does anyone know if anyone has undertaken a project to write a library for interfacing with hobby boards such as Adafruit and Sparkfun does for Arduino? I like to be able to bring in some library code instead of starting from scratch each time I want to interface to a peripheral board. Or is this a project in the making?

I know there's Energia, but I'd rather stick with CCS since it has an integrated debugging. (However, I see Energia can now be imported into CCSv6.) Maybe that's the easiest way to develop code. The bonus is  that Arduino uses more of a C++/OOP paradigm which I think is more convenient, even though the underlying code is bare bones C/C++. CCS seems to prefer ANSI C. Maybe memory space is the basic issue here, not sure.

thank you.

  • Scott,

    Importing or creating new Energia project/sketches inside CCS may be the best option for you. CCS supports both C and C++. Most embedded developers use C but C++ is certainly an option. There is some information on C++ support in the TI compiler here: processors.wiki.ti.com/.../C++_Support_in_TI_Compilers

    However if you are using Energia then it will be using GCC by default so the answers would be somewhat different. In general depending on what features of C++ you are using there can be size and performance penalties as shown by the link above.

    There is information on the core libraries in Energia here:
    energia.nu/.../

    However I have seen examples where people have used sparkfun boards as well. Here is one:
    energia.nu/.../

    The Energia community has a set of forums that may be better able to assist you: forum.43oh.com/.../

    Regards,
    John
  • Hi John,

    Thank you for your response. I think what I'm looking for is more of a collection of examples or a library that will work with CCS. For example, something like:

    serial.print();

    would be handy. CCS provides a UART example, maybe it just needs to be wrapped inside of an OOP-style function call. Maybe there's a project.

    I'd rather stay with CCS and not migrate to Energia since (I'm guessing) Energia will be lacking in some of  the IDE features that Eclipse/CCS has like single-stepping through assembly.

    thank you,

    Scott

  • Sorry, I see now that I can use DBG and single-step thru assembly. This looks like a great way to migrate to the next level of abstraction.
    thank you.
  • Scott,

    Which device are you using?

    Regards,

    John

  • John,

    I mostly use the MSP430G2553 but also the 4270, 5438, and ARM-based Tiva TM4C123G.

    I like the Energia system but I'm concerned that it comes in as an .ino file. Do you know why it's not C code?

    thank you,

    Scott

  • Scott,

    The sketch (.ino) files really are C/C++.  They get passed to GCC for building.

    The people on the Energia forum would be able to better answer specific questions.  I have used it a bit personally for a project at home but I am not an expert.

    Regards,

    John