Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Keil uvision3 debugger issue, several times "looping&qu

Status
Not open for further replies.

paloncho

Newbie level 1
Joined
Feb 16, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
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!
 

Keil uvision3 issue

A 8051 application isn't expected to return to a calling OS enviroment, or is it?
 

Re: Keil uvision3 issue

Can you send the rest of the startup code?
Return returns a value to the caller which is the start up code in your case.
May be when the return value is 1, the start up code restarts the program again.
--
Amr Ali
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top