Hello, I am using the keil compiler evaluation version, my program was compiling without any errors and i was also able to debug my program, but as i was expanding the program, one error has started "DATA : segment too LARGE". Is this error becauae of the limitation of the compiler my code is nearly 500 lines now. Please help regards Rucha
Read the message - it tells you exactly what is "too large"
Do you understand the 8051's different memory areas - CODE, DATA, XDATA, etc?
Is this error becauae of the limitation of the compiler my code is nearly 500 lines now.<p>
Are you using the evaluation version ?
That aside, I do not think that running out of DATA memory has anything to do with CODE size.
It is more likely that you are using too much data memory in your program. Either find a way to reduce the memory footprint by using more efficient implementations, or, if that is not possible, use other memory types (idata or xdata), if available on your chip.
Extremely sorry, I should have realised that before posting the question. sorry for the trouble
i think it be fair enough if i declare the variables specifying the data memory area.
"i think it be fair enough if i declare the variables specifying the data memory area."
No - think again: the message is telling you that the DATA area is full, isn't it?
As Christoph said, you need to reduce your memory usage and/or move some of it to areas other than DATA.
Again, you do understand that the message is referring to a specific 8051 memory space - DATA - as distinct from the other spaces XDATA, IDATA, PDATA, etc...?
Rucha,
You should have a read in your Keil manual about compiler memory models and the implications for variables that don't specify an memory qualifier.
one thing that caught me "with me britches down" is that, if you do not specify optimize 2 or higher there is no data overlaying.
Erik
http://www.keil.com/support/man/docs/c51/c51_optimize.htm
"The OPTIMIZE directive sets the optimization level and emphasis the Cx51 Compiler uses when generating object code ... 2 = Data Overlaying"
"
I know, but at the release previous to the one where I got cought whatever level enabled overlaying was the default. And when you try the new release, the message is "data overflow" NOT "overlaying not enabled"
Hello, Thanks for the help, i have also read a similar thread on 8052.com www.8052.com/.../read.phtml Trying to implement all the suggestions in the keil manual like placing arrays in xdata memory and many more.. it seems to be working fine, will implement the other optimising techniques also. thanks for the help