add static webpage to flash the firmware

This commit is contained in:
Victor Talpaert
2026-04-09 14:11:42 +02:00
parent 49e2d4ad3b
commit 52fc4af8a8
5 changed files with 547 additions and 33 deletions

39
.github/workflows/pages.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Deploy Pages
on:
workflow_run:
workflows: ["Release Firmware"]
types: [completed]
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
contents: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Download all release binaries
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p webpage/firmware
gh release list --limit 100 --json tagName --jq '.[].tagName' | while read tag; do
mkdir -p "webpage/firmware/$tag"
gh release download "$tag" --dir "webpage/firmware/$tag" --pattern "*.bin" 2>/dev/null || true
done
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: webpage/
- id: deployment
uses: actions/deploy-pages@v4

View File

@@ -37,16 +37,22 @@ jobs:
--build-arg BOARD_SPECIFIC_INIT=${{ matrix.board_specific_init }} \
-t esp-scope-${{ matrix.name }} .
- name: Extract binary (${{ matrix.name }})
- name: Extract binaries (${{ matrix.name }})
run: |
docker run --rm esp-scope-${{ matrix.name }} \
cat /workspace/build/esp-scope.bin > esp-scope-${{ matrix.name }}.bin
cat /workspace/build/merged-firmware.bin > esp-scope-${{ matrix.name }}-merged.bin
docker run --rm esp-scope-${{ matrix.name }} \
cat /workspace/build/bootloader/bootloader.bin > esp-scope-${{ matrix.name }}-bootloader.bin
docker run --rm esp-scope-${{ matrix.name }} \
cat /workspace/build/partition_table/partition-table.bin > esp-scope-${{ matrix.name }}-partition-table.bin
docker run --rm esp-scope-${{ matrix.name }} \
cat /workspace/build/esp-scope.bin > esp-scope-${{ matrix.name }}-app.bin
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: esp-scope-${{ matrix.name }}
path: esp-scope-${{ matrix.name }}.bin
path: esp-scope-${{ matrix.name }}-*.bin
release:
needs: build
@@ -77,28 +83,54 @@ jobs:
body: |
## Firmware binaries
| File | Board | Target | LED GPIO | AP-Mode button GPIO |
|------|-------|--------|----------|---------------------|
| `esp-scope-esp32.bin` | Generic ESP32 | esp32 | 2 | 9 |
| `esp-scope-xiao-esp32c6.bin` | Seeed XIAO ESP32C6 | esp32c6 | 8 (built-in yellow LED) | 0 (Boot button) |
Each board ships four files:
## Flashing
| Suffix | Contents | Use for |
|--------|----------|---------|
| `-merged.bin` | Bootloader + partition table + app in one file | Web installer, quick CLI flash |
| `-bootloader.bin` | Bootloader only | Individual flashing |
| `-partition-table.bin` | Partition table only | Individual flashing |
| `-app.bin` | Application only | OTA / app-only update |
### Browser (easiest)
Download the `.bin` for your board above, then flash it in your browser — no drivers or tools needed:
👉 **[https://www.espboards.dev/tools/program/](https://www.espboards.dev/tools/program/)**
Works with Chrome, Edge, or Opera. Connect your ESP via USB, click **Connect to ESP**, select the `.bin` file, and flash.
### Command line
### Generic ESP32 — LED GPIO 2 · AP-mode button GPIO 9
```bash
esptool.py -p <PORT> write_flash 0x0 esp-scope-<variant>.bin
# Flash merged binary (simplest)
esptool.py -p <PORT> -b 460800 write_flash 0x0 esp-scope-esp32-merged.bin
# Or flash components individually
esptool.py -p <PORT> -b 460800 write_flash \
0x1000 esp-scope-esp32-bootloader.bin \
0x8000 esp-scope-esp32-partition-table.bin \
0x10000 esp-scope-esp32-app.bin
```
### Seeed XIAO ESP32C6 — LED GPIO 8 (built-in yellow) · AP-mode button GPIO 0 (Boot)
```bash
# Flash merged binary (simplest)
esptool.py -p <PORT> -b 460800 write_flash 0x0 esp-scope-xiao-esp32c6-merged.bin
# Or flash components individually
esptool.py -p <PORT> -b 460800 write_flash \
0x0 esp-scope-xiao-esp32c6-bootloader.bin \
0x8000 esp-scope-xiao-esp32c6-partition-table.bin \
0x10000 esp-scope-xiao-esp32c6-app.bin
```
Replace `<PORT>` with your serial port (e.g. `/dev/ttyUSB0` or `COM3`).
## Web installer
Flash directly from your browser (Chrome/Edge/Opera) — no tools needed:
👉 **[https://vtalpaert.github.io/esp-scope/](https://vtalpaert.github.io/esp-scope/)**
files: |
esp-scope-esp32/esp-scope-esp32.bin
esp-scope-xiao-esp32c6/esp-scope-xiao-esp32c6.bin
esp-scope-esp32/esp-scope-esp32-merged.bin
esp-scope-esp32/esp-scope-esp32-bootloader.bin
esp-scope-esp32/esp-scope-esp32-partition-table.bin
esp-scope-esp32/esp-scope-esp32-app.bin
esp-scope-xiao-esp32c6/esp-scope-xiao-esp32c6-merged.bin
esp-scope-xiao-esp32c6/esp-scope-xiao-esp32c6-bootloader.bin
esp-scope-xiao-esp32c6/esp-scope-xiao-esp32c6-partition-table.bin
esp-scope-xiao-esp32c6/esp-scope-xiao-esp32c6-app.bin