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

Viewing struct data during debug

Hi,

I am a new user of Keil C compiler.
During debug, I am trying to watch struct data members. But all of them show 0x0000. And they are not updated. With other variables it's just working fine.

Any suggestions?

Thanks,
Titu

Parents
  • Let's get the terminology correct here:

    "don't use the word static when defining the item in your c-file but declare it as external in the header file belonging to that c file."

    In other words:

    The definition needs to be in exactly one .c file - without the 'static' keyword;

    The 'extern' declaration should be in the header file.


    You've put it in an more correct context, Andy, which is absolutely OK.
    But you understood what I was trying to explain, and that's the most important for me! ;-)

    -- Geert

Reply
  • Let's get the terminology correct here:

    "don't use the word static when defining the item in your c-file but declare it as external in the header file belonging to that c file."

    In other words:

    The definition needs to be in exactly one .c file - without the 'static' keyword;

    The 'extern' declaration should be in the header file.


    You've put it in an more correct context, Andy, which is absolutely OK.
    But you understood what I was trying to explain, and that's the most important for me! ;-)

    -- Geert

Children
No data