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.

Code Composer Studio Workspace Links to Header Files

When a program file in the CCS Workspace loses all its links to the referenced header files which a have all the alias name declarations.

Is there a way to repair this so the links once again work? For example if you right click on any of the aliased register values such as "CS_CLOCK_DIVIDER_2" in the program attached nothing happens. Normally the declaration for CS_CLOCK_DIVIDER_@ opens the cs.h file and highlights "#define CS_CLOCK_DIVIDER_2 CS_CTL1_DIVS_1"

The only fix I found is to open a new Workspace and import the same program to the new workspace.

/*******************************************************************************
 * MSP432 Clock System - HFXT Startup
 *
 * Description: This is a simple code example that starts the 48MHz crystal
 * attached to HFXTIN/HFXTOUT, sources MCLK from the crystal, and then
 * blinks an LED using SysTick (which is sourced from MCLK). This is meant
 * as a very elementary code example which shows the use how to start the
 * high frequency crystal and source clock signals from HFXT.
 *
 * This program runs infinitely until manually halted by the user.
 *
 *              MSP432P401
 *             ------------------
 *         /|\|                  |
 *          | |                  |
 *          --|RST         P1.0  |---> P1.0 LED
 *            |      PJ.3 HFXTIN |---------
 *            |                  |         |
 *            |                  |     < 48Mhz xTal >
 *            |                  |         |
 *            |     PJ.2 HFXTOUT |---------
 *
 ******************************************************************************/
/* DriverLib Includes */
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>

/* Standard Includes */
#include <stdint.h>
#include <stdbool.h>

int period = 120; // Period of PWM
float Duty = 0.38f;


int main(void)
{
    /* Halting the Watchdog */
    MAP_WDT_A_holdTimer();
    
    //![Simple CS Config]
    /* Configuring pins for peripheral/crystal usage*/
    MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ,
            GPIO_PIN3 | GPIO_PIN2, GPIO_PRIMARY_MODULE_FUNCTION);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN2);

    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN2);

    // initialize P2.6 and make them clock outputs
    P2->DIR  |= 0b10000000;  // Set P2.7 as an Output pin
    P2->SEL0 |= 0b10000000; // Set P2.7 as Primary function Timer_A0 CCR4 Output
    P2->DIR  |= 0b01000000;  // Set P2.6 as an Output pin
    P2->SEL0 |= 0b01000000; // Set P2.6 as Primary function Timer_A0 CCR3 Output


    // let's set the clock frequency in the code.

    CS_setExternalClockSourceFrequency(32000,48000000);
    /* Starting HFXT in non-bypass mode without a timeout. Before we start
     * we have to change VCORE to 1 to support the 48MHz frequency */
    MAP_PCM_setCoreVoltageLevel(PCM_VCORE1);
    MAP_FlashCtl_setWaitState(FLASH_BANK0, 1);
    MAP_FlashCtl_setWaitState(FLASH_BANK1, 1);
    CS_startHFXT(false);

    /* Initializing MCLK, HSMCLK to HFXT (effectively 48MHz) SMCLK = 1/2 HSMCLK */
    MAP_CS_initClockSignal(CS_MCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_HSMCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_SMCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_2);
    //![Simple CS Config]

    /* Configuring SysTick to trigger at 12000000 (MCLK is 48MHz so this will
         * make it toggle every 0.25s) */
        MAP_SysTick_enableModule();
        MAP_SysTick_setPeriod(12000000);
        MAP_Interrupt_enableSleepOnIsrExit();
        MAP_SysTick_enableInterrupt();

         /* Enabling MASTER interrupts */
        MAP_Interrupt_enableMaster();