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 have a doubt regarding the simulator/debugger tool. In the window displaying the code, one can see that the left-most column would be highlighted green once the line of code is executed. My doubt is, if the code of a particular function is for example the following : void example(char abc){ //Line 1 /*some code*/ } is Line 1 suppose to be executed ? (Will the left column of that particular line be highlighted green?) Interestingly, my observation is that some of the functions in my program has it's first line highlighted while some don't when I execute my program. I am also experiencing weird behavoir when the first line of the function is not executed (ie highlighted green). Using the above example, I call the function .... example(1); .... and pass in a value of 1 as the parameter abc. However, when my program runs to the function code itself, the value of char abc is not 1 eventhough the value passed in is clearly a 1. I might be missing out something. Could anyone possibly provide some reasons for this unexplained behavior. Thank you.
Note that some of the higher optimisations in the latest Keil version are performed by the Linker; ie, the Linker modifies the code after it is generated by the compiler. Which virtually makes debugging impossible. If you, like me, follow the NASA paradigm "fly what you debug" you simply can not use these optimizations. Erik PS, I am not 'bashing' the existence of the above, just giving an opinion.
Note that some of the higher optimisations in the latest Keil version are performed by the Linker; ie, the Linker modifies the code after it is generated by the compiler. Interesting dilemma. I'm with Erik, if the compiler listing does not match the executing code how will someone (probably me) find those pesky little undesirable features that seem to arise ... after release ... in large projects. Unless I am really strapped for space, I only let the compiler optimize and skip the LX linker.
if the compiler listing does not match the executing code how will someone (probably me) find those pesky little undesirable features that seem to arise Congratulations, you've just re-discovered the reason why LX51, which does those kinds of optimization, comes with its own listing option ("linker code listing" on the listings page of uV2).