# `mix firmware`
[🔗](https://github.com/nerves-project/nerves/blob/v1.14.1/lib/mix/tasks/firmware.ex#L11)

Build a firmware image for the selected target platform.

This task builds the project, combines the generated OTP release with
a Nerves system image, and creates a `.fw` file that may be written
to an SDCard or sent to a device.

## Command line options

  * `--verbose` - produce detailed output about release assembly
  * `--output` - (Optional) The path to the .fw file used to write the patch
    firmware. Defaults to `Nerves.Env.firmware_path/1`
## Environment variables

  * `NERVES_SYSTEM`    - may be set to a local directory to specify the Nerves
    system image that is used

  * `NERVES_TOOLCHAIN` - may be set to a local directory to specify the
    Nerves toolchain (C/C++ crosscompiler) that is used

---

*Consult [api-reference.md](api-reference.md) for complete listing*
