paloncho
Newbie level 1
Hello everyone,
I'm facing an issue with keil uvision 3.
When I debug a c program I did, everything goes ok, program does what I want it to do.
Problem is when it finishes.... I run it step by step to find the issue and discovered that when it gets to return 0 (from main function in C), it got stucked in a loop, which is sowed in STARTUP.A51:
IDATALOOP: MOV @R0,A
DJNZ R0,IDATALOOP
The program stayed for several times "looping" within this two lines, and when register ro gets to 0, it starts the whole program again.
It never goes out from debug....
Is that a normal behavior?
How can I fix this?
I'll wait for your answer.
Regards!
I'm facing an issue with keil uvision 3.
When I debug a c program I did, everything goes ok, program does what I want it to do.
Problem is when it finishes.... I run it step by step to find the issue and discovered that when it gets to return 0 (from main function in C), it got stucked in a loop, which is sowed in STARTUP.A51:
IDATALOOP: MOV @R0,A
DJNZ R0,IDATALOOP
The program stayed for several times "looping" within this two lines, and when register ro gets to 0, it starts the whole program again.
It never goes out from debug....
Is that a normal behavior?
How can I fix this?
I'll wait for your answer.
Regards!