请问大虾,ti官方例程里面有句话,不清楚意义,有没有人帮忙解释一下?
[复制链接]
// // Return control to the boot loader. This is a call to the SVC // handler in the boot loader. // (*((void (*)(void))(*(unsigned long *)0x2c)))();
这个是E:\StellarisWare-6852\boards\dk-lm3s9b96-ili9325\boot_demo1这个工程里面的,函数全部如下:
//***************************************************************************** // // Passes control to the bootloader and initiates a remote software update. // // This function passes control to the bootloader and initiates an update of // the main application firmware image via UART0, Ethernet or USB depending // upon the specific boot loader binary in use. // // \return Never returns. // //***************************************************************************** void JumpToBootLoader(void) { // // We must make sure we turn off SysTick and its interrupt before entering // the boot loader! // SysTickIntDisable(); SysTickDisable();
// // Disable all processor interrupts. Instead of disabling them // one at a time, a direct write to NVIC is done to disable all // peripheral interrupts. // HWREG(NVIC_DIS0) = 0xffffffff; HWREG(NVIC_DIS1) = 0xffffffff;
// // Return control to the boot loader. This is a call to the SVC // handler in the boot loader. // (*((void (*)(void))(*(unsigned long *)0x2c)))(); } 函数的意义应该是跳转到升级程序里面去,但是目前困惑是为啥升级函数的地址是0x2C而不是其他?在MDK里面能够看见链接后函数的绝对地址吗?怎么看?谢谢!
ps:我在我的程序里面调用这个函数(有bootloader的),直接崩溃。
|