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.

EK-TM4C123GXL: 'Identifier not found' in CCS Expressions window

Part Number: EK-TM4C123GXL

Hello,

I am walking through the TM4C123G Launchpad Workshop Workbook, currently working on lab 2. After adding a watch expression for ui8LED just like the book says, I keep getting an error saying 'identifier not found' under the 'value' column. I tried the same thing with a 'test' variable with no luck. Optimization is turned off, and debug model is full symbolic debug -g. How do I fix this?

Here is my code:

#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
int main(void)
{
	uint8_t ui8LED = 2;
	int test;
	SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
	SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
	GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);
	while(1)
	{
		// Turn on the LED
		GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, ui8LED);
		// Delay for a bit
		SysCtlDelay(2000000);
		// Cycle through Red, Green and Blue LEDs
		if (ui8LED == 8) {ui8LED = 2;} else {ui8LED = ui8LED*2;}
		test++;
	}
}

expression pane

  • Hi,

      ui8LED is a local variable inside the main(). You should open Variables window to see it. Expression window can view global variables. You can declare ui8LED outside of main() as a global and you will see it Expression window.