Ask Help! Porting uCOS to H8S2218

I am porting

the ucos II 2.52 to H8S2218,

I use HEW ro debug my program, when the program run to _OSCtxSw 's RTE, the program run away. as below is my program, please help.

=====================================================

;********************************************************************************************************
;                                               uC/OS-II
;
;                                           H8S Specific code
;                                           (ADVANCED mode)
;
;
; File : OS_CPU_A.SRC
;********************************************************************************************************
       
          .EXPORT _OSStartHighRdy      ; Public functions
          .EXPORT _OSCtxSw
          .EXPORT _OSIntCtxSw
          .EXPORT _OSTickISR

          .IMPORT _OSIntEnter          ; External functions
          .IMPORT _OSIntExit
          .IMPORT _OSTimeTick
          .IMPORT _OSTaskSwHook
         
          .IMPORT _OSTCBCur            ; External variables (uC/OS-II)
          .IMPORT _OSTCBHighRdy
          .IMPORT _OSPrioCur
          .IMPORT _OSPrioHighRdy
          .IMPORT _OSIntNesting
          .IMPORT _OSRunning
          .IMPORT _TickClr
                                            ; the OS tick source

_OSStartHighRdy:
          JSR      @_OSTaskSwHook         ; Execute task switch hook
;
          MOV.B    #1,  R6L              ; Set OSRunning to TRUE
          MOV.B    R6L, @_OSRunning
;
          MOV.L    @_OSTCBHighRdy, ER0    ; SP = OSTCBHighRdy->OSTCBStkPtr
          MOV.L    #_OSTCBCur,ER1
          MOV.L    ER0,  @ER1
          MOV.L    @ER0, ER7
;         

          POP.L    ER6
          POP.L    ER5
          POP.L    ER4
          POP.L    ER3
          POP.L    ER2
          POP.L    ER1
          POP.L    ER0
 
;         
          RTE

_OSCtxSw:       
          PUSH.L   ER0
          PUSH.L   ER1
          PUSH.L   ER2
          PUSH.L   ER3
          PUSH.L   ER4
          PUSH.L   ER5
          PUSH.L   ER6
;
          MOV.L    @_OSTCBCur, ER6        ; Save current task's SP into its TCB
          MOV.L    ER7, @ER6
;         
          JSR      @_OSTaskSwHook         ; Execute task switch hook
;
          MOV.B    @_OSPrioHighRdy, R1L   ; OSPrioCur = OSPrioHighRdy
          MOV.B    R1L, @_OSPrioCur
;         
          MOV.L    @_OSTCBHighRdy, ER6    ; Get new task's SP from its TCB
          MOV.L    ER6,  @_OSTCBCur       ; OSTCBCur = OSTCBHighRdy
          MOV.L    @ER6, ER7
;         
          POP.L    ER6
          POP.L    ER5
          POP.L    ER4
          POP.L    ER3
          POP.L    ER2
          POP.L    ER1
          POP.L    ER0
;         
          RTE                            ; Return to task

_OSIntCtxSw:
          JSR      @_OSTaskSwHook         ; Execute task switch hook
;
          MOV.B    @_OSPrioHighRdy, R1L   ; OSPrioCur = OSPrioHighRdy
          MOV.B    R1L, @_OSPrioCur
;         
          MOV.L    @_OSTCBHighRdy, ER6    ; Get new task's SP from its TCB
          MOV.L    ER6, @_OSTCBCur        ; OSTCBCur = OSTCBHighRdy
          MOV.L    @ER6, ER7
;         

         POP.L    ER6
          POP.L    ER5
          POP.L    ER4
          POP.L    ER3
          POP.L    ER2
          POP.L    ER1
          POP.L    ER0
;         
          RTE

   
_OSTickISR:
          PUSH.L   ER0
          PUSH.L   ER1
          PUSH.L   ER2
          PUSH.L   ER3
          PUSH.L   ER4
          PUSH.L   ER5
          PUSH.L   ER6

          MOV.B    @_OSIntNesting, R6L    ; tell uC/OS-II we're in an ISR
          INC.B    R6L
          MOV.B    R6L, @_OSIntNesting

          CMP.B    #1,R6L                ; if (OSNesting == 1)
          BNE      _OSTickISR1
          MOV.L    @_OSTCBCur, ER6        ;     Save current task's SP into its TCB
          MOV.L    ER7, @ER6
_OSTickISR1:

          JSR      @_TickClr              ; Notify uC/OS-II about Tick
          JSR      @_OSTimeTick
          JSR      @_OSIntExit            ; Notify uC/OS-II about end of ISR

    

          POP.L    ER6
          POP.L    ER5
          POP.L    ER4
          POP.L    ER3
          POP.L    ER2
          POP.L    ER1
          POP.L    ER0 

          RTE

        .END