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

Problem of unresolved externals

To Forum Members,
I am using P89C51RD2HBP processor in my target board. I am using the evaluation version of Keil (downloaded from the net).
A few days ago, I had posted a query regarding Changing the Start Location of the program. I had asked the following question: In this target Board, I want the Address of the Program to start from address 0x4000. I do not want a single byte of code in the program memory area 0x0000~0x3fff.
I got various suggestions and was surprised to find that my problem was solved in no time at all. So I wish to thank all the members for their contribution to making this forum a perfect place for finding solutions.
In the very same product, I am facing another problem, maybe some of you can help me out. My startup code is modified to start at 0x4000, Interrupt vectors are taken care of, and everything is fine. But for some instructions the processor just hangs up. I have done some analysis of this problem.
If I define, a global variable, such as byte or integer, there is no problem. But if I define a global Long variable, my compilation gives a warning "?C?LSTXDATA Unresolved external". I have just initialized the long variable in the main routine, and not used anywhere.
I started debugging the program, and found that, near the initialization of the variable in main routine, it gives an "LCALL ?C?LSTXDATA". If I see the disassembly, the op-code is LCALL 0000.
My Questions:
1. How do I solve this problem?
2. Are there any such functions which might give an LCALL in the area 0x0000~0x3fff?
3. What care should I take so that there are NO function calls or jumps into 0x0 ~ 0x3fff?
4. Will this problem occur for string variables? Or other different type of variables?
5. Will a similar problem might occur for complex math functions?

Thanking you all in advance.

From Mr. Kiran V. Sutar

0