Other Parts Discussed in Thread: LM3S8962
Hello-
I'm trying to debug a program on a LM3S8962 evaluation kit using CCS 4.1.2.00027 (the "Platinum" version) on Windows XP Professional. When I enter debug mode and step through my program, several of my local variables do not appear in the "Local (1)" view. When I enter the variable names into the "Watch (1)" view, the debugger displays the error "identifier not found". The non-displayed variables are the same type, and declared at the same time as, others that do show up in the Local and Watch views.
I have tried (in order):
- Making sure that compiler optimization is set to "0" in Build Properties... --> Tool Settings --> TMS470 Compiler --> Basic Options (per this thread)
- Making sure that the Debugging Model is set to "full symbolic debug" in the same settings area (per this thread)
- Locating a "$<number>" in the Window->Show View->Other->Debug->Modules view (per previous thread) with no findings
- Deleting the debug "launch" and the CCS target cache files (per "CCS Troubleshooting")
- Performing a full reinstall of CCS
- Installed updates ("TMS470 Code Generation Tools 4.6.3") and rebuilt project
None of these approaches enabled the inspection of the variables in the debugger's Local or Watch views. The same variables are invisible each time; they include an 'unsigned long', a simple 'char' and an 's8_t' that is typedef'd by lwIP as 'err_t'. The variable names do not intersect with any reserved keywords, and the program compiles and links without warnings or errors. Here is a code snippet showing the declaration and assignment of the variables:
int main(void) {
unsigned long ulUser0, ulUser1; // Shown OK
unsigned char pucMACArray[8]; // Shown OK
unsigned long dummyvariable; // Not shown
char somevariable = 'B'; // Not shown
dummyvariable = 12345; // Still not shown
// Set the system clock
SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);
While several other threads seem to discuss this issue, and in some cases bug reports are filed, I do not see any definitive resolution for the problem, or any follow-up on the disposition of the bug reports. Can someone indicate whether this issue has been resolved, a workaround identified, or an alternative approach determined?
Many Thanks,
David R.
Update 2010-07-23: After several days of experimentation, I found that the CCS4 debugger only displays those variables that are read at some point in the program. If a variable is declared, defined and subsequently only assigned, it generates a compiler warning and does not display in the debugger. If you use it in conditional statements, the compiler issues no warnings, but the variable is still not visible in the debugger. If, however, you assign the same variable's value to another variable, it will appear in the debugger. This definitely appears to be an issue with the compiler, possibly not putting certain debug symbols into the object file?