Hello shaul dorf:
That is more a C programming question than a question related to KDS or KSDK. If a global variable is to be seen by several source files, you have to define it in one of your .c source files and declare it as extern in a header file. Then include such header file from any source file that needs to "see" the global variable.
If I misunderstood your question please let me know.
Regards!
Jorge Gonzalez
Jorge Thanks;
I already did it and it is working. I’m hardware oriented, I
have seen that PE generates many files so I thought that it can be done automatically
based on information in main.c file
But in second thinking it is a nonsense because only the programmers
knows in which file this extern definition has to be placed.
Any way thanks for your help to finally understand it.
Shaul
Hello shaul dorf:
That is more a C programming question than a question related to KDS or KSDK. If a global variable is to be seen by several source files, you have to define it in one of your .c source files and declare it as extern in a header file. Then include such header file from any source file that needs to "see" the global variable.
If I misunderstood your question please let me know.
Regards!
Jorge Gonzalez