# Firmware Update

This is the firmware setup path. Use it before configuration, bench testing, or flight work.

## 1. Install the required tools

For firmware development and uploads, install:

- Visual Studio Code
- PlatformIO IDE
- Git

On Windows, make sure Git is available on `PATH`.

A common install location is:

```text
C:\Program Files\Git\cmd
```

## 2. Build the firmware

Open the AstroNav Nano project in Visual Studio Code.

You can build it with the PlatformIO Build action or from a terminal:

```powershell
pio run
```

A successful build means the firmware compiled.

It does not mean the hardware or vehicle is safe to fly.

## 3. Upload firmware to the correct board

Only upload to the intended AstroNav Nano and the correct serial port.

Example:

```powershell
pio run --target upload --upload-port COM3
```

Replace `COM3` with the port assigned to your board.

## 4. Connect the board safely

Before connecting the board:

1. Disconnect pyro hardware.
2. Disconnect hazardous loads.
3. Disconnect launch hardware.

Then connect AstroNav Nano to your computer with USB.

Wait for startup to finish, then open the `AstroNav Nano` drive and read:

- `Howto.txt`
- `Settings.ini`

## 5. Understand USB mode

AstroNav Nano enters USB mass-storage mode when it detects USB power.

The normal USB input range is approximately:

```text
4.5 V - 5.5 V
```

If the board sees a voltage outside the supported range, it may report `Unknown` and show warnings or faults. That does not automatically mean the board is damaged, but it does mean you should investigate before continuing.

## 6. What to do next

Once the board is connected and readable:

1. Read [Safety](/safety/)
2. Continue with [Getting Started](/getting-started/)
3. Review [Configuration](/configuration/)
4. Complete [Pre-flight](/pre-flight/)
5. Use [Flight States](/flight-states/) to understand the system during a mission

This page is only for firmware update and setup. The vehicle workflow starts in [Getting Started](/getting-started/).