Keil™, An ARM® Company

Discussion Forum

?C?LSTKXDATA error?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
kong nomi
Posted
1-Feb-2009 02:00 GMT
Toolset
C51
New! ?C?LSTKXDATA error?

i use c51 v7.5, when the code do :
WFLAG = 0; // xdata unsigned long data type

the pragram get error!
and i see the code called ?C?LSTKXDATA .
then the ?C?LSTKXDATA did POP action..

why does the ?C?LSTKXDATA do this???

Read-Only
Author
Hans-Bernhard Broeker
Posted
1-Feb-2009 20:58 GMT
Toolset
C51
New! RE: ?C?LSTKXDATA error?

the pragram get error!

That doesn't even begin to be a usable description of your problem!

What is the error?

why does the ?C?LSTKXDATA do this???

What makes you believe it shouldn't?

Read-Only
Author
Andy Neil
Posted
2-Feb-2009 09:58 GMT
Toolset
C51
New! Use the 'Search' box

Put "LSTKXDATA" into the 'Search' box and find http://www.keil.com/support/docs/1964.htm

Read-Only
Author
kong nomi
Posted
3-Feb-2009 13:34 GMT
Toolset
C51
New! RE: Use the 'Search' box

i used the code :

WFLAG = 0; // xdata unsigned long data type

in a ISP. and run at the code , the MCU restart.

at last, i use a function and writed by ASM, the MCU work OK.

when i debug the ?C?LSTKXDATA function , i see two 'POP' ASM code and with no 'POSH' code.
so i didn't know how the code work..
like other function of "?C?tffmmm" there were no 'POP' code..

Read-Only
Author
Hans-Bernhard Broeker
Posted
3-Feb-2009 18:44 GMT
Toolset
C51
New! RE: Use the 'Search' box

in a ISP.

You mean an ISR, I'll assume?

and run at the code , the MCU restart.

And you're totally sure that you know the Keil library function is responsible for that?

so i didn't know how the code work..

So you aren't sure. And given you don't know what the function does, there's no way you can justify your conclusion that it did it incorrectly.

Read-Only
Author
kong nomi
Posted
5-Feb-2009 13:08 GMT
Toolset
C51
New! RE: Use the 'Search' box

Sorry , i just mean 'ISR'.

because, i don't know why the function '?C?LSTKXDATA' did 'POP', when i write a function to do the clear operation by ASM, the MCU would not RESTART at all.

but also, the '?C?LSTKXDATA' was called by some other function, and it worked OK. -- there were not in a ISR.

sorry, i was replay to : http://www.keil.com/forum/docs/thread14140.asp#msg70496

Read-Only
Author
Hans-Bernhard Broeker
Posted
5-Feb-2009 21:08 GMT
Toolset
C51
New! RE: Use the 'Search' box

i don't know why the function '?C?LSTKXDATA' did 'POP',

So stop worrying about that! The odds that a Keil-supplied library function which, as you noted yourself, works just fine in other places is buggy are far smaller than that the problem is in a completely different area, e.g. in your code, or in the way you set up that ISR ("using" used? correctly so?).

the MCU would not RESTART at all.

You still haven't found a single clue as to why it restarted, did you? That's what you have to concentrate on now. For starters: did you check if you got bit by your watchdog?

My money would be on stack overflow. Keil's service routine uses the stack quite a bit, whereas as your hand-coded replacement probably didn't.

Next Thread | Thread List | Previous Thread Start a Thread | Settings