HCS08 and lauterbach debugger

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

HCS08 and lauterbach debugger

2,699 次查看
cris2pher
Contributor I
I'm a newbie in the use of both the lauterbach debugger and the HCS08 microprocessor.
Although I was able to connect the debugger to the HCS08 microprocessor, it is not operating properly.
When I do a step by step operation on the debugger, and a function call is performed, after processing the content of the function and an  RTS command is reached, the cursor of the debugger must return to the place where the function is called when the RTS command is processed. But this is not what happened. After processing the RTS command, the cursor goes to the address 0xFFFE which is the RESET interrupt vector. I already disabled the COP and the LVD. There is nothing connected on the RESET pin except the debugger. What do you think causes the cursor to go to the RESET interrupt? Please help me fix this. Thanks in advance. 
标签 (1)
0 项奖励
回复
3 回复数

815 次查看
Luigi
Contributor III
Also, be sure you are not "calling" an interrupt service routine (ISR), which returns with an RTI instead of an RTS.  Or, if your function is an ISR, be sure it is declared as an interrupt routine so the return will be correct.
0 项奖励
回复

815 次查看
rocco
Senior Contributor II
Hi, Christopher:

After the reset occurs, you can check the reset status register (SRS on the GBxx) to see the cause of the reset.

If the stack was corrupted, and it sent your code to never-never-land, the ILOP (illegal opcode) bit may be set.

HTH

Message Edited by rocco on 2007-04-2301:05 PM

0 项奖励
回复

815 次查看
tonyp
Senior Contributor II
>What do you think causes the cursor to go to the RESET interrupt?

Check your stack contents right before executing the RTS instruction.  Chances are you have corrupted your stack (or have unbalanced PUSH and PULL instuctions) and the return address pulled is garbage.
0 项奖励
回复