1、keil c应用程序工程中设置IROM1 的开始地址和程序空间的巨细。
2、boot中,界说方针地址及函数指针类型:
#define ApplicationAddress 0x08001000
typedef void (*pFunction)(void);
pFunction Jump_To_Application;
u32 JumpAddress;
3、boot中,完结以下使命:
a)、NVIC_SETFAULTMASK(); //关总中止
b)、 JumpAddress = *(volatile u32*) (ApplicationAddress + 4); // 取中止向量表中的复位中止地址
c)、Jump_To_Application = (pFunction) JumpAddress; // 该地址强置为跳转函数地址
d)、Jump_To_Application();
4、应用程序中:
NVIC_RESETFAULTMASK();//敞开总中止
问题:1、为什么要运用 volatile?(经测验能够不必)
2、为什么要+4? (此处保存的是中止向量表的复位中止地址
void NVIC_SetVectorTable(uint32 NVIC_VectTab)
{
SCB->VTOR = NVIC_VectTab;
}