> ## Documentation Index
> Fetch the complete documentation index at: https://qualcomm-3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Flash software images (Windows)

## Introduction

Flash a prebuilt image onto a device. While Qualcomm hardware typically comes with a preloaded image, you can use this procedure to update to a newer software version or deploy images built from source.

To flash a prebuilt image, the following steps are required:

* Set up a workspace – [Set up workspace](#set-up-workspace)
* Download the packages required for flashing the image – [Download Required Packages](#download-required-packages)
* Obtain flashable image – [Obtain Flashable Image](#obtain-flashable-image)
* Identify storage configuration for your device – [Identify Storage Configuration](#identify-storage-configuration)
* Select the appropriate CDT based on the reference kit – [Configure CDT](#configure-cdt)
* Switch device to EDL mode – [Switch device to EDL Mode](#switch-device-to-edl-mode)
* Provision UFS – [Provision UFS](#provision-ufs)
* Flash SAIL – [Flash SAIL](#flash-sail)
* Flash software image – [Flash software image](#flash-software-image)

## Set up workspace

Open a PowerShell instance and navigate to preferred workspace path. This is where
you'll download and extract QDL, download the flashable image, and flash the image
onto the device.

```powershell theme={null}
cd <workspace-directory>
```

## Download required packages

QDL is a software utility used to communicate with Qualcomm USB
devices in Emergency Download (EDL) mode, enabling you to upload
a flash loader and program software images onto the device. Follow
these steps to download and setup QDL on your system:

* Download the QDL binary from the Qualcomm Software Center using the following
  command:

  <CodeGroup>
    ```powershell Windows x64 theme={null}
    Invoke-WebRequest -Uri "https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Device_Loader/Windows/latest.zip" -OutFile qdl.zip
    ```

    ```powershell Windows ARM theme={null}
    Invoke-WebRequest -Uri "https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Device_Loader/Windows/ARM64/latest.zip" -OutFile qdl.zip
    ```
  </CodeGroup>

* Extract the downloaded archive:

  ```powershell theme={null}
  Expand-Archive -Path qdl.zip -DestinationPath .
  ```

* Add the QDL executable to your user PATH:
  * Press **Win + S**, search for `environment variables`, and open
    **Edit environment variables for your account**.
  * Under **User variables**, select **Path** and click **Edit**.
  * Click **New** and add the full path to `<unzipped-qdl-directory>`.
  * Click **OK** on each open dialog to save the changes.

    <Note>
      Restart PowerShell for the updated PATH to take effect.
    </Note>

    <img src="https://mintcdn.com/qualcomm-3/r0hcqjExbWIpylyO/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/user-environment.png?fit=max&auto=format&n=r0hcqjExbWIpylyO&q=85&s=018916887be5fd152ba91141cd8b177f" alt="Setup Environment Variables" width="844" height="679" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/user-environment.png" />

* Verify that the QDL executable is accessible:

  ```powershell theme={null}
  qdl.exe --version
  ```

* Run `install_driver.bat` from the extracted QDL directory to install the QDL
  driver.
  * In File Explorer, navigate to `<unzipped-qdl-directory>`.
  * Right-click `install_driver.bat` and select **Run as administrator**.

## Obtain flashable image

Before flashing, you need a flashable image directory on your host machine.
Depending on how you obtained your image, choose one of the following paths.

<Tabs>
  <Tab title="Prebuilt Image">
    Prebuilt images are distributed as compressed archives. Download the archive for your
    device from the [Obtain Prebuilt Images](/Key-Documents/Flash-Guide/obtain-prebuilts)
    section, extract the archive, and go to the extracted directory.

    * Extract the archive:

      ```powershell theme={null}
      Expand-Archive -Path <prebuilt-image>.zip -DestinationPath .
      ```

    * Go to the extracted directory:

      ```powershell theme={null}
      cd <unzipped-image-directory>\images\<machine>\<image>-<machine>
      ```
  </Tab>

  <Tab title="Compiled Image">
    After a successful build, the flashable image directory is already present in
    your build output. Navigate directly to it.

    ```powershell theme={null}
    cd build\tmp\deploy\images\<machine>\<image>-<machine>.rootfs.qcomflash
    ```
  </Tab>
</Tabs>

<Warning>
  All subsequent instructions are expected to be run from this directory unless
  stated otherwise.
</Warning>

## Identify storage configuration

Machine configurations come with either UFS or eMMC storage enabled by default,
and these settings are reflected in the prebuilt images. If you need to modify
the storage type, you must update the configuration and rebuild the image, as
this cannot be changed in prebuilt binaries.

The default storage configurations for supported platforms are

| Machine      | Storage Type |
| :----------- | :----------- |
| IQ-9075-EVK  | UFS          |
| IQ-8275-EVK  | UFS          |
| QCS6490      | UFS          |
| IQ-615-EVK   | EMMC         |
| IQ-X7181-EVK | UFS/SPINOR   |
| IQ-X5121-EVK | UFS/SPINOR   |

## Configure CDT

The configuration data table (CDT) contains device-specific information required
for proper platform initialization. You need to select the correct CDT file based
on your reference kit before flashing.

<Tabs>
  <Tab title="QCS6490/QCS5430">
    * Multiple CDT binaries are provided as part of the qcomflash tarball.
      Choose the correct CDT binary for your kit and replace the default `cdt.bin`
      with the appropriate one.

          <CodeGroup>
            ```powershell Rb3Gen2 Core Kit theme={null}
            cp cdt_core_kit.bin cdt.bin
            ```

            ```powershell Rb3Gen2 Vision Kit theme={null}
            cp cdt_vision_kit.bin cdt.bin
            ```

            ```powershell Rb3Gen2 Industrial Kit theme={null}
            cp cdt_industrial_kit.bin cdt.bin
            ```

            ```powershell Rb3Gen2 Industrial Mezz Kit theme={null}
            cp cdt_industrial_mezz_kit.bin cdt.bin
            ```
          </CodeGroup>

    * After the entire flashing process succeeds, you can verify that the correct CDT
      is loaded by reviewing the UEFI serial logs. Use the *Subtype* field to identify
      the CDT loaded onto your device.

      ```text Sample output theme={null}
      Platform Init [ 1966] BDS
      Platform : IOT
      Subtype : 2
      Boot Device : UFS
      Chip Name : QCS6490
      Chip Ver : 1.0
      ```

      | Subtype | Platform Description          |
      | ------- | ----------------------------- |
      | 2       | Vision Kit (Moselle attach)   |
      | 5       | RB3Gen2 Core Kit (HSP attach) |
      | 7       | Vision Kit (HSP attach)       |
      | 9       | Industrial Kit                |
      | 13      | Industrial Mezz Kit           |
  </Tab>

  <Tab title="IQ-X7181/IQ-X5121">
    * Download the CDT binary from [CodeLinaro](https://artifacts.codelinaro.org/ui/native/codelinaro-le/Qualcomm_Linux/X1E80100/cdt/):

      ```powershell theme={null}
      Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/cdt/IQ-X.1.4-EVK-CDT.tar.gz" -OutFile IQ-X.1.4-EVK-CDT.tar.gz
      ```

    * Extract the tarball archive:

      ```powershell theme={null}
      tar -xzf IQ-X.1.4-EVK-CDT.tar.gz
      ```

    * Go to the extracted directory:

      ```powershell theme={null}
      cd IQ-X.1.4-EVK-CDT
      ```

    * Flash the CDT:

      ```powershell theme={null}
      qdl.exe --storage spinor xbl_s_devprg_ns.melf rawprogram0_BLANK_GPT.xml
      qdl.exe --storage spinor xbl_s_devprg_ns.melf rawprogram0_WIPE_PARTITIONS.xml
      qdl.exe xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml
      ```

    * Navigate back to the previous directory:
      ```powershell theme={null}
      cd ..
      ```
  </Tab>

  <Tab title="Other Kits">
    * For IQ-9075, IQ-8275, and IQ-615 kits, the default `cdt.bin` included in the
      qcomflash tarball is already the correct CDT for your kit. No action is
      required to select a CDT before flashing.
  </Tab>
</Tabs>

## Switch device to EDL mode

The device must be in the EDL mode before you flash the software image.
The Qualcomm supported device by default enters EDL mode if there is no
image on the device after power up or if it's corrupted. Follow these
steps to force the device into EDL mode.

<Tabs>
  <Tab title="QCS6490/QCS5430">
    * Press and hold the **F\_DL** button.
          <img src="https://mintcdn.com/qualcomm-3/gHCjmHHn0mCw4aoT/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/RB3Gen2_device.png?fit=max&auto=format&n=gHCjmHHn0mCw4aoT&q=85&s=703cfbf2aa9a36ed66902850505132a6" alt="Figure: RB3Gen2_device" width="1001" height="710" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/RB3Gen2_device.png" />
    * Connect the device to a **+12 V wall power supply**.
    * Connect the device to the host system through the USB Type-C connector.
    * Release the **F\_DL** button. The device is now in EDL mode.
    * Unplug the power cable once the entire flashing process is complete to exit EDL mode.
  </Tab>

  <Tab title="IQ-9075">
    <Tabs>
      <Tab title="IQ-9 Beta Evaluation Kit (EVK)">
        * Connect the device to a **+12 V wall power supply**.
        * Connect the device to the host system through the USB Type-C connector.
        * Put the device in EDL mode by turning on the dip switch S5-4.
                  <img src="https://mintcdn.com/qualcomm-3/gHCjmHHn0mCw4aoT/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png?fit=max&auto=format&n=gHCjmHHn0mCw4aoT&q=85&s=c8a7db2d8a50022b1805fbb397ae92ab" alt="Figure: qcs9075_qdl_mode_manual" width="1094" height="305" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png" />
        * Turn off the S5-4 dip switch after the entire flashing process is complete.
      </Tab>

      <Tab title="IQ-9075 EVK">
        * Connect the device to a **+12 V wall power supply**.
        * Connect the device to the host system through the USB Type-C connector.
        * Put the device in EDL mode by turning on the dip switch SW2-3.
                  <img src="https://mintcdn.com/qualcomm-3/gHCjmHHn0mCw4aoT/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png?fit=max&auto=format&n=gHCjmHHn0mCw4aoT&q=85&s=dbf27f6e051908e2e87549067f79c3f8" alt="Figure: IQ_9075_EVK" width="1131" height="318" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png" />
        * Turn off the SW2-3 dip switch once the entire flashing process is complete.
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="IQ-8275">
    <Tabs>
      <Tab title="IQ-8 Beta Evaluation Kit (EVK)">
        * Connect the device to a **+12 V wall power supply**.
        * Connect the device to the host system through the USB Type-C connector.
        * Put the device in EDL mode by turning on the dip switch S5-4.
                  <img src="https://mintcdn.com/qualcomm-3/gHCjmHHn0mCw4aoT/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png?fit=max&auto=format&n=gHCjmHHn0mCw4aoT&q=85&s=c8a7db2d8a50022b1805fbb397ae92ab" alt="Figure: qcs9075_qdl_mode_manual" width="1094" height="305" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png" />
        * Turn off the S5-4 dip switch once the entire flashing process is complete.
      </Tab>

      <Tab title="IQ-8275 EVK">
        * Connect the device to a **+12 V wall power supply**.
        * Connect the device to the host system through the USB Type-C connector.
        * Put the device in EDL mode by turning on the dip switch S2-8.
                  <img src="https://mintcdn.com/qualcomm-3/gHCjmHHn0mCw4aoT/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png?fit=max&auto=format&n=gHCjmHHn0mCw4aoT&q=85&s=dbf27f6e051908e2e87549067f79c3f8" alt="Figure: IQ_9075_EVK" width="1131" height="318" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png" />
        * Turn off the S2-8 dip switch once the entire flashing process is complete.
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="IQ-615">
    * Connect the device to a **+12 V wall power supply**.
    * Connect the device to the host system through the USB Type-C connector.
    * Put the device in EDL mode by turning off the SW switch and turning on the dip switch SW3-4.
          <img src="https://mintcdn.com/qualcomm-3/gHCjmHHn0mCw4aoT/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs615_qdl_mode_manual.png?fit=max&auto=format&n=gHCjmHHn0mCw4aoT&q=85&s=36ccf03484f9aa79835f2a7b34a6c10d" alt="Figure: qcs615_qdl_mode_manual" width="800" height="667" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs615_qdl_mode_manual.png" />
    * Turn on the SW switch and turn off the SW3-4 dip switch once the entire flashing process is complete.
  </Tab>

  <Tab title="IQ-X7181/IQ-X5121">
    * Connect the device to a **+12 V wall power supply**.
    * Connect the device to the host system through the USB Type-C connector.
    * Put the device in EDL mode by turning on the S2-4 switch.
          <img src="https://mintcdn.com/qualcomm-3/gHCjmHHn0mCw4aoT/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/x7181_edl_mode_manual.png?fit=max&auto=format&n=gHCjmHHn0mCw4aoT&q=85&s=b2f73b1f22fa4b967ddb62a597fddd28" alt="Figure: x7181_edl_mode_manual" width="1429" height="718" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/x7181_edl_mode_manual.png" />
    * Turn off the S2-4 dip switch once the entire flashing process is complete.
  </Tab>
</Tabs>

Verify if the device is in EDL mode by opening **Device Manager** and confirming
that a Qualcomm USB device appears. The device should **not** appear under
**COM Ports**.

<img src="https://mintcdn.com/qualcomm-3/r0hcqjExbWIpylyO/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/device-manager.jpg?fit=max&auto=format&n=r0hcqjExbWIpylyO&q=85&s=204abad9c1b45fbbbe963e2f41ee0094" alt="Check Device Manager" width="1027" height="848" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/device-manager.jpg" />

## Provision UFS

Universal flash storage (UFS) provisioning helps to divide the storage
into many LUNs, which stores different types of data separately. This
improves access efficiency and system organization.

UFS is provisioned by default. If there are any changes in LUNs, UFS
must be re-provisioned. To check if UFS needs to be re-provisioned,
see the table *UFS Provision* in the [Release Specific Information](/Key-Documents/Software-Release-Notes/release-specific-information#ufs-provision)
document.

* Download the provision file from Qualcomm's artifacts server:

  <CodeGroup>
    ```powershell IQ-9075-EVK theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/QCS9100/provision.zip" -OutFile provision.zip
    ```

    ```powershell IQ-8275-EVK theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/QCS8300/provision.zip" -OutFile provision.zip
    ```

    ```powershell QCS6490 theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/QCS6490/provision.zip" -OutFile provision.zip
    ```

    ```powershell IQ-X7181 theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/provision_default.zip" -OutFile provision.zip
    ```

    ```powershell IQ-X5121 theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/provision_default.zip" -OutFile provision.zip
    ```
  </CodeGroup>

* Extract the downloaded archive:
  ```powershell theme={null}
  Expand-Archive -Path provision.zip -DestinationPath provision
  ```

* Go to the extracted directory:
  ```powershell theme={null}
  cd provision
  ```

* Provision UFS:

  <CodeGroup>
    ```powershell IQ-9075-EVK theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf provision_1_2.xml
    ```

    ```powershell IQ-8275-EVK theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf provision_1_3.xml
    ```

    ```powershell QCS6490 theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf provision_1_3.xml
    ```

    ```powershell IQ-X7181 theme={null}
    qdl.exe --storage ufs xbl_s_devprg_ns.melf provision.xml
    ```

    ```powershell IQ-X5121 theme={null}
    qdl.exe --storage ufs xbl_s_devprg_ns.melf provision.xml
    ```
  </CodeGroup>

<Note>
  After UFS provisioning completes, the device disconnects from USB. Toggle
  the power switch off and on to reboot it back into EDL mode before continuing.
</Note>

* Navigate back to the previous directory:
  ```powershell theme={null}
  cd ..
  ```

## Flash SAIL

Safety Island (SAIL) image contains the isolated, safety‑critical firmware that
runs on the dedicated safety island to ensure secure boot and reliable system
operation are independent of the main processor.

<Note>
  Safety Island (SAIL) is applicable only for the Qualcomm Dragonwing™ IQ-9075
  and the Qualcomm Dragonwing™ IQ-8275 development kits. If you're not using one
  of these development kits, skip this section.
</Note>

* The SAIL artifacts are present under the `sail_nor` directory within the
  unpacked qcomflash directory. Go to the following directory:
  ```powershell theme={null}
  cd sail_nor
  ```

* Flash the SAIL:
  ```powershell theme={null}
  qdl.exe --storage spinor prog_firehose_ddr.elf rawprogram0.xml patch0.xml
  ```

* Navigate back to the previous directory:
  ```powershell theme={null}
  cd ..
  ```

## Flash software image

This section describes how to flash the image using QDL
and verify a successful flashing process.

* Flash the software image using QDL by selecting the appropriate storage option.

  <CodeGroup>
    ```powershell UFS theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf rawprogram0.xml rawprogram1.xml rawprogram2.xml rawprogram3.xml rawprogram4.xml rawprogram5.xml patch0.xml patch1.xml patch2.xml patch3.xml patch4.xml patch5.xml
    ```

    ```powershell EMMC theme={null}
    qdl.exe --storage emmc prog_firehose_ddr.elf rawprogram0.xml rawprogram1.xml patch0.xml patch1.xml
    ```

    ```powershell UFS/SPINOR theme={null}
    cd spinor
    qdl.exe --storage spinor xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml
    cd ..
    qdl.exe --storage ufs xbl_s_devprg_ns.melf rawprogram0.xml rawprogram1.xml patch0.xml patch1.xml
    ```
  </CodeGroup>

* Flashing is successful if you see *partition 1 is now bootable* on the
  terminal window as shown in the following message:
  ```text Sample output theme={null}
  partition 1 is now bootable
  ```

* If flashing fails, perform the following steps and retry the flashing procedure:
  * Power off the device
  * Disconnect from the host
  * Restart the host

## Related topics

* [How to flash images using PCAT?](./flash-with-pcat)
* [How to switch to EDL mode using UART?](./how-to-trigger-edl-with-uart)
* [How to switch to EDL mode using ADB?](./how-to-trigger-edl-with-adb)
* [How to configure the storage type for a Yocto BSP build?](/Key-Documents/Yocto-Guide/how-to-configure-storage-type)
* [How to connect to WiFi?](./how-to-connect-to-wifi)
* [How to sign in with SSH?](./how-to-sign-in-with-ssh)
* [How to configure Ethernet with RJ45 port?](./how-to-configure-ethernet-rj45-port)
* [How to update USB and Ethernet Controller firmware?](./how-to-update-usb-ethernet-controller-firmware)
* [How to configure device drivers?](./how-to-configure-device-drivers)
