This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6713二级引导完成后跳转到_c_int00死机问题



二级引导完成后,跳转到中断向量0,再由中断向量0跳转到_c_int00,偶尔会出现c程序不运行问题,而二级引导完成后直接跳转到_c_int00就没出过问题,这是为什么呢?求解答

  • 为什么reset中断里不直接放_c_int00跳转指令?

  • 中断向量0就是reset中断啊..下面是代码

    ;*------------------------------------------------------------------------------
    ;* This is a macro that instantiates one entry in the interrupt service table.
    ;*------------------------------------------------------------------------------
    VEC_ENTRY .macro addr
    STW B0,*--B15
    MVKL addr,B0
    MVKH addr,B0
    B B0
    LDW *B15++,B0
    NOP 2
    NOP
    NOP
    .endm


    ;*------------------------------------------------------------------------------
    ;* This is a dummy interrupt service routine used to initialize the IST.
    ;*------------------------------------------------------------------------------
    _vec_dummy:
    B B3
    NOP 5

    ;*------------------------------------------------------------------------------
    ;* This is the actual interrupt service table (IST). It is properly aligned and
    ;* is located in the subsection .text:vecs. This means if you don't explicitly
    ;* specify this section in your linker command file, it will default and link
    ;* into the .text section. Remember to set the ISTP register to point to this
    ;* table.
    ;*------------------------------------------------------------------------------
    .sect ".vct" ; .sect ".text:vecs" ;
    .align 1024

    _vectors:
    _vector0: VEC_ENTRY _c_int00 ;_start;_c_int00; RESET
    _vector1: VEC_ENTRY _vec_dummy ;NMI
    _vector2: VEC_ENTRY _vec_dummy ;RSVD
    _vector3: VEC_ENTRY _vec_dummy

  • 请参照http://www.ti.com/lit/an/spra999a/spra999a.pdf

    二次bootloader完成代码搬移后,直接跳转到程序入口地址,一般是_c_int00.