FirmwareBuildManager

Compiles firmware source for a board and flashes the result to a serial port, one job at a time.

Declared in src/libs/libfirmware/firmware/FirmwareBuildManager.hpp
Inherits QObject
Group firmware

Detailed description

The manager is a QObject state machine. compile() builds with FirmwareCompiler and keeps the result as lastImage(). flash() writes that image through a FirmwareFlasher, which the manager creates in configure() and owns. compileAndFlash() does both. cancel() stops a flash in progress. While the state is Compiling or Flashing, isBusy() is true and a new compile is ignored.

A compile runs on the thread of the manager. It starts on the next event-loop turn, so a UI can show its progress state before the compile blocks the thread. Each diagnostic, the end of each step and every state change come out as signals. Call configure() first: until then, the manager ignores every compile and flash request.

See also FirmwareImage, FirmwareImageCache.

In this section