Please a little help. I have a uVision Demo. I am trying to display a message using the printf function. I wrote my aplication then made a copy of the putchar.c file that comes with the application. I put such a a copy in my project folder and a modified it. I just wrote this: void Dispcharac (unsigned char u); then I added to my project finally, I defined this subroutine in my main source to go to write data on the display. this is my subroutine: void Dispcharac (unsigned char u) { writedata(u,1); } writedata(u,1) subroutine writes the data in the port. I wonder what's wrong? Is there anyone on Earth that can help me? Thanks for any help Omar
The problem of what I mentioned with my printf and putchar functions is that the compiler does not compile the file. It says that the writedata subroutine is not used. In other words, it does not reach the code placed in writedata subroutine. Thanks
"...the compiler does not compile the file. It says that the writedata subroutine is not used." I think you mean the Linker does not link the file? The Compiler would not be able to tell that the function is not called - because it might get called from a different file, as far as the compiler can tell. So, do you ever call your writedata subroutine? If you don't, then the Linker is correct!