设备-STM32H7B3I-DK
项目-STM32H7B3I-DK\应用程序\2_Images_ExtFlash
将控制从BL转移到APP时发生严重故障
1)最后的代码跟踪
- [color=var(--lwc-codeSnippetColorBlack,#000000)]launch_application[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]:
- [color=var(--lwc-codeSnippetColorRed,#C23934)]/******************************************************
- [color=var(--lwc-codeSnippetColorRed,#C23934)]* return from exception to application launch function
- [color=var(--lwc-codeSnippetColorRed,#C23934)]* R0: application vector address
- [color=var(--lwc-codeSnippetColorRed,#C23934)]* R1: exit function address
- [color=var(--lwc-codeSnippetColorRed,#C23934)]* push interrupt context R0 R1 R2 R3 R12 LR PC xPSR
- [color=var(--lwc-codeSnippetColorRed,#C23934)]*******************************************************/
- [color=var(--lwc-codeSnippetColorBlack,#000000)] MOV R2[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)],[color=var(--lwc-codeSnippetColorBlack,#000000)] [color=var(--lwc-codeSnippetColorRed,#C23934)]#0x01000000 /* xPSR activate Thumb bit */
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R2[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}
- [color=var(--lwc-codeSnippetColorBlack,#000000)] MOV R2[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)],[color=var(--lwc-codeSnippetColorBlack,#000000)] [color=var(--lwc-codeSnippetColorRed,#C23934)]#1
- [color=var(--lwc-codeSnippetColorBlack,#000000)] BIC R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)],[color=var(--lwc-codeSnippetColorBlack,#000000)] R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)],[color=var(--lwc-codeSnippetColorBlack,#000000)] R2 [color=var(--lwc-codeSnippetColorRed,#C23934)]/* clear least significant bit of exit function */
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}[color=var(--lwc-codeSnippetColorBlack,#000000)] [color=var(--lwc-codeSnippetColorRed,#C23934)]/* return address = application entry point */
- [color=var(--lwc-codeSnippetColorBlack,#000000)] MOV R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)],[color=var(--lwc-codeSnippetColorBlack,#000000)] [color=var(--lwc-codeSnippetColorRed,#C23934)]#0 /* clear other context registers */
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R1[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}
- [color=var(--lwc-codeSnippetColorBlack,#000000)] PUSH [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]{[color=var(--lwc-codeSnippetColorBlack,#000000)]R0[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)]}[color=var(--lwc-codeSnippetColorBlack,#000000)] [color=var(--lwc-codeSnippetColorRed,#C23934)]/* R0 = application entry point */
- [color=var(--lwc-codeSnippetColorBlack,#000000)] MOV LR[color=var(--lwc-codeSnippetColorBrown,#8F6D4D)],[color=var(--lwc-codeSnippetColorBlack,#000000)] [color=var(--lwc-codeSnippetColorRed,#C23934)]#0xFFFFFFF9 /* set LR to return to thread mode with main stack */
- [color=var(--lwc-codeSnippetColorBlack,#000000)] BX LR [color=var(--lwc-codeSnippetColorRed,#C23934)]/* return from interrupt */
- [color=var(--lwc-codeSnippetColorBrown,#8F6D4D)].[color=var(--lwc-codeSnippetColorBlue,#005FB2)]end
LR值,SP
堆栈指针的内存:
2) LR : 0xFFFF.FFF9从处理程序模式返回,所以NVIC可以解除堆栈PC,R0-R3,R12,LR,xPSR
PC:0x8020400看起来应用程序启动是正确的
3)应用程序内存在0x8020400
这看起来也很好。
任何帮助调试这个硬故障将不胜感激。
|