Processor specific headers

Comments

8 comments

  • Avatar
    Jon Elliott

    If you're used to 1.x, a major difference with 2.x is that all the CPU and board specific files are kept in support packages rather than distributed as part of the main installation. See the Managing Support Packages section of the Getting Started tutorial for more information on installing support packages.

    Regards,

    Jon Elliott

    0
    Comment actions Permalink
  • Avatar
    James Cassidy

    Thanks Jon.  I had gone through that part of the docs and the 430 support package was installed.  When looking at that support package with 'Show Installed Packages', there is a section on 'Documentation' and a section on 'Solution Files', but can't locate any system files. 

    In poking around the example solution files, I can see that the msp430.h has the definitions I want, but I can't find any place in the documentation that explains how to locate, view or add this file to my project/solution.

     

    Thanks

    Jim.

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    Packages are installed into $(PackagesDir) - to find out the value of $(PackagesDir) on your system click Project > Macros and look for PackagesDir in the System section.

    The $(PackagesDir) macro can be used in properties such as Preprocessor Options > User Include Directories or Linker Options > Additional Input Files to locate header files and object files. The default include file search path is $(StudioDir)/include;$(PackagesDir)/include.

    Regards,

    Jon

     

    0
    Comment actions Permalink
  • Avatar
    James Cassidy

    Thanks Jon! 

    I was trying to compile the MSP430 FreeRTOS port and it didn't have the $(PackagesDir)/include macro defined, so it wasn't finding the msp430x.... headers, and I didn't understand about the macros.

    Now that it's compiling....they like to use multi-line #define statements, but the compiler doesn't like the '\' line continuation character.  Is that something that has also changed in 2.0?

    i.e. #define portENTER_CRITICAL() { \

    extern unsigned portSHORT \

    etc....


    Thanks,

    Jim.

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    Backslash works just fine in macro definitions.

    Make sure that you don't have a space after the backslash and that you have correct line endings for your OS (e.g. CR+LF dor Windows, LF only for Linux and OS X).

    0
    Comment actions Permalink
  • Avatar
    Paul Hester

    Is it possible to generate a processor specific include file from the support packages or are they avaiable to download? I'm trying to port over some code from the IAR & the person who wrote it uses macros like "CCTL0" and magic numbers which I want to look up to check it is what I think it is (TACCTL0 in this instance). I could download the IAR Kickstart but I would rather not.

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    The header files are provided to us by TI; the MSP430 is the only processor where we take and distribute include files generated by the manufacturer because they should be "semi-portable" to all compilers (and TI ensure they do, and they do a pretty good job).

    I think you'll have no choice but to look at the headers used by IAR to see if your understanding of them is incorrect.  It's a bit of a mess as IAR provide their own headers and TI produce headers in the same style for all MSP430 compiler vendors which IAR elect not to take (but will accept).

    0
    Comment actions Permalink
  • Avatar
    Paul Hester

    OK - thx for the prompt response. I suppose getting the IAR includes is the safest method given your comments.

    I did find the actual header files here so my original request is not needed :) But glad I asked.

    C:\Documents and Settings\{Username}\Local Settings\Application Data\Rowley Associates Limited\CrossWorks for MSP430\packages\include

    0
    Comment actions Permalink

Please sign in to leave a comment.