Browse the documentation

AEL 1.0.0

Flashing a board

In AEL, the Agent Engineering Language, you flash and monitor supported boards from the command line, using each board's standard flashing tools. ael flash writes a firmware image to one device that you select.

Usage

ael flash --target <board> --device <device> --artifact <firmware>
OptionMeaning
--target <board>The board the firmware image was built for.
--device <device>The device to write to, by an identity from ael devices.
--artifact <firmware>The firmware image to write, built by ael build.
--jsonProgress and the result in machine-readable form.

All three of --target, --device and --artifact are required. ael flash never picks a device or a firmware image for you.

A typical session

ael build --target <board> -o build/sensors --release --memory-report
ael devices
ael flash --target <board> --device <device> --artifact build/sensors
ael monitor --device <device>

Never automatic

Building, testing and deploying never flash a device on their own. A firmware image reaches a board only when you run ael flash and name both the device and the image.

Before it writes

ael flash checks, and refuses to write if any check fails:

  • that the device is connected and available;
  • that it is the board named by --target;
  • that the firmware image was built for that board;
  • that the firmware image is intact.

While it writes

  • It takes the device for itself: no other command can flash or monitor it until the flash has finished or failed.
  • It runs the board's standard flashing tools for you, with bounded time, and reports progress.
  • It releases the device when it ends, whether it succeeded, failed or was cancelled.

If a flash is interrupted

If the device is unplugged or the flash stops part-way, ael flash says so, reports what state the device was left in, and tells you how to recover it, such as putting the board back into its bootloader and flashing again. It never reports an interrupted flash as a success.

What you need

  • The board's target, set up with ael target install.
  • The board maker's standard flashing tools, which you install yourself. ael doctor tells you when they are missing.