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/MSP430FR5989-EP: Wrong MSP430 part .h file included in my CCS project

Part Number: MSP430FR5989-EP
Other Parts Discussed in Thread: MSP430FR5739, MSP430FR5989, MSP430FR5969, MSP430FR5959

Tool/software: Code Composer Studio

Previously I was working with a project that was using a different MSP430 part (FR5739).  From that project I changed the part to FR5989 which is the new part I'm currently using.  I'm noticing that some of the #defines from the old part (5739) are being included in my new project even though I switched the part number.  I right clicked on those locations and clicked Open Declaration and sure enough it's opening msp430fr5739.h, the header file for the OLD part.  I looked everywhere I can think in CCS to tell it to use the header file for the new part, but it still tries to use the old part.  Where is the part .h file set in CCS?

  • Russell,

    How did you change the device?

    Was it using this:

    When you change that setting it should swap in the appropriate linker command file and it should change the --define for the device that would control what header file the msp430.h file pulls in.

    This was a 5529 project that I changed to 5632.

    Typically you include the msp430.h in your application

    Then the msp430.h pulls in the device specific header file based on that define

    Regards,

    John

  • Thanks for the response... that's exactly what I'm doing.  

    There's something strange going on here.  If I look at msp430.h, CCS appears to be including the right .h file (msp430fr5989.h).  See the image below. 

     

    However in a separate file I'm trying to use the ADC and I have these two lines:

    Here the ifdef is commented out, indicating that it's unable to use the correct version.  

    HOWEVER, I'm able to build the project successfully, even though I'm making references to ADC12_B, which doesn't even exist on the 5379 part, it only exists on the 5989.  But oddly when I right click on ADC12_B and choose Show Declaration I see red text in the bottom left corner of CCS: "Selected text cannot be mapped to a symbol name".  How am I ever able to build the project successfully if CCS can't find the symbols?  Something is strange.

  • I wish I could edit posts. I forgot the 2 underscores after 5989 above, so BOTH of those ifdefs appear to be working. However if I right click on __MSP430FR5989__ and click Open Declaration I still get the CCS Red Text and error message, "Could not find symbol '__MSP430FR5989__' in index.
  • Looks like it is missing the extra __ on the end in the second screen capture. i.e. has __MSP430FR5969 instead of __MSP430FR5969__
  • Yes see my edit.
  • I was able to resolve the problem. Something was wrong with my code composer meta data. I had to remove the project completely from my workspace and import it again. Now everything is correctly linked to the new microcontroller.
  • If the mouse is on the __MSP430FR5959__ then F3 will not work as it is trying to find where that symbol is defined which is in the build options.

    If it were in source then the indexer would find it and would do something like this.  When I put the mouse over __JOHN__ it shows me the tooltip and for F3 it goes to the #define line at the top of the file