-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
This guide will help you get OpenFlash up and running.
- Windows 10/11, macOS 10.15+, or Linux
- No additional drivers needed (uses native USB)
Microcontrollers:
- Raspberry Pi Pico (RP2040) - Recommended for beginners, ~$4
- Raspberry Pi Pico 2 (RP2350) - Enhanced performance, NV-DDR support, ~$5 (v2.3+)
- STM32F4 Black Pill (STM32F411) - Fastest MCU, ~$5 (v1.5+)
- Arduino GIGA R1 WiFi (STM32H747) - Enterprise features, WiFi, ~$60 (v2.3+)
- Teensy 4.0/4.1 (NXP i.MX RT1062) - USB High Speed 480Mbps! ~$20-30 (v2.3.5+) ⚡
- ESP32 - Wireless operation, ~$4 (v1.5+)
- STM32F1 Blue Pill (STM32F103) - Budget option, ~$2
Single Board Computers (v2.3+):
- Raspberry Pi 3B+/4/5/Zero 2W - Linux GPIO, headless server, ~$35-75
- Orange Pi Zero 3/5 - Budget SBC option, ~$15-50
- Banana Pi M2 Zero/M4 Berry/BPI-F3 - RPi alternative, RISC-V option! ~$15-35 (v2.3.5+) 🍌
- Parallel NAND - Any ONFI-compliant chip, 8-bit data bus, 3.3V
- SPI NAND (v1.1+) - GigaDevice, Winbond, Macronix, Micron, Toshiba, XTX
- eMMC (v1.2+) - Samsung, Micron, SanDisk, Toshiba, Kingston
- Go to Releases
- Download the installer for your OS:
- Windows:
OpenFlash-x.x.x-setup.exe - macOS:
OpenFlash-x.x.x.dmg - Linux:
OpenFlash-x.x.x.AppImageor.deb
- Windows:
- Install and run
# Prerequisites
# - Rust 1.70+
# - Node.js 18+
# - Tauri prerequisites (see tauri.app)
git clone https://github.com/openflash/openflash.git
cd openflash/openflash/gui
npm install
cargo tauri buildOpenFlash includes a mock device for testing:
- Launch OpenFlash
- Click "Mock" button
- Select platform to simulate (RP2040, RP2350, STM32F4, Arduino GIGA, etc.)
- Click "Scan" - you'll see "OpenFlash Mock Device"
- Click "Connect"
- Click "Dump NAND"
- Explore the tabs: Hex View, Bitmap, Analysis, AI
The new AI tab provides intelligent analysis of your dumps:
- Load or dump data
- Click the "🤖 AI" tab
- View automatic analysis:
- Patterns - Encrypted, compressed, executable, text regions
- Issues - Bad blocks, bit errors, truncation warnings
- Recovery - Suggested actions with success probability
- Tips - Chip-specific recommendations
OpenFlash v1.7 adds full chip programming capabilities:
- Write entire chip with automatic verification
- Configurable retry count on failures
- Progress tracking with ETA
- Automatic detection of factory bad blocks
- Runtime bad block tracking (erase/program failures)
- Transparent remapping to spare blocks
- Bad block table persistence
- Per-block erase count tracking
- Remaining chip life estimation
- Hot/cold block identification
- Wear distribution statistics
- Track only changed blocks since last backup
- Full and incremental backup chains
- Block-level checksums for change detection
- Clone between compatible chips
- Three modes: Exact, Skip Bad Blocks, Wear-Aware
- Automatic block mapping with bad block handling
- Download
openflash-rp2040.uf2from Releases - Hold BOOTSEL button on Pico
- Connect USB while holding button
- Pico appears as USB drive
- Copy
.uf2file to the drive - Pico reboots automatically
- Download
openflash-stm32f4.binfrom Releases - Flash using one of:
-
DFU: Hold BOOT0, connect USB, use
dfu-util -
ST-Link: Use
st-flashor STM32CubeProgrammer -
probe-rs:
probe-rs run --chip STM32F411CEUx
-
DFU: Hold BOOT0, connect USB, use
- Download
openflash-esp32.binfrom Releases - Install
espflash:cargo install espflash - Flash:
espflash flash openflash-esp32.bin - For WiFi mode: connect to "OpenFlash-XXXX" AP
- Download
openflash-stm32f1.binfrom Releases - Use ST-Link or USB-Serial adapter
- Flash using
st-flashor STM32CubeProgrammer
- Download
openflash-rp2350.uf2from Releases - Hold BOOTSEL button on Pico 2
- Connect USB while holding button
- Pico 2 appears as USB drive
- Copy
.uf2file to the drive - Pico 2 reboots automatically
- Download
openflash-arduino-giga.binfrom Releases - Flash using one of:
-
DFU: Hold BOOT0, connect USB, use
dfu-util -
probe-rs:
probe-rs run --chip STM32H747XIHx - Arduino IDE: Upload via USB (requires bootloader)
-
DFU: Hold BOOT0, connect USB, use
- For WiFi mode: configure via USB serial or connect to "OpenFlash-GIGA" AP
No firmware flashing needed - runs as Linux daemon:
# Install from crates.io
cargo install openflash-firmware-raspberry-pi
# Or build from source
cd openflash/firmware/raspberry_pi
cargo build --release
# Run as daemon (requires root for GPIO)
sudo ./target/release/openflash-gpio
# The daemon listens on Unix socket /tmp/openflash.sock
# Or TCP port 5000 for network accessSimilar to Raspberry Pi:
# Install from crates.io
cargo install openflash-firmware-orange-pi
# Or build from source
cd openflash/firmware/orange_pi
cargo build --release
# Run as daemon (requires root for /dev/mem)
sudo ./target/release/openflash-gpioThe fastest option with USB High Speed (480 Mbit/s):
- Download
openflash-teensy4.hexfrom Releases - Install Teensy Loader from PJRC website
- Press button on Teensy to enter bootloader
- Use Teensy Loader to flash the firmware
Or via command line:
# Build firmware
cd openflash/firmware/teensy4
cargo build --release --target thumbv7em-none-eabihf --features teensy41
# Flash via teensy_loader_cli
teensy_loader_cli --mcu=TEENSY41 -w target/thumbv7em-none-eabihf/release/openflash-firmware-teensy4.hexWhy Teensy 4.x?
- 10-20x faster transfers (USB HS 480Mbps vs USB FS 12Mbps)
- 1GB dump in 3-5 minutes instead of 45 minutes!
- Teensy 4.1: SD card slot for autonomous operation
Similar to Raspberry Pi and Orange Pi:
# Build from source
cd openflash/firmware/banana_pi
cargo build --release
# Run as daemon (requires root)
sudo ./target/release/openflash-gpio
# For network access
sudo ./target/release/openflash-gpio --tcp 0.0.0.0:5000Supported boards:
- M2 Zero (Allwinner H3) - RPi Zero form factor
- M4 Berry (Allwinner H618) - RPi 4 alternative
- BPI-F3 (SpacemiT K1) - RISC-V architecture!
Connect to SBC-based programmers (Raspberry Pi, Orange Pi, Banana Pi) over the network:
- Click "Add Network Device" button
- Enter connection details:
- Name: Friendly name (e.g., "Lab Pi 4", "Banana Pi F3")
- Address: IP address or hostname
- Port: Default 5000 for TCP
- Click "Add"
- Device appears in device list with network icon
-
TCP:
tcp://192.168.1.100:5000- Standard network connection -
Unix Socket:
unix:///tmp/openflash.sock- Local connection on same machine
On your Raspberry Pi, Orange Pi, or Banana Pi:
# Start daemon with network access
sudo openflash-gpio --tcp 0.0.0.0:5000
# Or Unix socket only (more secure)
sudo openflash-gpio --socket /tmp/openflash.sock- Hardware Setup - Wire up your NAND chip
- Supported Chips - Check if your chip is supported
- Troubleshooting - Common issues and solutions
OpenFlash v1.8 adds powerful scripting and automation capabilities.
Install the CLI tool and use OpenFlash from terminal:
# Scan for devices
openflash scan
# Detect connected chip
openflash detect
# Read full chip to file
openflash read -o dump.bin
# Write firmware with verification
openflash write -i firmware.bin --verify
# AI analysis with report export
openflash analyze dump.bin -o report.md
# Compare two dumps
openflash compare old.bin new.bin
# Batch processing
openflash batch jobs.toml
# List supported chips
openflash chips --interface spi-nand
# JSON output for scripting
openflash detect -f jsonInstall the Python package:
pip install pyopenflashUse in your scripts:
import openflash
# Connect to device
device = openflash.connect()
# Detect chip
chip = device.detect()
print(f"Found: {chip.manufacturer} {chip.model} ({chip.capacity // 1024 // 1024}MB)")
# Read full dump
dump = device.read_full()
dump.save("dump.bin")
# AI analysis
analysis = openflash.ai.analyze(dump)
print(f"Quality: {analysis.quality_score:.0%}")
print(f"Patterns found: {len(analysis.patterns)}")
# Export report
analysis.export_report("report.md")
# Batch processing
batch = openflash.Batch()
read_id = batch.add_read("Read chip", "dump.bin")
analyze_id = batch.add_analyze("Analyze", read_id)
batch.add_report("Report", "report.md", analyze_id)
results = batch.run(device)Create a TOML file for batch jobs:
# jobs.toml
[[jobs]]
name = "Read chip"
type = "read"
output = "dump.bin"
[[jobs]]
name = "Analyze dump"
type = "analyze"
depends_on = ["Read chip"]
[[jobs]]
name = "Export report"
type = "report"
output = "report.md"
depends_on = ["Analyze dump"]Run with: openflash batch jobs.toml
Use OpenFlash in your CI pipelines:
# GitHub Actions example
- name: Flash firmware
run: |
openflash write -i firmware.bin --verify
openflash read -o verify.bin
openflash compare firmware.bin verify.binOpenFlash v2.0 adds enterprise features for production environments.
Start OpenFlash as a server for remote operation:
# Start server on default port 8080
openflash server start
# Start with custom configuration
openflash server start --host 0.0.0.0 --port 8080 --config server.toml
# Check server status
openflash server status --url http://localhost:8080Manage multiple OpenFlash devices:
# List all devices in pool
openflash device list
# Add a device to the pool
openflash device add --name "Programmer 1" --uri "serial:///dev/ttyUSB0" --platform RP2040
# Add device with tags
openflash device add --name "Production Line A" --uri "tcp://192.168.1.100:5000" --tags production,high-speed
# Remove device from pool
openflash device remove dev-001Submit and manage jobs across multiple devices:
# Submit a read job
openflash job submit read dump.bin
# Submit with specific device
openflash job submit write firmware.bin --device dev-002
# Submit with priority
openflash job submit analyze dump.bin --priority high
# Check job status
openflash job status 123
# List all jobs
openflash job list --status running
# Cancel a job
openflash job cancel 123Use multiple devices for faster dumps:
# Parallel dump with 4 devices
openflash parallel-dump -o dumps/ --devices 4
# Custom chunk size
openflash parallel-dump -o dumps/ --devices 4 --chunk-size 64M
# Without merging (keep individual chunks)
openflash parallel-dump -o dumps/ --devices 4 --merge falseConfigure OpenFlash for production environments:
# Start production mode
openflash production start -c production.toml
# Check production status
openflash production status --line line-001Example production configuration:
# production.toml
[line]
id = "line-001"
name = "Assembly Line A"
auto_start = true
verification = "full"
[[stations]]
id = "station-001"
name = "Flash Station"
device_id = "dev-001"
[[stations.operations]]
type = "detect_chip"
expected = "K9F1G08U0E"
[[stations.operations]]
type = "erase"
full = true
[[stations.operations]]
type = "program"
firmware_path = "/firmware/latest.bin"
verify = true
[pass_criteria]
max_bad_blocks = 20
max_ecc_corrections = 100
min_match_percent = 99.9
max_time_secs = 300
[logging]
enabled = true
log_dir = "./production_logs"
format = "json"Access OpenFlash via HTTP API:
# Get server status
curl http://localhost:8080/api/v1/status
# List devices
curl http://localhost:8080/api/v1/devices
# Submit job
curl -X POST http://localhost:8080/api/v1/jobs \
-H "Content-Type: application/json" \
-d '{"name": "Read job", "job_type": "read", "params": {"output": "dump.bin"}}'
# Get job status
curl http://localhost:8080/api/v1/jobs/123Connect to WebSocket for live updates:
const ws = new WebSocket('ws://localhost:8080/ws');
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.type === 'JobUpdate') {
console.log(`Job ${msg.job_id}: ${msg.status} (${msg.progress}%)`);
}
};
// Subscribe to job updates
ws.send(JSON.stringify({ type: 'Subscribe', job_ids: [123, 124] }));