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/MSP432E401Y: Compilation Failure Due To SysCtlClockFreqSet()

Part Number: MSP432E401Y


Tool/software: Code Composer Studio

My program, based off of adc0_singleended_singlechannel_singleseq.c, does not compile when SysCtlClockFreqSet() is called, and I'm not sure why. The error message and section of the code are below. I tried to call SysCtlReset() just to check if that entire header file is inaccessible, but that didn't result in any errors. I've also included the standard driverlib, and am using a number of functions from other driverlib headers, namely adc.h, so I'm at a loss as to why this specific function isn't working. All of the parameters are also accessible in sysctl.h.

My Includes, as listed in the directory and copied from the example, are:

C:/ti/ccsv8/ccs_base/arm/include
C:/ti/ccsv8/ccs_base/arm/include/CMSIS
C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include
C:/ti/simplelink_msp432e4_sdk_2_30_00_14/source
C:/ti/simplelink_msp432e4_sdk_2_30_00_14/source/third_party/CMSIS/Include
C:/ti/simplelink_msp432e4_sdk_2_30_00_14/source/ti/net/bsd

Error:

>> Compilation failure
makefile:144: recipe for target 'BOLT_IV_MCU.out' failed
 ---------          ----------------
 SysCtlClockFreqSet ./main.obj      
 
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "BOLT_IV_MCU.out" not built
gmake[1]: *** [BOLT_IV_MCU.out] Error 1
makefile:140: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

Code causing the error:

#include "msp.h"

/* Standard driverlib include - can be more specific if needed */
#include <ti/devices/msp432e4/driverlib/driverlib.h>

#include <stdint.h>
#include <stdbool.h>

#define GPIO_PORTS 15


int main(void)
{
    uint32_t systemClock;

    MAP_SysCtlReset();

    /* Configure system clock for 120 MHz */
    systemClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN |
                                          SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480),
                                          120000000);

  • I do not see anything obvious.  Can you import the original example and see if the issue is the same?  

    The 'MAP' points to a rom_map.h file that selects either an API found in ROM or in the Flash.  In this instance the MAP_SysCtlReset() goes to a ROM function while the MAP_SysCtlClockFreqSet goes to the flash implementation.   The pre-built Flash library needs to be included in your project or you need to bring the source into your project to be compiled.

    Regards,

    Chris

  • I deleted the example from my workspace and imported it back in, and it still compiled fine.  Added that highlighted path to the file search path as shown in my screenshot, but I'm getting the same error.

    edit: Turns out, I am getting a different error now:

    <Linking>
    fatal error #6001: cannot open file "C:/ti/simplelink_msp432e4_sdk_2_30_00_14/source":  Permission denied
     
    >> Compilation failure
    makefile:146: recipe for target 'BOLT_IV_MCU.out' failed
    gmake[1]: *** [BOLT_IV_MCU.out] Error 1
    makefile:142: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****

    I saw a few other e2e answers that said to "Enable Inheritance" in Windows security options, but they're already enabled from /source down the rest of the path. This error also now occurs with the problematic function commented out.

  • The file that you are trying to link is in here:
    C:\ti\simplelink_msp432e4_sdk_2_40_00_11\source\ti\devices\msp432e4\driverlib\lib\ccs\m4f

    You need to include the SimpleLink library path and the path+source:

    ${COM_TI_SIMPLELINK_MSP432E4_SDK_LIBRARY_PATH}
    ${COM_TI_SIMPLELINK_MSP432E4_SDK_INSTALL_DIR}/source

    I also notice that the includes for arm is pointing to CCS. I would recommend using the latest SDK and getting the arm includes from the SDK (C:\ti\simplelink_msp432e4_sdk_2_40_00_11\source\third_party\CMSIS\Include).

    An alternative is importing the empty project,
    C:\ti\simplelink_msp432e4_sdk_2_40_00_11\examples\nortos\MSP_EXP432E401Y\driverlib\empty, and then adding your source code.

    Regards,
    Chris
  • The issue is fixed! I added the paths you mentioned, but that didn't do anything, so I imported the empty project and just copied exactly what was in the file search path, and that worked.

    Thank you so much for your help. One more quick question - this project is part of a shared repository. What file(s) do I need to push so that everyone else working on the project has the fix as well?