HCS08 and lauterbach debugger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HCS08 and lauterbach debugger

2,185 Views
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. 
Labels (1)
0 Kudos
3 Replies

301 Views
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 Kudos

301 Views
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 Kudos

301 Views
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 Kudos