> 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-fpv/firmware.md).

# Firmware

The ARK FPV ships with PX4. It also runs ArduPilot and Betaflight. The ARK FPV 32X uses the same build targets.

PX4 main starts the LSM6DSV32X on an ARK FPV 32X (`ARKFPV001`). [PX4 1.18 support](https://github.com/PX4/PX4-Autopilot/pull/29375) is in review. ArduPilot master starts it too. The [ArduPilot 4.7 backport](https://github.com/ArduPilot/ardupilot/pull/34484) is open. The published Betaflight `ARK_FPV` target selects the IIM-42653.

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

## PX4

### Flashing Firmware

Firmware can be flashed over USB C using [QGroundControl](https://qgroundcontrol.com/).

### Building Firmware

```
make ark_fpv_default
```

and optionally upload

```
make ark_fpv_default upload
```

## ArduPilot

### Flashing Firmware

Firmware can be flashed over USB C using [QGroundControl](https://qgroundcontrol.com/).

### Building Firmware

```
./waf configure --board ARK_FPV
./waf copter
```

and optionally upload

```
./waf copter --upload
```

## Betaflight

{% hint style="info" %}
The published Betaflight `ARK_FPV` target selects the IIM-42653. On an ARK FPV 32X that leaves the IMU stopped.
{% endhint %}

### Building Firmware

See the official [Betaflight documentation](https://betaflight.com/docs/development/building/Building-in-Ubuntu) for setting up the development environment.

If you flash your flight controller using DFU via <https://app.betaflight.com/>, build the `.hex`:

```
make hex CONFIG=ARK_FPV
```

If you flash your flight controller using ST-Link, build the `.bin`:

```
make binary CONFIG=ARK_FPV
```

### Flash using DFU mode via web app

Betaflight can be flashed using DFU over USB C.

1. With the board unpowered, hold the button next to the USB C port while connecting the USB cable to your PC.
2. Open <https://app.betaflight.com/> in Chrome or Edge.
3. Select `Firmware Flasher`\
   Toggle the sliders `Enable Expert Mode` and `Show release candidates` and select:\
   \- `Development`\
   \- `ARK_FPV`\
   \- `4.6.0-dev [latest]`\
   ![](https://1515919775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwmEn1N45AR4WjMQhHlu%2Fuploads%2FiizmGiPj2RTtrpINBvt6%2Fimage.png?alt=media\&token=4522c066-5bde-47c8-8731-57fe8f946de4)
4. Now select the `Load Firmware [Online]`\
   ![](https://1515919775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwmEn1N45AR4WjMQhHlu%2Fuploads%2Fy0RolNUQ2ZMojwiwLDsX%2Fimage.png?alt=media\&token=bd4dcadb-e1c1-48f4-ad8c-5c4887e0bef0)
5. You could also flash your own build\
   \- Select the `Load Firmware [Local]`\
   \- In this case you need a `.hex`\
   ![](https://1515919775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwmEn1N45AR4WjMQhHlu%2Fuploads%2F1jyPlQRm3UNOXUGXA7E7%2Fimage.png?alt=media\&token=3fea5a5d-be6c-473d-9750-3ee93072de71)<br>
6. Now select `Flash Firmware`

{% hint style="info" %}
Betaflight does not have a separate bootloader. If you want to re-flash back to PX4 or Ardupilot after flashing Betaflight, you will need to re-flash the PX4 bootloader. See [Bootloader Flashing Using DFU](/products/flight-controller/ark-fpv/firmware/bootloader-flashing-using-dfu.md).
{% endhint %}

### Flash using ST-Link

For detailed instructions on ST-LINK setup, software installation, and usage, see the [ST-LINK Flashing Guide](/knowledge-base/knowledge-base/st-link-flashing-guide.md).

Connect to the 6-pin debug connector and flash:

```
st-flash write obj/ARK_FPV.bin 0x08000000
```

## Bootloader

The default ARK FPV PX4 bootloader works with PX4 and ArduPilot. DFU over USB C flashes or reflashes it.

{% content-ref url="/pages/yQiTjlhHUOPqAqSTan2e" %}
[Bootloader Flashing Using DFU](/products/flight-controller/ark-fpv/firmware/bootloader-flashing-using-dfu.md)
{% endcontent-ref %}


---

# 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-fpv/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.
