Booting

From OpenCircuits
Revision as of 22:43, 2 August 2025 by DavidCary (talk | contribs) (rough draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

rough draft

Booting, from the phrase "to pull oneself up by the bootstraps", is the process of starting a computer. It usually involves a bootloader.

With a few historic exceptions, on power up the computer's processor starts fetching instructions from the bootstrap ROM, often shorted to the "boot ROM" (On most systems, the "ROM" is actually Flash memory).

Modern microcontroller development systems often allow new software to be installed through a standard UART interface during the boot process.

Arduino boards can install new software through a UART interface -- a tiny program called a bootloader pre-installed on those boards starts running on power-up, and if it notices new software coming through the UART interface, it installs the new software as the main application into Flash memory (leaving the original bootloader unchanged) and runs it. Otherwise the bootloader runs whatever main application happens to already be in Flash memory.

A few microcontrollers (such as the Raspberry Pi RP2350, the Morotola M68HC11, STM32, NXP LPC, ESP8266, ESP32, etc.) can install new software through a UART interface even when they are completely blank from the factory.<ref> "Booting the RP2350 from UART". </ref> <ref> "An Overview of the 68HC12". quote: "The 68HC11 has a special mode called bootstrap mode which allows you to download code via the serial port. This is extremely convenient for robot hackers such as ourselves." </ref> <ref> "STM32 Built-in Bootloader". </ref> <ref> "EXA PROG: USB programming adapter for AVR-ISP, AVR-UPDI, STM32, LPC, ESP8266, ESP32". </ref>

Many other microcontrollers (such as the ATmega328P, the Atmega32u4, and some Microchip PIC microcontrollers) can be programmed over UART, but only *after* they have some bootloader installed on them.

Nearly all microcontrollers have some specialized "programming interface" intended to be connected to a specialized hardware tool, "device programmer". Often people only use the "device programmer hardware" to program a bootloader into blank-from-the-factory microcontrollers. Once a microcontroller has a bootloader in it, it's usually more convenient and faster to use that bootloader to install main application software through a UART interface.

A few bootloaders support a USB interface: