In the IDE Ride7. In debug mode, when we stop execution and see register. It is possible to see values of our C-varibles. [ For exemple, int main(){ int i=0; i++; } I want to see in an array after execution: Variable Value i 1 ] How do that ? Thanks, JC.
Actually, it wasn't. It is, of course, as you say about optimisation of trivial code like this - and that it is a common trap for newbies. However, I seem to remember that RIDE had issues beyond this with displaying automatic variables... But it was over a year ago now - so it might've been fixed, and/or I could be mistaken...
Ride allows to display the variables values using the 'watch' mechanism. See the Ride documentation (GettingStartedARM) for more information on how to display this view and add variables to it. Please also make sure that you have installed the latest version of the Ride and ARM kits, from the Raisonance website. However, your example is so simple that the compiler will detect that variable i is written but never read. So the whole code referring to i will be optimized out and the variable will probably not exist at all, as the C standard allows. Therefore, you will not be able to watch this variable. This is what st7 was referring to as 'issues', but in fact it's just that people are not used to compilers being able to optimize this kind of code. So if you want to watch the i variable in such a simple code, you'll have to declare it as global and volatile. You will find more information on this here: http://raisonance-forum.xsalto.com/viewtopic.php?id=2694 Best Regards, Vincent [ This message was edited by: VincentC on 21-07-2009 14:13 ]
I would say if existed a windows in the IDE where we can see the values of our varibles.
In my exemple, at the end of execution, i = 1, and i want to check if the good value is save in my variable. My last experience was on AVR studio 4 with PIC16F and this kind of windows was very useful. JC.
Yes, this has improved a lot in the past few months, so if your last experience was one year ago, then I'm not surprised that you saw some problems. The current version is still not perfect, but it is much better. Best Regards, Vincent [ This message was edited by: VincentC on 21-07-2009 17:02 ]