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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/12/10 10:48
Read: times


 
#174990 - A couple of points
Responding to: ???'s previous message
Firstly, I don't think you want to declare the array as volatile. Volatile means you are telling the compiler that it must never make the assumption that the variable hasn't changed, and is therefore appropriate for variables used by ISRs and for SFRs. Your EEPROM variable don't seem to fall into either category.

Secondly, many compilers will expect the same number of initialisers as the array is declared with. It can be tedious to type the all in, but copy and paste is your friend.

Thirdly, I would suggest placing blocks in fixed memory location is best done by the linker. I would declare a custom memory segment, and declare the array to use the custom segment. I would then tell the linker where the custom segment should go. Removing the addresses used by the custom segment from the standard code segment eliminates the danger of an overlap.

List of 15 messages in thread
TopicAuthorDate
Loading Flash EEPROM with defaults            01/01/70 00:00      
   this seems to work - any improvements            01/01/70 00:00      
      Always a key requirement!            01/01/70 00:00      
         toolchain dependent            01/01/70 00:00      
   A couple of points            01/01/70 00:00      
      volatile            01/01/70 00:00      
         separate source            01/01/70 00:00      
         So subtle            01/01/70 00:00      
      Excel is (also) among your friends            01/01/70 00:00      
         Yes missing initialisers do default to 0            01/01/70 00:00      
   My Method...            01/01/70 00:00      
   an alternate suggestion (which I use)            01/01/70 00:00      
      That uses more memory            01/01/70 00:00      
         Oliver ???            01/01/70 00:00      
         I believe that is what most devices do..            01/01/70 00:00      

Back to Subject List