目录
摘要
本节主要记录自己学习Ardupilot stm32f1 Bootloader,欢迎批评指正!
1.Bootloader代码执行
int main(void)
{
unsigned timeout = 0;
/* 做板层初始化------do board-specific initialisation */
board_init(); //主要配置LED和串口2
#if defined(INTERFACE_USART) || defined (INTERFACE_USB)
/*探测连接串口,以决定是否在引导加载程序中等待?--- XXX sniff for a USART connection to decide whether to wait in the bootloader? */
timeout = BOOTLOADER_DELAY;
#endif
#ifdef INTERFACE_I2C
# error I2C bootloader detection logic not implemented
#endif
/*如果应用程序留下一个cookie说我们应该等待,然后等待---- if the app left a cookie saying we should