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/MSP430F5510: driverlib.h Fails to Compile unless driverlib files are in project root directory

Part Number: MSP430F5510
Other Parts Discussed in Thread: MSP430WARE

Tool/software: Code Composer Studio

I was able to create a project in CCS7 for the MSP430F5510. I was able to manipulate I/O bits on my custom PCB.

I'm now trying to use driverlib.h in CCS7 for a new project based around the same MSP430F5510 based prototype. I used the new project wizard. However, there is no listing in the templates for MSP430Ware.

I then tried to import driverlib.h manually.

If I import all of the files in C:\ti\msp\MSP430Ware_3_60_00_10\driverlib\driverlib\MSP430F5xx_6xx to the project root directory, then the project builds fine, without errors. However, this really makes a mess of the project directory.

If I add a new directory called "driverlib" to my project and then import the files in the above directory to the "driverlib" directory, then the build fails, indicating the driverlib.h was not found.

How can I get the project to find driverlib.h if I put the files in a subdirectory?

Thank you for your help.

  • To be able to find a .h file, it must be in the same directory as the file including in, or in a directory in the include path.

    So the driverlib directory must be added to the include path.

  • Thank you for your reply. The link in your answer says that the first step is to right click on the project and select "Add Files". There is no "Add Files" option in CCS7. The closest option is "Import". When I use the "Import->General->File System" option I navigate to the directory that contains driverlib.h for my device family. I click on "Create top-level folder". A folder called "MSP430F5xx_6xx" is added to the project. This folder contains driverlib.h. When I build the project, I get the save error . . . "#1965 cannot open source file "driverlib.h".
  • The import thing is to add the directory (which you already have) to the include path.
  • Thank you . . . that solved the problem.

**Attention** This is a public forum