We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I did a couple of searches and found some references to the problems I am having. But I don't think this is fully addressed, so I'll ask here.
I am using the contest eval board from Luminary Micro that includes an eval copy of the Keil tools for the Cortex-M3. I have seen variables in the local watch window display the wrong value as I step through a program. There are a couple of threads here from last summer about this, so I guess this is a known (and fixed) problem. I am surprised they circulated an old version of the tools for this contest. I just got my board in early December.
The other problem is that in one case, I was not able to view a variable in a watch window. It was a local variable and did not show in the Locals window. I also could not add it to the other Watch windows. This variable was being used, so it should not have been optimized away. I was compiling at optimization level 0, so that should not be the problem. Is this a known problem? Is it fixed in a current version of the tools?
Yes, I have only been using optimize level 0 so far. But as I near completion, my project is growing and may exceed the 16 kB limit for the contest tools. I may then have to start using higher levels of optimization.
I am *not* using the newest version of the tools. I am using the version that was shipped with the Luminary Micro contest eval board. There is an update available which I have not had the chance to install yet. Even this version may not be the same as is currently being shipped by Keil.
Also, I would like to point out that I am having two different problems. One may have to do with variables being "optimized" out. The other has to do with the variable display in the Local watch window showing wrong data because the register assignment has changed. Is this a known bug? All problems are exhibited at optimize level 0.
Rick,
I had the same problem too, the one where the data displayed in the 'locals' watch window had no bearing at all on what the real value of the variable was. I seem to recall that when I reported this to KEIL in the form of a bug report the answer I got back was something like "it's harder to keep all these variables and the values for them right than you might think, plus, our optimizer optimizes too well even at it's lowest possible setting, we're working on it." I tried all sorts of things, but I never could get this problem satisfactorily resolved. I gave up on the debugger and went back to using printf and a dumb terminal connected to a serial port to debug. Quite primitive, but at least it worked.