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.
Aarti at TI, started debugging again. I believe I've worked it out now. Hover over works for registers, variables on the stack and global variables, however, it does not work for static globals. See example below. This is verified using Code Composer version 4.1.3. Can you suggest a workaround or a fix?
"Hover over" meaning put the cursor over the variable and the value is displayed.
unsigned char state; //hover over and display value works
void QueueReads(void)
{
static int DlqTimer2 = 0; //hover over and display value does not work
register unsigned int RegStart, RegEnd; //hover over and display value works
register int i; //hover over and display value works
switch (state)
{
...
}
}
PeterO,
CCS applies the same scoping rules as C/C++ itself. This means that a symbol can only be looked-up while it is in scope. For a function static, the PC must be within the function for the symbol to be visible.
For file statics, you can use a syntax in the expressions view like: '<file name>'::<static var name> (e.g. 'main.c'::state), but there is no way to look up a function static while out of scope.
I should have addressed your point in my post because that is an obvious reason as to why it is not working.
Keeping in mind hover over only works when a stack or register variable is in scope, or static global is in scope, the hover over is not working for static globals. Static globals come into scope and go out of scope in the watch window correctly, however, when they are in scope the hover over should work. I'm finding it does not.
My application is probably larger than most using 110k of flash - on a MSP430F5438. That 'may' be a contributing factor.
In your example above, are you saying that if you put DlqTimer2 into the expressions view, and then set the PC to a be within function QueueReads(), the expressions view will show DlqTimer2 correctly but hover over will not?
Realised I've made a mistake in what I've said. Referring to the wrong window in Code Composer - saying Watch window when I meant to say Local Window.
I'm saying that with the program counter within the function QueueReads(), static DlqTimer2 can be viewed in the Local window but the hover over is not working. Local window being, in the menu Windows/Show View/Local.
Sounds minor, as you can just look in the local window. When the local window is full, eg debugging a large state machine, with many register variables and multiple static structures expanded open in the Local window you have to do lots of scrolling up and down to see the values. Hover over working would make life easier.
Thanks for reporting this. I can see the problem now.
The good news is that it is already fixed in the 4.2.0 CCS release. The final 4.2.0 full release will be available for download from here within a few days. The update to 4.2.0 will be posted shortly after the full install. If you have enough space, you can install the full release in a separate folder and give it a try.
Andy, in version 4.2.1 this feature is not working. Can you looking into this please?
In the attached screen, State1mSec and StateMain are shown in the local window. The values were displayed as "." (a full stop). Highlighting these values in the local window, select Format / Decimal shows the values. Place the cursor over the value displays it as "uchar State1mSec =."
FYI in firefox, I right click on the screen and select ViewImage for a bigger view.