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

Back to Subject List

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


 
#141595 - Look at the Map file!
Responding to: ???'s previous message
John Hu said:
when I tried to declare a new variable

unsigned char data testfd6;

the address space overflows
how come?

Because it's full - that's what "overflow" means!

idata works fine

Presumably, you're using a chip that has more IDATA than DATA? (ie 8052-like rather than 8051-like).

I know idata is the whole 256 byte space
and data is the first 128 byte of memory space

Note that this is not just any "memory space" it is specifically the Internal RAM spaces within the 8052 core - not to be confused with CODE or XDATA, which are entirely distinct address spaces, even though the physical memory may be on-chip.

and there is obviously space(gap) in the first 128byte of memory space

Is there?
Don't forget that the Register Banks are in DATA space...

can someone help???

You need to specifically state what chip you're using, and what tools.

It looks like Keil - is it?

            * * * * * * *   D A T A   M E M O R Y   * * * * * * 
            REG     0000H     0008H     ABSOLUTE     "REG BANK "
            DATA    0008H     0014H     UNIT         DATA_GROUP_
                    001CH     0004H                  *** GAP ***
            DATA    0020H     0008H     BIT_ADDR     ?BA?XXACT_H
            BIT     0028H.0   0000H.1   UNIT         _BIT_GROUP_
                    0028H.1   0000H.7                *** GAP ***
            IDATA   0029H     000FH     UNIT         ?ID?XXACT_H
                    0038H     0030H                  *** GAP ***

Note that you need to use the same tags to preserve this text layout as for code layout - see http://www.8052.com/faqs.phtml?FAQ=120199

You need to look at the Linker Listing file - or "Map" File - to see what is actually using-up all your DATA space...



List of 21 messages in thread
TopicAuthorDate
data declaration problem            01/01/70 00:00      
   Look at the Map file!            01/01/70 00:00      
      hmm... how?            01/01/70 00:00      
         Think about it - nothing weird!            01/01/70 00:00      
         So why did they do that?            01/01/70 00:00      
            thanks andy~            01/01/70 00:00      
               advice on the usage of absolute addresses            01/01/70 00:00      
                  so how do i check?            01/01/70 00:00      
                     It should be documented!            01/01/70 00:00      
                        i see            01/01/70 00:00      
   incomplete            01/01/70 00:00      
   Pay attention!            01/01/70 00:00      
      to what?            01/01/70 00:00      
         Jojo's back            01/01/70 00:00      
         please read the content in that link            01/01/70 00:00      
            gaps            01/01/70 00:00      
            ya...            01/01/70 00:00      
               read my post above ...            01/01/70 00:00      
                  I got it now            01/01/70 00:00      
               How to make a gap            01/01/70 00:00      
   Not a declaration problem!            01/01/70 00:00      

Back to Subject List