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.

如何实现MSP432的从bootloader到APP的跳转?

如何实现MSP432的从bootloader到APP的跳转?

Boot程序的MAP安排如下:

*******************************************************************************

*** PLACEMENT SUMMARY***

"A1":  place at 0x00000000 { ro section .intvec };

"P1":  place in [from 0x00000000 to 0x00001fff] { ro };

"P2":  place in [from 0x20000000 to 0x2000ffff] { rw, block CSTACK, block HEAP };

 

  Section            Kind        Address    Size  Object

  -------            ----        -------    ----  ------

"A1":                                      0x144

  .intvec            const    0x00000000   0x144  msp432_startup_ewarm.o [1]

                            - 0x00000144   0x144

*******************************************************************************

 

APP程序的MAP安排如下:

*******************************************************************************

*** RUNTIME MODEL ATTRIBUTES***

CppFlavor       = *

__SystemLibrary = DLib

*******************************************************************************

*** PLACEMENT SUMMARY***

"A1":  place at 0x00002000 { ro section .intvec };

"P1":  place in [from 0x00002000 to 0x0003ffff] { ro };

"P2":  place in [from 0x20000000 to 0x2000ffff] { rw, block CSTACK, block HEAP };

 

  Section             Kind        Address    Size  Object

  -------             ----        -------    ----  ------

"A1":                                       0x144

  .intvec             const    0x00002000   0x144  msp432_startup_ewarm.o [1]

                             - 0x00002144   0x144

*******************************************************************************

 

long App_add = 0x00002000 ;    //应用程序

 

Boot中跳转到APP的子程序为:

void set_pc()

  __set_MSP((*(volatile uint32_t*) App_add) );            //设置栈指针  

  (*(void(*)(void))(*(volatile uint32_t*) (App_add + 4)))();    //APP复位中断地址

}

可是当Boot程序运行到set_pc()时,就进入了Boot程序的IntDefaultHandler(void)中断

了。

在set_pc()中我还应该做些什么?