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/15/11 12:19
Read: 517 times
Beaverton Or
USA


 
#184754 - Look at code in Debugger. It will tell all.
Responding to: Lukas Valecky's previous message
Lukas Valecky said:
So all local variables in main() function are also placed in the stack? But how is it possible to create 1500B local varible in 256B RAM? Does Keil place it into the XRAM or RAM and doesn't care about its overflow? In the datasheet of AT89C51ED2 it is written that the stack may not be located in the XRAM... so how does it work? Thank you very much for your answer and your advice again... ;)


The Keil tools basically convert the variables of main() into global variables much the same as you would do manually except that they try to retain the variable scoping as per the way the C code is written as to which modules can see which variables.

The variables DO NOT go on the stack at all. The stack is used pretty much only for call/return addresses, interrupt/return addresses and pushed/popped values for context save/restore.

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