View Single Post
  #4   Spotlight this post!  
Unread 08-04-2006, 09:22
Mike Bortfeldt Mike Bortfeldt is offline
Registered User
FRC #1126 (& 1511)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Rochester, NY
Posts: 119
Mike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud of
Re: Possible bug in memory initialization?

I have never seen a problem with variable initialization that wasn't my own fault (mainly not recognizing how the compiler will sometimes cast constants). But as for your question, I would say that the assumption is true. Since the compiler places all static uninitilized variables within a file in the same UDATA section (assuming you don't use a #pragma statement to change that) the compiler/linker would generate a section error if it overflows a single DATABANK since a single UDATA section must fit within a single DATABANK. That being said, if you've modified the linker file so that a single DATABANK spans multiple memory banks, then I suppose it would be possible for the same bank assumption to be false.

You should also be able to check the .map file to verify that all the variables have been placed in the same bank.

Mike

Last edited by Mike Bortfeldt : 08-04-2006 at 09:28.