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

uVision Debugger problem with MX2?

I'm developing for the Philip 8xC51MB2 using the latest Keil tools but when I use the uVision debugger (simulator) I get the following problem:-

In "Extended Call Return Mode" ECRM = 1, the simulator appears to handle a RET instruction incorrectly.

The disassembly calls the following library function and pushes a 3-byte address onto the stack:

ECALL  C?OFFXADD(0x8002C6)

the C library function then calls "RET" and only 2 bytes are popped off the stack.

Is this a problem with the simulator or am I doing something incorrectly?

  • Can you show the code that generates the function call?

    The ERET instruction should be used.

    It sounds like the standard 8051 library is getting used (instead of the MX library).

    Jon