Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Michael Karas
11/10/11 06:40
Read: 545 times
Beaverton Or
USA


 
#184610 - Global Variable Initiaization
Responding to: Lukas Valecky's previous message
In the past I have experienced similar problems. This has led me to generally always write specific code lines, in my initialization procedures, to set the values of volatile storage (RAM based) global variables that need to have a set value.

My general practice is to only depend on initializers that set values for data elements that are explicitly declared in the "code" region. This type of initializer is handled at build time by the compiler and linker whilst the code image is being built.

On the other hand any RAM based global variables that have initializers require work by the compiler and linker to properly build an initialize a table in the code space that then gets copied out to the data or xdata areas by the startup code.

Michael Karas


List of 39 messages in thread
TopicAuthorDate
Keil problem...      Lukas Valecky      11/10/11 03:53      
   Kel support      Per Westermark      11/10/11 05:41      
      Keil support      Erik Malund      11/10/11 06:49      
         Reward for finding bug      Bert Van Den Berg      11/10/11 10:27      
            been tried      Erik Malund      11/10/11 10:51      
               public bug tracker      Maarten Brock      11/11/11 01:09      
                  It's not a KEIL-specific problem ...      Richard Erlacher      11/21/11 11:18      
                     not really      Maarten Brock      11/22/11 03:56      
                        It's those "snapshots" that I meant      Richard Erlacher      11/22/11 07:49      
                           Not true        Per Westermark      11/22/11 08:05      
                              Remember, where you sit determines what you see      Richard Erlacher      11/22/11 22:18      
                                 Concept      Per Westermark      11/23/11 02:11      
                                 I do not ...      Erik Malund      11/23/11 07:04      
                                    Comfort contra mobile phone      Per Westermark      11/23/11 08:30      
                                       Where you sit determines what you see ...      Richard Erlacher      11/24/11 00:58      
                                          You are still assuming you know what other people think/do        Per Westermark      11/24/11 02:49      
                                             You've overlooked the most basic fact ...      Richard Erlacher      11/24/11 16:31      
                                                Unuseful toy?      Per Westermark      11/24/11 17:18      
                                                   Once again, you've missed the point ...      Richard Erlacher      11/26/11 08:46      
                                                      Look for progress, instead of just looking back at history      Per Westermark      11/26/11 10:36      
                                                         are you that lucky?      Erik Malund      11/26/11 10:46      
                                                            Yes      Per Westermark      11/26/11 11:17      
                                                         Consider my position      Richard Erlacher      11/27/11 00:26      
      keil update      Lukas Valecky      11/10/11 07:47      
         auto variables      Per Westermark      11/10/11 08:24      
   Global Variable Initiaization      Michael Karas      11/10/11 06:40      
   just curious      Erik Malund      11/10/11 07:53      
      Always good to hide black-box data in structs      Per Westermark      11/10/11 08:19      
      Initialising array inside struct      Oliver Sedlacek      11/11/11 01:48      
         not necessarily      Jan Waclawek      11/11/11 02:10      
      Library      Lukas Valecky      11/11/11 05:00      
   New facts...      Lukas Valecky      11/11/11 06:35      
      At the very least use static for one-time initialized locals      Per Westermark      11/11/11 06:49      
         it works! thanks...      Lukas Valecky      11/15/11 11:36      
            Look at code in Debugger. It will tell all.      Michael Karas      11/15/11 12:19      
               It's called "Overlaying"      Andy Neil      11/15/11 15:00      
                  Optimization      Per Westermark      11/15/11 15:34      
      are you sure ...      Erik Malund      11/11/11 06:51      
   Thanks...      Lukas Valecky      11/21/11 10:55      

Back to Subject List