|
| 1 | +--- |
| 2 | +title: Flashing a New Image to the UNO Q |
| 3 | +description: Learn how to flash a new image (the Linux OS) to the UNO Q board using the Arduino Flasher CLI. |
| 4 | +tags: [UNO Q, Arduino] |
| 5 | +author: Karl Söderby |
| 6 | +--- |
| 7 | + |
| 8 | +The [Arduino® UNO Q](https://store.arduino.cc/products/uno-q) runs a Linux operating system (OS), which comes pre-installed on the board. |
| 9 | + |
| 10 | +There is often no need to re-install the OS on your board (also known as flashing an image), as the OS automatically receives updates regularly. |
| 11 | + |
| 12 | +However, if we want to hard-reset the board and perform a fresh installation, it is possible. This process requires some additional tools installed on your machine. |
| 13 | + |
| 14 | +***Note that the instructions in this tutorial will wipe the board clean, and files & configurations saved on the board will be destroyed.*** |
| 15 | + |
| 16 | +## Requirements |
| 17 | + |
| 18 | +### Hardware Requirements |
| 19 | + |
| 20 | +- [Arduino® UNO Q](https://store.arduino.cc/products/uno-q) |
| 21 | +- [USB-C® cable](https://store.arduino.cc/products/usb-cable2in1-type-c) |
| 22 | +- Female-to-female jumper wire |
| 23 | + |
| 24 | +### Software Requirements |
| 25 | + |
| 26 | +To re-flash the board, we will use the **Arduino Flasher CLI** tool: |
| 27 | + |
| 28 | +- Download the [Arduino Flasher CLI](https://www.arduino.cc/en/software/) |
| 29 | + |
| 30 | +***Note that this tool will download an image with a size that exceeds 1 GB. A stable Internet connection is recommended.*** |
| 31 | + |
| 32 | +## Download & Install CLI Tool |
| 33 | + |
| 34 | +1. Download the [Arduino Flasher CLI](https://www.arduino.cc/en/software/) for your OS (MacOS / Linux / Windows) |
| 35 | +2. Unzip the downloaded file, (you will receive a executable binary named `arduino-flasher-fli`) |
| 36 | + |
| 37 | +### Verify Tool Is Installed |
| 38 | + |
| 39 | +Before flashing a new image, check that the `arduino-flasher-cli` tool is working. Below are instructions to verify the tool is installed and working on your OS. |
| 40 | + |
| 41 | +#### MacOS |
| 42 | + |
| 43 | +Navigate to the unzipped folder (e.g. `arduino-flasher-cli-x.x.x-darwin-arm64`), and run the following command: |
| 44 | + |
| 45 | +``` |
| 46 | +./arduino-flasher-cli |
| 47 | +``` |
| 48 | + |
| 49 | +You should see something like: |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board). |
| 54 | + |
| 55 | +#### Linux |
| 56 | + |
| 57 | +Navigate to the unzipped folder (e.g. `arduino-flasher-cli-x.x.x-darwin-arm64`), and run the following command: |
| 58 | + |
| 59 | +``` |
| 60 | +./arduino-flasher-cli |
| 61 | +``` |
| 62 | + |
| 63 | +You should see something like: |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board). |
| 68 | + |
| 69 | +#### Windows |
| 70 | + |
| 71 | +Navigate to the unzipped folder (e.g. `arduino-flasher-cli-x.x.x-darwin-arm64`), and run the following command: |
| 72 | + |
| 73 | +``` |
| 74 | +arduino-flasher-cli |
| 75 | +``` |
| 76 | + |
| 77 | +A new window should appear, prompting you to install the driver. Install it, and run `arduino-flasher-cli` again in the terminal. |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board). |
| 82 | + |
| 83 | +## Preparing the Hardware |
| 84 | + |
| 85 | +To prepare the hardware for flashing, follow the instructions below: |
| 86 | + |
| 87 | +1. Disconnect the board from your computer. |
| 88 | +2. Add the female-to-female jumper cable between the two pins specified in the image: |
| 89 | + |
| 90 | +  |
| 91 | + |
| 92 | +3. Do **not** connect the board to the computer yet. This will need to be timed in the next step. |
| 93 | + |
| 94 | +## Flash Image to the Board |
| 95 | + |
| 96 | +In this step, we will upload the new image to the board using the Arduino Flasher CLI. |
| 97 | + |
| 98 | +1. Open a terminal and navigate to the directory where you unzipped the Arduino Flasher CLI (normally `/Downloads`). |
| 99 | +2. Type the following command in the terminal: `./arduino-flasher-cli flash latest` **but do not press Enter yet** |
| 100 | +3. **Connect the board to the computer**, and press **Enter** to run the command **during the boot animations** on the LED matrix (immediately after plugging in). You only need the jumper to force recovery at plug-in; **you may remove it after you run the command**. |
| 101 | +4. A download sequence will begin (the image is >1 GB). Once the download is complete, it will flash the board with the new image. **Please note:** this will take several minutes. Do **not** disconnect the USB cable during this process. |
| 102 | +5. Once flashing completes and the tool reports success, **power-cycle** the board (unplug and re-plug USB) so it boots the new OS. (Ensure the jumper is removed before the power-cycle.) |
| 103 | + |
| 104 | +***It is important to run the flashing command ONLY when the board is booting up; it does not work once the OS has finished booting.*** |
| 105 | + |
| 106 | + |
| 107 | +## Troubleshooting |
| 108 | + |
| 109 | +- Ensure the Arduino Flasher CLI is unzipped and accessible. |
| 110 | +- Check that the correct pins are shorted, and that they are shorted **before** connecting the board to the computer. |
| 111 | +- Make sure the board has not finished booting when running the flashing command (`./arduino-flasher-cli flash latest`). |
| 112 | +- Verify that you are running the command from the correct directory where the Arduino Flasher CLI was unzipped. |
| 113 | +- After the tool reports a successful installation, **power-cycle** the board **with the jumper removed.** |
0 commit comments