I'm trying to run some code in Code Composer Studio but this error keeps popping up for me when I debug and try to move through my code to run it. It's happened with other projects I've run but not all, which confuses me even more as to how it keeps popping up. It additionally opens up a bunch of other things
Can't find a source file at "C:\Users\ghost\workspace_v12\Lab Exam 1\Debug/../main.c" Locate the file or edit the source lookup path to include its location
My main.c is still within my project folder and I'm not sure what else I can look at. The code itself isn't the problem, since I've run it on another person's laptop to no problem. The board I am using to code with is a MSP432P4111. The error happens around the Stop Watchdog comment. I had to change the stop watchdog command since it was triggering the error. Any ideas or helps would be greatly appreciated
#include <ti/devices/msp432p4xx/driverlib/driverlib.h>
/* Standard Includes */
#include <stdint.h>
#include <stdbool.h>
uint8_t colorcode;
const eUSCI_UART_ConfigV1 uartConfig=
{
EUSCI_A_UART_CLOCKSOURCE_SMCLK,
78,//BRDIV
2, //UCxBRF
0,//UCxBRS
EUSCI_A_UART_NO_PARITY,
EUSCI_A_UART_LSB_FIRST,
EUSCI_A_UART_ONE_STOP_BIT,
EUSCI_A_UART_MODE,
EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION
};
//Interrupt handler receives and echoes character typed in serial terminal
void EUSCIA0_IRQHandler(void)
{
uint32_t status=UART_getEnabledInterruptStatus(EUSCI_A0_BASE);
UART_clearInterruptFlag(EUSCI_A0_BASE,status);
if (status & EUSCI_A_UART_RECEIVE_INTERRUPT_FLAG)
{
colorcode=UART_receiveData(EUSCI_A0_BASE);
UART_transmitData(EUSCI_A0_BASE, colorcode);
}
}
void halfsecdelay()
{
uint32_t i;
for (i=0;i<100000;i++);
return;
}
int main(void)
{
/* Stop Watchdog */
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD;
// P1.2 and P1.3 are UART TXD and RXD. These pins must be put in special function mode
GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1,GPIO_PIN2|GPIO_PIN3,GPIO_PRIMARY_MODULE_FUNCTION);
//Sets DCO frequency at 12 MHz to get correct baud rate of 9600
CS_setDCOCenteredFrequency(CS_DCO_FREQUENCY_12);
MAP_UART_initModule(EUSCI_A0_BASE, &uartConfig);
MAP_UART_enableModule(EUSCI_A0_BASE);
UART_enableInterrupt(EUSCI_A0_BASE,EUSCI_A_UART_RECEIVE_INTERRUPT);
Interrupt_enableInterrupt(INT_EUSCIA0);
Interrupt_enableMaster();
GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN1); /*Green*/
GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN2); /*Blue*/
GPIO_setAsOutputPin(GPIO_PORT_P2, GPIO_PIN0); /*Refd*/
/* Write in GPIO setup*/
while(1)
{
if(colorcode=='R'){
GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN0);
GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN1 | GPIO_PIN2);}
else if(colorcode=='G'){
GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN1);
GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN0 | GPIO_PIN2);}
else if(colorcode=='B'){
GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN2);
GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN0 | GPIO_PIN1);}
else if(colorcode=='r'){
GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN1 | GPIO_PIN2);
GPIO_toggleOutputOnPin (GPIO_PORT_P2, GPIO_PIN0);
int i;
for (i = 100000; i > 0; i --);}
else if(colorcode=='g'){
GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN0 | GPIO_PIN2);
GPIO_toggleOutputOnPin (GPIO_PORT_P2, GPIO_PIN1);
int i;
for (i = 100000; i > 0; i --);}
else if(colorcode=='b'){
GPIO_setOutputLowOnPin(GPIO_PORT_P2, GPIO_PIN1 | GPIO_PIN0);
GPIO_toggleOutputOnPin (GPIO_PORT_P2, GPIO_PIN2);
int i;
for (i = 100000; i > 0; i --);}
else{
GPIO_setOutputHighOnPin(GPIO_PORT_P2, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2);}
}
}
I checked my project folder but it was still there, so it's not a main folder error. I tried moving the code to a different project and to a different project folder but the error still persisted. I'm a bit lost on what else to try