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.

TI MSP430 C Compiler - Language Reference

Hi,

The MSP430 Optimizing C/C++ Compiler (SLAU132) often refers to keywords and identifiers specific to the MSP430 C compiler that comes with CCS. But there is no detailed language reference systematically listing and documenting all the keywords, identifiers, and directives specific to this compiler. Is there such a document? It would be a great help for beginners!

Thanks!

  • That is not be allowed.

    At one time, all humanity speak a single language, and God said: "They are one people and have one language, and nothing will be withholden from them which they purpose to do." So God said, "Come, let us go down and confound their speech." And so God scattered them upon the face of the Earth, and confused their languages, and they left off building the city, which was called Babel "because God there confounded the language of all the Earth." (Genesis 11:5-8).

  • Philipp Senn said:
    Is there such a document?

    No. For a reason.

    There are three elements where 'keywords' come from.

    First is the C language standard. The keywords should be known if you want to use this language for coding.

    Second are the symbols defined for the MSP. Most of them are covered by the users guide (register names, bit names etc.), some more are defined for convenience based on fixed rules (which are, however, nowhere documented): Usually, a bitfield  AAAAx has the symbols AAAA_0, AAAA_1... defined for all possible combinations, in addition to AAAA0 and AAAA1... representing the bits itself.
    The other defines that fall into this group are the interrupt vector names, which are also not directly found in any datasheet.
    For all these, you can look into the header files of your MSP and you'll find them all.

    The third group of keywords are compiler specific things that are to covered by the C language at all. Here reading the compiler manual is a must.
    Things like status registers, stack pointer or hardware interrupts are not part of the C universe. So every compiler that wants to provide specific access to them has to provide some 'intrinsics'. These are 100% compiler dependent, even though some of them have been adopted by other compilers and are now equally available on IAR, CCS and MSPGCC.

    Since the three groups are there for different reasons and in a different context, there is no single document covering them all.

**Attention** This is a public forum