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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/07/08 12:12
Read: times


 
#156465 - I did not do anything with the stack
Responding to: ???'s previous message
I've seen a lot of threads where mostly people have done it in asm. I guess don't completely understand how array data is held. I thought that is was like a "container" to hold specific information where that information is set at startup, and remains constant in RAM until it is modified by the code.

Usually after all these months I'd expect to see something about stack handling in C but have not, or simply dismissed it since it hasn't been any problem til now. I don't even recall it in my printed text about stack handling in the array section.

What should I be doing to correct this?

The EEPROM routine which I've been using has been running since day one and was created by code architect. I've been trying to remove the dependance on the EEPROM to speed up operations. Arrays seemed like the proper way to do this. I don't see any SFR's as it is all C based and if it uses SFR's to accomplish the task (most likely does), how would I correct that?

I don't have a direction, I thought C would handle stack operations based on the array names (which I need to be global since some functions in different areas need to update certain array elements).

I'm at a loss on how to fix this or if there is a way to set the stack locations for the arrays........in C. Is there any online source that could show me an example, or someone just tell me what I need to fix?

Thanks again
Chris



List of 25 messages in thread
TopicAuthorDate
Data Array getting corrupted after init            01/01/70 00:00      
   OnePossibleIdea....            01/01/70 00:00      
      I did not do anything with the stack            01/01/70 00:00      
         As Michael said....            01/01/70 00:00      
         How do you test and debug code?            01/01/70 00:00      
            Keil is the only thing in place            01/01/70 00:00      
               'crap'??            01/01/70 00:00      
                  Is this the book you refer?            01/01/70 00:00      
                     nope            01/01/70 00:00      
                        Erik            01/01/70 00:00      
                           So where is the code            01/01/70 00:00      
                           do NOT "put them"            01/01/70 00:00      
                              Focus            01/01/70 00:00      
                                 Simulator            01/01/70 00:00      
               So this is on a simulator?            01/01/70 00:00      
                  Post your duff code            01/01/70 00:00      
               Finding Cause of Corruption            01/01/70 00:00      
                  Get the C right, then look at the target CPU            01/01/70 00:00      
                  Optimizing Compilers            01/01/70 00:00      
                     In my experience.....            01/01/70 00:00      
                        Keil C 51 Optimizations            01/01/70 00:00      
                           Use IAR then            01/01/70 00:00      
                              different approaches            01/01/70 00:00      
                           sometimes, depends            01/01/70 00:00      
                              Thanks            01/01/70 00:00      

Back to Subject List