Other Parts Discussed in Thread: TM4C1294NCPDT
Tool/software: Code Composer Studio
Hi all,
I've tried to create a new project for CCS and I have configured the include options in ARM compiler, as well as the File Search Path in ARM Linker (As shown in the first two figures below).
However, when I try to compile the main.c I get the following error: unresolved symbol ROM_TimerIntClear, first referenced in ./main.obj TaskA C/C++ Problem
One point to clarifies, when I click cmd+click on the ROM_TimerIntClear function in the timers example that is provided in the resource explorer, it opens the driverlib/rom.h file. But when I click on it locally, it doesn't, open even though the driverlib/rom.h is included and the file opens when I click cmd+click locally and on resource explored. Also, I've tried to copy and paste the timers example, but it doesn't work since all the functions used prefixed with ROM_ and for some reason the timer won't work without ROM_
See the following structure of my project and the source code:
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/timer.h"
#include "driverlib/uart.h"
#include "utils/uartstdio.h"
#include "grlib/grlib.h"
#include "drivers/Kentec320x240x16_ssd2119_spi.h"
#include "drivers/touch.h"
#include "drivers/pinout.h"
uint32_t g_ui32SysClock;
uint32_t g_ui32Flags;
tContext sContext;
void configureIO(void) {
PinoutSet(false, true);
}
void ConfigureGUI(void) {
FPUEnable();
FPULazyStackingEnable();
Kentec320x240x16_SSD2119Init(g_ui32SysClock);
GrContextInit(&sContext, &g_sKentec320x240x16_SSD2119);
GrContextForegroundSet(&sContext, ClrWhite);
GrContextFontSet(&sContext, &g_sFontCm20);
GrStringDrawCentered(&sContext, "GUI", -1, GrContextDpyWidthGet(&sContext) / 2, 8, 0);
}
void Timer0IntHandler(void) {
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
HWREGBITW(&g_ui32Flags, 1) ^= 1;
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, g_ui32Flags);
IntMasterDisable();
GrStringDraw(&sContext, (HWREGBITW(&g_ui32Flags, 0) ? "1" : "0"), -1,195, 108, 1);
IntMasterEnable();
}
void ConfigureTimers(void) {
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
// Enable processor interrupts.
IntMasterEnable();
// Setup the interrupts for the timer timeouts.
TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
TimerLoadSet(TIMER0_BASE, TIMER_A, g_ui32SysClock);
// Setup the interrupts for the timer timeouts.
IntEnable(INT_TIMER0A);
TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
// Enable the timers.
TimerEnable(TIMER0_BASE, TIMER_A);
}
void ConfigureUART(void) {
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
// Enable UART0.
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
// Configure GPIO Pins for UART mode.
GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
// Initialize the UART for console I/O.
UARTStdioConfig(0, 115200, g_ui32SysClock);
}
int main(void) {
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
configureIO();
ConfigureUART();
UARTprintf("\033[2Jexample\n");
ConfigureGUI();
ConfigureTimers();
while (1) {};
}



