1. What is bootlloader? In an embedded operating system, BootLoader runs before the operating system kernel runs. It can initialize hardware devices and establish memory space mapping, thereby bringing the system's hardware and software environment to a suitable state, so as to prepare the correct environment for the final call to the operating system kernel. Therefore, the loading and startup tasks of the entire system are completely completed by BootLoader. The above is the description of bootloader on Baidu Encyclopedia, but the bootloader we are talking about here is a boot program written to realize the IAP function of the microcontroller, so that the program data of our APP can be written into the Flash program space through serial port and other communication methods to finally achieve the purpose of self-programming and program update. This is what we are talking about here. Bootloader. 2. Program Architecture A complete application system program with a bootloader is divided into two parts: 1. APP program: the application system function implementation layer (generally speaking, it is the program we want to write ourselves); 2. Bootloader program: it is the entry program when the system starts or resets. Its main functions include clock initialization, Uart communication initialization, and judging whether to execute the boot serial port upgrade program or jump to execute the APP program.