Hi everyone,
I would like to know if something similar happen to you. Well the issue is that when I declare a variable as a global one in the header file of a module with extern sometimes it loses its value. And if I declare it as static I can not access to it from other module. As far As I understand, a static variable is the same during the all of the execution of the program and it has a space of memory reserved to it. Can anyone please clarify this?
Thanks in advance.
Your variable is most likely getting corrupted because your stack is too small and crashing into the statics. Suggest you look at your call tree and local variable usage and get a better idea of your stack depth. The stack is often defined in your startup_arch.s file, and could be just 1KB.
So your bug not Keil's