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

can't watch local variable

When I debug \Keil\ARM\RV30\RTL\Kernel\Examples\Measure\Measure.uv3,I want watch "cmdbuf[]" in Watch & Call Stack Window,when I use SARM.dll V1.5,watch data was right,but when I use SARM.dll V3.x,watch data was wrong.

Parents
  • Static works, thanks..

    But there are other problems.
    I made this function:

    void Main_make_sprintf_work(char * str)
    {
      static char str_local[40];
      sprintf(str_local, "%f" ,2.45);
      memcpy(str, str_local, 10);
    }
    


    It works when I call it from main() but don't work if the call come from a function further inside the program.

Reply
  • Static works, thanks..

    But there are other problems.
    I made this function:

    void Main_make_sprintf_work(char * str)
    {
      static char str_local[40];
      sprintf(str_local, "%f" ,2.45);
      memcpy(str, str_local, 10);
    }
    


    It works when I call it from main() but don't work if the call come from a function further inside the program.

Children