> For the complete documentation index, see [llms.txt](https://docs.arkelectron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkelectron.com/products/flight-controller/ark-pi6x-flow/firmware.md).

# Firmware

The flight controller runs PX4 1.15 or later, or ArduPilot 4.7 or later. The AFBR-S50LV85D distance sensor on the Pi6X Flow is not supported in ArduPilot.

| Firmware  | Build target                                                                                                     |
| --------- | ---------------------------------------------------------------------------------------------------------------- |
| PX4       | `ark_pi6x_default` ([boards/ark/pi6x](https://github.com/PX4/PX4-Autopilot/tree/main/boards/ark/pi6x))           |
| ArduPilot | `ARK_PI6X` ([hwdef](https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_HAL_ChibiOS/hwdef/ARK_PI6X)) |

The flight controller's USB connects only to the Pi, so firmware is updated from the Pi.

## From the Web UI

Open the [ARK-UI](http://pi6x.local) **Autopilot** page, select the **Firmware** tab, and upload a `.px4` (PX4) or `.apj` (ArduPilot) firmware file.

<figure><img src="https://1515919775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwmEn1N45AR4WjMQhHlu%2Fuploads%2Fgit-blob-3fee3fa2ab27bf9c23b532d753dcb6174701c8b5%2Fark-ui-autopilot-firmware-pi6x.png?alt=media" alt=""><figcaption></figcaption></figure>

## From the Command Line

SSH into the Pi and run the ARK-OS flashing tool (on `PATH`). The update is performed over the USB connection:

```bash
flash_firmware.sh <firmware.px4>
```

## Downloads

* PX4: `ark_pi6x_default.px4` from the [PX4 releases page](https://github.com/PX4/PX4-Autopilot/releases/)
* ArduPilot: [firmware.ardupilot.org](https://firmware.ardupilot.org/), board `ARK_PI6X`

## Bootloader Recovery

If the flight controller does not enumerate over USB, recover the bootloader over SWD on the flight controller debug port: [ST-LINK Flashing Guide](/knowledge-base/knowledge-base/st-link-flashing-guide.md#flashing-px4-flight-controllers).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.arkelectron.com/products/flight-controller/ark-pi6x-flow/firmware.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
