This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Local Variables Out of scope in watch Window

I am using Keil Micro Vision4 for ARM 9 Processor .the Local variables appears "Out of scope"
How do i monitor the local variables

Parents
  • try to use this optimization level

    -Og
    Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience.

    am also lately facing a similar problem, but am quite concerned with the execution time of the code, as my codes should work on real time systems. so i have to use my variables as locals and even reuse the local variables. the thing is i want to trace those variables.(the most important signals i use as global anyway) but sometime i want to watch all the signals. during code execution.

    1- i tried to make copy section at the end of the code to a global array to copy the local variables but its not the best idea because the text section is huge then and the execution is not the best plus the compiler declare the local variables as static.

    2- i tried to insert 5 NOPS after each local variable change to mark this area and to write a call instruction and then movsd instruction from local variable to xmm7 at run time, to watch that local variable. but the problem is that i can watch only 1 variable at a time and a huge problem to add label for each variable (i have at least 3 to 5 thousand signal)

    if anyone can help me with any other idea????

Reply
  • try to use this optimization level

    -Og
    Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience.

    am also lately facing a similar problem, but am quite concerned with the execution time of the code, as my codes should work on real time systems. so i have to use my variables as locals and even reuse the local variables. the thing is i want to trace those variables.(the most important signals i use as global anyway) but sometime i want to watch all the signals. during code execution.

    1- i tried to make copy section at the end of the code to a global array to copy the local variables but its not the best idea because the text section is huge then and the execution is not the best plus the compiler declare the local variables as static.

    2- i tried to insert 5 NOPS after each local variable change to mark this area and to write a call instruction and then movsd instruction from local variable to xmm7 at run time, to watch that local variable. but the problem is that i can watch only 1 variable at a time and a huge problem to add label for each variable (i have at least 3 to 5 thousand signal)

    if anyone can help me with any other idea????

Children
No data