# Flashing And Programming

Run commands from this release directory:

```bash
cd /home/ranko/Documents/Edge/edge-minimigaga-vga-hdmi-osd-joy-swap-ps2-hotplug-incremental-route/edge-minimigaga-vga-hdmi/releases/2026-04-21_ps2-hotplug-incremental-route
```

## Program over JTAG

This loads the FPGA immediately but does not write SPI flash:

```bash
./flash_tools/program_edge_release.sh
```

Expected success line:

```text
SUCCESS: programmed bitstream into xc7a35t_0
```

## Flash SPI

This writes `minimig_edge_top.bin` to the board SPI flash:

```bash
./flash_tools/flash_edge_release.sh
```

After flashing, power-cycle the board and verify it boots from flash.

## Optional overrides

```bash
EDGE_TARGET_FILTER=Digilent ./flash_tools/program_edge_release.sh
EDGE_CFGMEM_PART=auto ./flash_tools/flash_edge_release.sh
```

Defaults:

- FPGA part: `xc7a35t`
- JTAG frequency: `3000000 Hz`
- Bitstream: release-local `minimig_edge_top.bit`
- Flash image: release-local `minimig_edge_top.bin`
- Default flash part: `s25fl064l-spi-x1_x2_x4`
