我现在基于 SI1060 的片子,做一个BootLoader的功能,现在已经实现了搬运APP的功能,但是现在一直不能从BootLoader跳转到APP。
我的APP程序通过BootLoader写到了0x2800地址处。
跳转函数是写在 STARTUP.A51里面的:
;******************************************************************************
; Begin custom code for CAN_BL - Target_BL_FW ->
;******************************************************************************
;------------------------------------------------------------------------------
; Redirects the HW interrupt vectors to a jump table starting at INTVEC_TABLE.
; This table will always be part of the App_FW space and can be modified by the
; bootloader's ERASE and WRITE commands.
;HW Interrupt Entries
HW_INTVEC_TABLE EQU 0003h ;HW Interrupt vector table starts here
HW_INTVEC_SEPARATION EQU 8 ;HW Interrupt vector separation is 8 Bytes
;Redirected Interrupt Entries
;Changes to INTVEC_TABLE location should be mirrored in:
; BL FW's USB_BL_Defs.h (APP_START_PAGE)
; App FW's STARTUP.A51, Compiler and Linker command lines
PUBLIC START_APPLICATION ;The entry point (relocated reset vector)
START_APPLICATION EQU 2800h ;for the application FW project
INTVEC_TABLE EQU START_APPLICATION+3 ;Interrupt vector table starts here
INTVEC_SEPARATION EQU 3 ;Interrupt vector separation is 3 Bytes
; CSEG AT 2800h ;(HW Reset Interrupt)
;?C_STARTUP11: LJMP START_APPLICATION ;Jump to RAM initialization code
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 0) ;03h (Intr. 00)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 0)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 1) ;0Bh (Intr. 01)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 1)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 2) ;13h (Intr. 02)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 2)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 3) ;1Bh (Intr. 03)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 3)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 4) ;23h (Intr. 04)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 4)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 5) ;2Bh (Intr. 05)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 5)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 6) ;33h (Intr. 06)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 6)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 7) ;3Bh (Intr. 07)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 7)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 8) ;43h (Intr. 08)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 8)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 9) ;4Bh (Intr. 09)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 9)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 10) ;53h (Intr. 10)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 10)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 11) ;5Bh (Intr. 11)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 11)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 12) ;63h (Intr. 12)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 12)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 13) ;6Bh (Intr. 13)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 13)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 14) ;73h (Intr. 14)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 14)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 15) ;73h (Intr. 15)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 15)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 16) ;73h (Intr. 16)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 16)
CSEG AT HW_INTVEC_TABLE + (HW_INTVEC_SEPARATION * 17) ;73h (Intr. 17)
LJMP INTVEC_TABLE + (INTVEC_SEPARATION * 17)
;******************************************************************************
;End of custom code <-
;Unmodified Keil STARTUP.A51 code continues below ->
;******************************************************************************
我的整个调试环境是这样:
|