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/MSP-EXP432E401Y: Error after adding #include "ti/devices/msp432e4/driverlib/driverlib.h"

Part Number: MSP-EXP432E401Y
Other Parts Discussed in Thread: MSP432E401Y

Tool/software: Code Composer Studio

Hi,

after adding #include "ti/devices/msp432e4/driverlib/driverlib.h" to my code i get the following error which refers to msp.h:

msp.h looks like the following:

/******************************************************************************
*
* Copyright (C) 2012 - 2017 Texas Instruments Incorporated - http://www.ti.com/ 
*
* Redistribution and use in source and binary forms, with or without 
* modification, are permitted provided that the following conditions 
* are met:
*
*  Redistributions of source code must retain the above copyright 
*  notice, this list of conditions and the following disclaimer.
*
*  Redistributions in binary form must reproduce the above copyright
*  notice, this list of conditions and the following disclaimer in the 
*  documentation and/or other materials provided with the   
*  distribution.
*
*  Neither the name of Texas Instruments Incorporated nor the names of
*  its contributors may be used to endorse or promote products derived
*  from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* MSP432 Family Generic Include File
*
* File creation date: 08/03/17
*
******************************************************************************/
#ifndef __MSP432_H__
#define __MSP432_H__
/******************************************************************************
* MSP432 devices                                                              *
******************************************************************************/
#if defined (__MSP432E411Y__)
#include "msp432e411y.h"

#elif defined (__MSP432E401Y__)
#include "msp432e401y.h"

/******************************************************************************
* Failed to match a default include file                                      *
******************************************************************************/
#else
#error "Failed to match a default include file"
#endif

#endif /* __MSP432_H__ */

Why isn't it matching the second #include in msp.h? Because i'm using the 401Y.

Regards

Christoph

  • Hi Christoph,

    I would like to try and recreate the compiler error you are seeing so that I can debug it on my end. Are you working off of a code example? If so, could you please let me know which one so I can import it?

    Best regards,

    Matt

  • I used MSP.H, and I had to manually force it to work right.

    //  #if defined (__MSP432E411Y__)
    //  #include "msp432e411y.h"
    
    //  #elif defined (__MSP432E401Y__)
    #include "msp432e401y.h"

    This tells me that the compiler doesn't have a #define __MSP432E411Y__ anywhere. That should be in a global. But I haven't had time to hunt for it, so I just manually tweaked MSP.H to always include the msp432e401y.h file.
  • Hi Matt,

    i added the #include to socket_cmd.c in the network_terminal example.

    Regards

    Christoph

  • When forcing msp.h to #include "msp432e401y.h" like allen kitchen said it seems to work. But i get other errors now. In general i want to add CAN bus to the network terminal example. For that i'm using parts of the CAN examples. New errors:

    The undefined identifier are from the "configureCAN"-function from the can_singlemessage_receive example. But i can't find where it is defined in the example. In addition there is a problem with using the "tCANMsgObject" s. I also added all #include-paths and library files from the can_singlemessage_receive example to network_terminal in the properties.

    Regards

    Christoph

  • It works now, thanks.

    Regards

    Christoph

  • Christoph,

    I'm glad to hear you got it working :) If you have the time, could you please provide a short description of how you solved the issue so that other community members can benefit from your debug efforts?

    Best regards,

    Matt

  • Hi Matt,

    of course i can.

    For the first issue i looked in the CAN-examples by mouseover as what the two variables are defined.

    So i just define them in the code with their value:

    #define GPIO_PA0_CAN0RX 0x00000007
    #define GPIO_PA1_CAN0TX 0x00000407

    The problem with the tCANMsgObject was because they were outside of a function, so i just placed them inside a function.

    Regards

    Christoph

**Attention** This is a public forum