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

debugging in keil

Hi,
I used to have all my functions above the main loop of my program earlier.recently i moved all the functions called by my mainloop into a another file and then included it before the main loop.

like this : #include "functions.c"

void main(void)
{...

}
My problem is when i now debug in keil, when i come to a function,the the yellow pointer arrow no longer jumps to the other file to the correct function.the is making debugging difficult cos i cant really follow the program any longer.
So i want to know if this is just something that cant be done, or is there some way to do this, put functions in another file and then still be able to watch the program using the keil debugger..
Thanks
Harsha

Parents
  • You know that C makes use of two different file name extensions *.h and *.c?

    *.h is intended for header files. Header files are intended to be included.
    *.c is intended for source files. Source files are intended to be fed directly to preprocessor/compiler for compilation.

    What do you think happen if you don't have two *.c files in your project, but instead try to include one of the files as if it was a header file? Do you think the debugger can do a good job if you mix what is expected to be included in a header file and what is expected to be compiled into a separate object file?

Reply
  • You know that C makes use of two different file name extensions *.h and *.c?

    *.h is intended for header files. Header files are intended to be included.
    *.c is intended for source files. Source files are intended to be fed directly to preprocessor/compiler for compilation.

    What do you think happen if you don't have two *.c files in your project, but instead try to include one of the files as if it was a header file? Do you think the debugger can do a good job if you mix what is expected to be included in a header file and what is expected to be compiled into a separate object file?

Children
No data