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

Back to Subject List

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


 
#154948 - The compiler cannot really guess ..
Responding to: ???'s previous message
Since the chip is defined, shouldn't the compiler manage the memory automatically?<p>

It could try, but the programmer knows much, much more about how often a variable is accessed and what penalties (cycles and code size) he or she wants to incur when doing so.

Declaring a constant or variable in different memory areas (data, idata, xdata, pdata, code) can lead to very different execution times and code sizes.

You can influence the memory space the compiler uses as "default" (when none is explicitly given) by chosing a different memory model, but putting all variables into xdata by default will lead to large and slow programs.

List of 16 messages in thread
TopicAuthorDate
Array size limitation for Keil ?            01/01/70 00:00      
   if you breakpoint            01/01/70 00:00      
      Time to check the assembler output....            01/01/70 00:00      
      RE: you can not break on the declaration of a vari            01/01/70 00:00      
         you can not break on the declaration of a variable            01/01/70 00:00      
   You seem to be declaring constant            01/01/70 00:00      
      It is fully possible....            01/01/70 00:00      
         idata as stack            01/01/70 00:00      
   Keil compiler limits            01/01/70 00:00      
      I agree - its not a limit            01/01/70 00:00      
         Well maybe....            01/01/70 00:00      
            64 or 128            01/01/70 00:00      
   It was the stack            01/01/70 00:00      
      The compiler cannot really guess ..            01/01/70 00:00      
      Glad you have it working            01/01/70 00:00      
   Map the variables in correct memory area            01/01/70 00:00      

Back to Subject List