David Hirsch

global data

Discussion created by David Hirsch on May 14, 2011
Latest reply on May 16, 2011 by Daniel Lundin

I am using the MC9S12Xeq512 processor as a new user. I had a problem when a c file had a global variable of type struct is declared. The program built ok using Cosmic but the app did not run. I changed the global to static const and all was well. The funny thing is that the global was only used by functions inside the file. Any ideas for this behavior. With this paged memory, are there rules of thumb for treating global and file scope variables?