Hi guys again here to trouble you little more ok the problem is after compiling compiler keil doesn't give any error but program doesn't work as it should I guess Program Size: data=104.0 xdata=0 code=4249 while I'm using at89c51 4k code memory Can this be a problem
Yes
So I will have to go for at89c52 I just want to confirm before jumping a gun So why doesn't compiler say it in first place (well sorry if it sounds as blaming but really I'm just asking - there must be strong reason that programmer designed it(compiler) that way) and Thanks Mr. Obvious I'll change my uC and try again
Look at your project. Does it specify 4kB code memory?
Another thing before switching processor - you are close. Can't you modify the code to reduce the size? Some changes may be quite simple. Looking through your optimization settings and your data declarations can also make a big difference quickly.
Thanks Westermark Actually I've already modified it to reduce the size but it was just by looking at the code can you specify the method to do it through keil Thanks in advance
You better ask someone who is currently using the C51 compiler. I haven't needed to work with the C51 for many years. Currently, I'm working with ARM processors.
The Compiler can never do this, since the compiler only sees a single source file at a time - therefore it can never know the full size of your complete project.
Only the Linker knows that.
So the question should be: why didn't the Linker warn you?
It should have warned you; the fact that it didn't must mean that you have misconfigured your project somehow - so that the Linker thinks that you have >4K available...
First, ensure that your source is optimal: http://www.keil.com/support/man/docs/c51/c51_xc.htm
Then see: http://www.keil.com/support/man/docs/c51/c51_optimize.htm
Thanks Andy I'll go through it, You are always a great help.
This is a problem sometimes not often in Keil IDE. sometimes it throws error at compilation time. We need to optimise the compiler in the begining after we select the controller.
We need to optimise the compiler in the begining after we select the controller. who is "we"? are you working for Keil? I have to say, it does not sound like that...
Please explain what you mean by that.
What you wrote doesn't make sense - but I guess that could well just be a matter of English usage?