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

Simulator & EPM900 behaviour differs

Hi,

I am using uVision2 with EPM900 for a LPC930 device in Win2K enivronment. However, I have downloaded the lpc900_072004.exe and make use of the LPC9xx examples and start900.A51 file in the uVision2 IDE.

The simulator and emulator is found to be behaving differently for this attached piece of code in the timer isr. At first isr is being called, key_ptr is entered a 2 instead of 1 for emulator enivronment. For simulator, key_ptr is entered as 1 (which is correct).

Details of emulation:
x is a local variable and uses R7.
key_ptr is a global.
When timer isr is first entered, x is 0.
At line L1, x is incremented to 1. At L2, x is still 1 as observed through stepping. At L3, R7 becomes 2 for no apparent reason, and key_ptr is found to be 2 as well!!!

Details of simulation:
Same as above except when L3 is being executed, there is no change in thge R7 and key_ptr is correctly entered as 1!!!

=================
L1: x=x+1;
L2: if(x>=0x05) x=ZERO;
L3: key_ptr=x;
=================

Anyone any ideas?

Parents
  • Found the problem to be caused by the compiler option for Code ROM Size for the below particular code.

    You'll have to present stronge arguments for that claim before I believe it.

    As I said: you (and everybody else who's supposed to investigate this for real) have to look at the complete example, with a precisely specified compiler version, options selected, and/or the complete, actually generated machine code for both the broken and the working version of that code.

Reply
  • Found the problem to be caused by the compiler option for Code ROM Size for the below particular code.

    You'll have to present stronge arguments for that claim before I believe it.

    As I said: you (and everybody else who's supposed to investigate this for real) have to look at the complete example, with a precisely specified compiler version, options selected, and/or the complete, actually generated machine code for both the broken and the working version of that code.

Children
No data