Hello. I am new to st microcontroller. I have performed a few basic projects and used stvd for debugging. But for quite a few days, I have stuck to a problem.
While coding for a timer related program, I am facing an error : symbol _TIM1_DeInit not defined. Googling didn't help me much. I have included all the necessary files but the problem still persists. Do I have to edit something in any of the files like stm8s_tim1.h?
Kindly help me.
Thank you.
What you are saying may be absolutely right, but the error appears in the included stm8s_tim1.c file which is available in the library files from st microelectronics and not in my code. In fact, there are number of 'missing prototype' errors. That is why, I feel, that something has to be changed in stm8s_tim1.c file.
Thank you.
If you can share your project then probably it will very easy to resolve the issue. If i am interpreting correctly you are including the .c file which is wrong you can only include .h files.
Ok.. The reason for all the errors is pretty straight forward..
stm8s_tim1.c is in your include list... Two things... A) its before the definitions as stm8s_tim1.h comes next!!
And B) C files do not live in the include world... As long as they are listed in your build the parts you use will be included.. So remove this line...
Another thing is that when I compile the main.c file after removing #include "stm8s_tim1.c" line, it doesn't show any error as it did before removing that line. Now, only when I build, the errors appear.
It appears that tim1.c is st standard file. If you have not edited this file then the header file should be in the installation directory. You have to search for this file. In the tim1.c file you can change the header file as <tim1. h> instead of "tim1. h".
It appears that tim1.c is st standard file. If you have not edited this file then the header file should be in the installation directory. You have to search for this file. In the tim1.c file you can change the header file as <tim1. h> instead of "tim1. h".