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.

MSP432E401Y: cannot open source file "ti/devices/msp432e4xx/driverlib/driverlib.h"

Part Number: MSP432E401Y

Hello,

This is my first time programming a MSP device on a PCB. I am attempting to pull a GPIO pin high to verify my code uploads to the board correctly. The code is as follows:

#include "msp.h"
#include <ti/devices/msp432e4xx/driverlib/driverlib.h>

int main(void)
{
    GPIO_setAsOutputPin(GPIO_PORT_PE,GPIO_PIN3);
    GPIO_setOutputHighOnPin(GPIO_PORT_PE,GPIO_PIN3);
    return 0;
}

As I understand it, I need to include the driverlib to use the GPIO_setAsOutputPin function. However, when I attempt to build the project I get the following error:

line 5: fatal error #1965: cannot open source file "ti/devices/msp432e4xx/driverlib/driverlib.h"

I have installed the SDK, but appear to have done something incorrectly. How do I resolve this issue?

  • Hello,

    In CCS under the project properties > Resource > Linked Resources > Path Variables, check your COM_TI_SIMPLELINK_MSP432E4_SDK_INSTALL_DIR path. Mine shows C:\ti\simplelink_msp432e4_sdk_4_20_00_12. If this path isn't correct, you'll get the error you described.

    These variables are used for the search paths under CCS Build > ARM Compiler > Include Options.

    I would also recommend restarting CCS, checking for updates, etc. after the SDK installation.

  • I have taken those steps, and now receive the following errors:

    /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

    /bin/sh: -c: line 1: syntax error: unexpected end of file

    gmake: *** [main.obj] Error 2

    /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

    /bin/sh: -c: line 1: syntax error: unexpected end of file

    gmake: *** [startup_msp432e401y_ccs.obj] Error 2

    /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

    /bin/sh: -c: line 1: syntax error: unexpected end of file

    gmake: *** [system_msp432e401y.obj] Error 2

    Building file: "../startup_msp432e401y_ccs.c"

  • now receive the following errors

    After trying to build the project? I've never seen those errors before. Perhaps there are more paths that aren't correct.

    How did you install the SDK? Did you do it through TI Resource Explorer inside CCS? I expect that it would be easier to reinstall the SDK rather than try to fix all the paths manually.

    What version of CCS are you using?

  • Yes, I got those errors after trying to build the project.

    I installed the SDK through TI Resource Explorer inside CSS.

    I'm using CSS  Version: 10.2.0.00009 

    When I googled this error, I found some related errors in other people's python code (I am not using python). Their errors had to do with an extra quote symbol " in one of their files. I have been trying to find the files mentioned in the error code to resolve the issue, but haven't been able to yet. 

  • build the project

    Which project? I didn't see a specific project mentioned in the thread.

    I'm using CCS v10.1.1 and have installed the latest MSP432E4 SDK as you can see below. I imported the "empty_MSP_EXP432E401Y_nortos_ccs" and the "blinky_MSP_EXP432E401Y_nortos_ccs" projects into my workspace and both compiled with no errors.

    When I googled this error, I found some related errors in other people's python code (I am not using python). Their errors had to do with an extra quote symbol " in one of their files. I have been trying to find the files mentioned in the error code to resolve the issue, but haven't been able to yet.

    Unfortunately, I wasn't able to replicate it, so this is a good strategy. You may find a thread where someone else resolved an issue like this.

  • I have finally found the source of my error. The code I was using was for the MSP432P, and I have a MSP432E. I learned they have entirely separate commands, so the types of functions I should have been using in the driverlib are as follows:

    GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, GPIO_PIN_3);
    GPIOPinWrite(GPIO_PORTE_BASE, GPIO_PIN_3,1);

    Here's more information for the correct driverlib and what functions can be used: software-dl.ti.com/.../index.html