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 starts always in supervisor mode

Why does the programm always run in the supervisor mode if I use the simulator? If I use the Ulink2 to debug then the programm runs in user mode.

Moreover I don't understand why the programm don't see my variable int i=0; at the local watch window??? very strange... the whole code is only

int main (void)
{

 int i=0;

 i++;


while(1);

}

I use the evaluation version of the db_arm version.

best regards
Gerd

  • thanks for your answer....

    If you have any optimizations turned on,

    I'm new to keil products - but under options for target > C/C++ I use Optimization (Level0 (00).

    Now I use volatile int but nothing changed - I'm not able to view the variable in the watch window...

    BTW could you tell me how I can change in the simulator to the user mode? I mean there are two registers CPRS (something like that) but where do I have to install this information? Or is there a way to include the startup-code bevor enter the main.c routine?

    best regards
    Gerd