Flashing a board
In AEL, the Agent Engineering Language, you will flash and monitor supported boards from the command line, using each board's standard flashing tools. ael flash (command names may change before launch) will write a firmware image to one device that you select.
Status
Planned for AEL Beta 0.0.1. AEL is not available yet.
Usage
ael flash --target <board> --device <device> --artifact <firmware>
| Option | Meaning |
|---|---|
--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. |
--json | Progress and the result in machine-readable form. |
All three of --target, --device and --artifact will be required. ael flash will never pick 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 will never flash a device on their own. A firmware image will reach a board only when you run ael flash and name both the device and the image.
Before it writes
ael flash will check, and refuse 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 will take the device for itself: no other command will be able to flash or monitor it until the flash has finished or failed.
- It will run the board's standard flashing tools for you, with bounded time, and report progress.
- It will release 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 will say so, report what state the device was left in, and tell you how to recover it, such as putting the board back into its bootloader and flashing again. It will never report 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 doctorwill tell you when they are missing.
Related
- Listing devices: finding the device to flash.
- Monitoring a device: showing a device's output after flashing.
- Building a program: firmware images and memory reports.
- Microcontroller boards: the boards planned for the beta, and flashing them.