This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Struggly to understand data memory overflow - Need help

Hi - I am struggling to 'fit' a project onto an 8052 derivative (AT89S8252) part with the standard 8K code space and 256 bytes of data memory. The build log information is complaining about data address space overflow. My 8051 understanding is that the first 128 bytes (0 - 0x7F) is either direct or indirect memory whereas the 128 bytes from 0x80 to 0xFF is indirect only. The module DATETIME below, I declare no variables as global and all variables within each function are declared as idata local, yet the linker is claiming of a DATA overrun error that I don't understand. My guess is that I am using in excess of 128 bytes of direct memory. I would appreciate someone reviewing what I have pasted below and set me straight where the problem exists. I don't understand what steps need to take place in the project setup of my variable declaration to eliminate the issue. Thanks for your help... Jim Build target 'target' linking... *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?DATETIME LENGTH: 000060H >>>>>>>>>>> Program Size: data=180.6 xdata=0 const=50 code=3604 Target not created. Build Time Elapsed: 00:00:01 ACTIVE MEMORY CLASSES OF MODULE: .\obj\clock42 (DS1307) BASE START END USED MEMORY CLASS ========================================================== C:000000H C:000000H C:00FFFFH 000E14H CODE I:000000H I:000000H I:00007FH 0000A9H DATA >>>>>>>>>>> I:000020H.0 I:000020H.0 I:00002FH.7 000000H.6 BIT C:000000H C:000000H C:00FFFFH 000032H CONST START STOP LENGTH ALIGN RELOC MEMORY CLASS SEGMENT NAME ========================================================================= * * * * * * * * * * * D A T A M E M O R Y * * * * * * * * * * * * * 000000H 000007H 000008H --- AT.. DATA "REG BANK 0" 000008H 00000FH 000008H --- AT.. DATA "REG BANK 1" 000010H 000017H 000008H BYTE UNIT DATA ?DT?MAIN 000018H 00001AH 000003H BYTE UNIT DATA DS1307_DATA 00001BH.0 00001FH.7 000005H.0 --- --- **GAP** 000020H.0 000020H.3 000000H.4 BIT UNIT BIT DS1307_FLAGS 000020H.4 000020H.5 000000H.2 BIT UNIT BIT ?BI?TIMER 000020H.6 000020H 000000H.2 --- --- **GAP** 000021H 00004EH 00002EH BYTE UNIT DATA _DATA_GROUP_ 00004FH 000058H 00000AH BYTE UNIT IDATA ?ID?TIMER 000059H 000059H 000001H BYTE UNIT IDATA ?STACK