feat: flash phase tracking, erase checkbox, flash_model config

Step 2 UI now shows real-time flash operation phases parsed from program_flash output:
- Erase: "Performing Erase Operation..." → sf erase → Erased: OK
- Program: "Performing Program Operation..." → write blocks 0%→100%
- Verify: "Performing Verify Operation..." → read+cmp 0%→100%

Configuration additions:
- erase_before_program checkbox: controls whether to pre-erase before programming
- flash_model: chip type for capacity reference (s25fl256s1 = 32 MiB)

subprocess_utils.py now emits 'phase' callbacks (erase/program/verify/done)
detected from program_flash output transitions.
This commit is contained in:
Jeremy Shen
2026-06-10 13:39:11 +08:00
parent 2c48224aea
commit ea3e3b8ac7
6 changed files with 101 additions and 17 deletions
+4
View File
@@ -22,9 +22,13 @@ bootloader_elf_path: ""
# bootloader_bin_path is the bootloader image to program into QSPI flash
# fsbl_elf_path is the FSBL (First Stage Boot Loader) required by program_flash
# flash_type sets the QSPI interface mode (qspi-x4-single, qspi-x8-dual_parallel, etc.)
# flash_model determines chip capacity: s25fl256s1=32MiB, s25fl128s=16MiB, etc.
# erase_before_program: if true, erase flash sectors before programming
bootloader_bin_path: ""
fsbl_elf_path: ""
flash_type: "qspi-x4-single"
flash_model: "s25fl256s1"
erase_before_program: true
# Firmware upload (Step 4: Load Main Program via TFTP)
firmware_bin_path: ""