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/CODECOMPOSER: Including header files by adding MCSDK_ROOT to Include options

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: MOTORWARE, C2000WARE

Tool/software: Code Composer Studio

Hello, 

I am having troubles including header files from MotorWare library (the compiler cannot find them).

In File search path and include options I have added MCSDK_ROOT variable and some of it subfolders. (I saw it done this way in example projects.)

In Linked resources of the project, MCSDK_ROOT variable is defined as ${COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INCLUDE_PATH}

And going further, COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INCLUDE_PATH is then defined with it's definite path as: C:\ti\C2000Ware_MotorControl_SDK_2_00_00_00

(also in Linked resources of the project).

Do you have to manually add a path variable to code composer after MotorWare is installed?

When I add files from Include options using absolute path (i.e. C:\ti\etc), everything works properly.

Best regards,

Tom

  • user6047019 said:
    In Linked resources of the project, MCSDK_ROOT variable is defined as ${COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INCLUDE_PATH}

    Note that MCSDK_ROOT is defined as ${COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INSTALL_DIR}

    If you go to Project Properties->Build->Compiler->Include Options, and hover over the three dots next to the include_path ${COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INCLUDE_PATH},  you will notice that it says <none> next to it, which means that it does not resolve to anything. So instead of using that variable, use ${MCSDK_ROOT} instead and specify include paths relative to the root SDK directory. This is what the example projects do as well.

    Hope this helps.

  •  

    I have Changed MCSDK_ROOT to be: ${COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INSTALL_DIR},

    and have added two paths that I need in Include options.

    However, I still cannot get the project to include files properly.

    MCSDK_ROOT resolves to <none> as can be seen from the image above.

    Am I missing something else? Thanks in advance.

    Regards,

    Tom.

    EDIT: When I add a definition of path variable with name:

    COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INSTALL_DIR

    and location C:\ti\C2000Ware_MotorControl_SDK_1_00_00_00

    when I press apply and close and then reopen the Linked recources from project options, the entry that I just added is not there.

  • Please zip up your project folder and attach it here for us to take a look.

  • These are the steps I had to take to resolve the include path build error.

    1) First I went into the Project Properties->General->Products tab and enabled C2000 Motor Control SDK.

    This sets up the COM_TI_MOTOR_CONTROL_C2000WARE_SDK_SOFTWARE_PACKAGE_INSTALL_DIR and MCSDK_ROOT variables properly.


    2) Next I built the project and got a bunch of errors related to not finding "types.h"

    3) types.h is in this directory within the SDK: C:\ti\C2000Ware_MotorControl_SDK_2_01_00_00\libraries\utilities\types\include
    However the include path in the project's compiler options only had the path: ${MCSDK_ROOT}/libraries/utilities/types

    4) I changed it to ${MCSDK_ROOT}/libraries/utilities/types/include and that made the include errors go away.

    5) A couple of build errors still remain but those are coding errors and not related to the tools.

    Hope this helps.