Hi all,
I am using the PK51 compiler and I'm having a strange issue, when I create a main.c file with my main function in here and all other functions in this file I can single step all of my code into the different functions etc. But If I put some of these functions into an external .c file and include this from my main.c file I can no longer single step my code in debug, for example I cannot set breakpoints in my other.c file.
Does anyone know how to solve this issue?
Eoin
C wouldn't have the distinction between header files (*.h) and "normal" c source files (*.c) if it was intended that you should include *.c files.
Have you seen many C textbooks recommending #include of *.c files?
Have you tought about why the IDE supports adding of multiple *.c files to the project, if #include would be the preferred way?
Actually, 'C' itself (the programming language) does not have that distinction - but it is an almost universally adopted convention!
This has nothing specifically to do with Keil.
Thanks for your replies, I know I guess I overlooked the correct way to include files into my project because I am spoiled by MPLAB from microchip takes care of all of this automatically. Let me try it tonight.
How so?
uVision also "takes care of all of this automatically" - you just add your 'C' files to the project.
Simples!
"am spoiled by MPLAB from microchip takes care of all of this automatically."
some versions of the MPLAb will also code for you automatically. all you need to do is to sit back, relax and let MPLAB do its magic.
can you keil do that?
I doubt it.
:)
Does this count: http://www.keil.com/support/man/docs/uv4/uv4_ut_configwizard.htm ?
I'm not aware of any other "code generation" features in Keil itself, but there are 3rd-party ones...