There are two Macro definition （INTERFACE_USART and INTERFACE_USB） in line 313. But they already defined in hw_config.h(I am useing v3),the “timeout” will be setted 5000 in here. so it seem that we couldn’t jump to app immediately by line 340. I couldn’t understand it,where is the answer in the code？ https://github.com/PX4/Bootloader/blob/master/main_f1.c
Can you elaborate what you’re trying to do and what your problem is? Maybe that will make it easier for me to answer.
I want to use the bootloader in my stm32 for IAP，but i found that when the app not left a cookie the bootloader still could’t jump to app immediately because of the two Macro definition.
I’m still lost. What is IAP. What cookie? What about the macro definition?
I‘m sorry for that not described it clearly. IAP is “In Application Programming”,the cooike is a flag which was setted by app for update. you can find it in line 322 https://github.com/PX4/Bootloader/blob/master/main_f1.c , i’m puzzled because i can’t understand how the bootloader jump to app when not expected to wait in the bootloader .
If no timeout is set then it jumps directly here, right?