Home > other > Stm32 bootloader jump after application failure
Stm32 bootloader jump after application failure
Time:09-24
Recently met a puzzled for a long time, use STM32F103VE microcontroller, according to the conventional way to test, all functions are normal, and then for future application upgrade convenient, brush bootloader program first, and then through the front-end ports download application program, found the following problem (introduce) step by step below:
1: upgrade download tool tip the download is complete, then the board should work under the mode of application, but actually did not see any function, try again still 2: use the debug debugging, with JLINK download bootloader program first, and then change the application project in the way of wiping out all sector will also download applications in and start the debug, so you can download via JLINK go in both process and can online debugging 3: application to succeed from bootloader to jump to the application of the main entrance, single step down debugging, program can work normally, but using a run at full speed (no breakpoint way), the program ran fly 4: at this time click the stop button, the program stops at the end of the interrupt service function of the boot file b. , seemed to occur after all didn't find the interrupt service function DMA2_Channel1_IRQHandler DMA2_Channel2_IRQHandler DMA2_Channel3_IRQHandler DMA2_Channel4_5_IRQHandler b.
ENDP
The ALIGN 5: blocking other interrupt initialization, can only make a timer interrupt, within the interrupt breakpoints, can always come in execution and successful exit, but I can't cancel the breakpoint operation still
6: here are the main place of application initialization code NVIC_SetVectorTable (NVIC_VectTab_FLASH, 0); NVIC_PriorityGroupConfig (NVIC_PriorityGroup_1); ReadFlashCfg (); DrLed (); DrTimer_Init ();
System_stm32f10x. C file Settings # define VECT_TAB_OFFSET 0 x0/*! This value must be a multiple of 0 x200. */
In the target option IROM1 Settings Start 0 x8008000 size 0 x1c000
Bootloader program is the company's mature products, other programs can be normal operation, but the program has a problem, the preliminary theory is a problem with the interruption after the relocation, after the interruption point to illegal address (but not understand single-step debugging can run), understand the situation which the great spirit, know what is the problem, thank you very much!
CodePudding user response:
Since the bootloader is ripe, then put it into an array of __root constants "@" to a fixed Flash address, on the independence of a source file, a project there are both bootloader and application, is very convenient, although not necessarily can solve your problem,, Such as IAR so to get the