I recently just migrated from a rtsc project to a css project that links against the ti-rtos-config project. I used the same cfg file inside the ti-rtos-config project as I was using before but now when I run my code I get the above error. My code starts up, enables the board, and then tries to read a file. It crashes inside of sl_FsOpen.
The full error that I am getting is:
ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1172: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: 07f3c068
Exception occurred in background thread at PC = 0x2000dd36.
Core 0: Exception occurred in ThreadType_Task.
Task name: {unknown-instance-name}, handle: 0x20020b50.
Task stack base: 0x20020ba0.
Task stack size: 0x800.
R0 = 0x00008d29 R8 = 0x20017a70
R1 = 0x07f3c068 R9 = 0x00000000
R2 = 0x00000000 R10 = 0xffffffff
R3 = 0x00000
Can anyone point me in the direction on how to solve this? It looks like the exception is coming from the ti code and I dont have a way to debug it given I dont have the source files.
My code looks like:
void main(void) { boardInit(); rtcModuleInit(); i2cInit(); dbgInit(); osi_TaskCreate(applicationMain, "Application Main", DEFAULT_APP_STACK_SIZE, NULL, APPLICATION_TASK_PRIORITY, NULL); osi_start(); // Start the scheduler } static void applicationMain(void *param) { long handle; long retVal = -1; dbgDirect("About to open file"); retVal = sl_FsOpen((unsigned char *)USER_FILE_NAME, FS_MODE_OPEN_READ, NULL, &handle); <- Crashes here dbgDirect("Opened the file"); ... void boardInit(void) { MAP_IntMasterEnable(); MAP_IntEnable(FAULT_SYSTICK); // The following is need to fix a silicon problem Pin17 hibernate detect // HWREG(0x4402FC14) &= ~0x100; HWREG(0x4402FC14) |= 0x2; PRCMCC3200MCUInit(); // Enable Peripheral Clocks MAP_PRCMPeripheralClkEnable(PRCM_GPIOA0, PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralClkEnable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralClkEnable(PRCM_GPIOA2, PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralClkEnable(PRCM_GPIOA3, PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralClkEnable(PRCM_UARTA1, PRCM_RUN_MODE_CLK); MAP_PRCMPeripheralClkEnable(PRCM_TIMERA0, PRCM_SLP_MODE_CLK); // Configure I/O MAP_PinTypeUART(PIN_55, PIN_MODE_3); //UART0_TX MAP_PinTypeUART(PIN_57, PIN_MODE_3); //UART0_RX MAP_PinTypeUART(PIN_58, PIN_MODE_6); //UART1_TX MAP_PinTypeUART(PIN_59, PIN_MODE_6); //UART1_RX MAP_PinTypeGPIO(PIN_01, PIN_MODE_0, false); MAP_GPIODirModeSet(GPIOA1_BASE, GPIO_PIN_2, GPIO_DIR_MODE_OUT); MAP_PinTypeGPIO(PIN_02, PIN_MODE_0, false); MAP_GPIODirModeSet(GPIOA1_BASE, GPIO_PIN_3, GPIO_DIR_MODE_OUT); // RED LED MAP_PinTypeGPIO(PIN_64, PIN_MODE_0, false); MAP_GPIODirModeSet(GPIOA1_BASE, GPIO_PIN_1, GPIO_DIR_MODE_OUT); // "ON" button MAP_PinTypeGPIO(PIN_04, PIN_MODE_0, true); MAP_GPIODirModeSet(GPIOA1_BASE, GPIO_PIN_5, GPIO_DIR_MODE_IN); MAP_GPIOPinWrite(GPIOA1_BASE, GPIO_PIN_0, 0); MAP_GPIOPinWrite(GPIOA1_BASE, GPIO_PIN_1, 0); MAP_GPIOPinWrite(GPIOA1_BASE, GPIO_PIN_2, 0); UtilsDelay(500); MAP_GPIOPinWrite(GPIOA1_BASE, GPIO_PIN_0, GPIO_PIN_0); MAP_GPIOPinWrite(GPIOA1_BASE, GPIO_PIN_1, GPIO_PIN_1); MAP_GPIOPinWrite(GPIOA1_BASE, GPIO_PIN_2, GPIO_PIN_2); }
I took the code almost directly from the file_operations example. Everything matches up.
I have stepped through the code with the debugger and have watched it crash right as it tries to open the file. How can I figure out what is going wrong?