🐛 fix(xsct): TCL file instead of -eval, add ps7_init, remove broken Vivado ELF path
Fixes found during real hardware test: bitstream_programmer.py: - _program_with_xsct: use TCL file instead of xsct -eval (quit→exit fix) - _run_elf_with_xsct: add reconnect + source ps7_init.tcl after PL config, use target ID 2 instead of name filter, TCL file instead of -eval - _find_ps7_init_tcl: auto-detect ps7_init.tcl from BIT file directory - run_elf: remove Vivado fallback (program_hw_cpu is xsct, not Vivado) - Remove dead _run_elf_with_vivado (Vivado HM can't program PS CPU) flash_programmer.py: - wipe_flash: -erase_only without -erase_all (s25fl256s1 compat fix)
This commit is contained in:
@@ -99,10 +99,11 @@ def wipe_flash(
|
||||
config: Config,
|
||||
callback: ProgressCallback = None,
|
||||
) -> FlashResult:
|
||||
"""Erase the entire QSPI flash using program_flash.
|
||||
"""Erase QSPI flash sectors matching the bootloader image size.
|
||||
|
||||
Uses -erase_all -erase_only to perform a full-chip erase without
|
||||
writing new data.
|
||||
Uses -erase_only to erase only the sectors covered by the BIN file.
|
||||
Avoids -erase_all which fails on some flash chips (e.g. s25fl256s1)
|
||||
that don't report memory density information.
|
||||
|
||||
Args:
|
||||
config: Application configuration (needs fsbl_elf_path).
|
||||
@@ -131,7 +132,7 @@ def wipe_flash(
|
||||
callback("start", "Erasing QSPI flash...")
|
||||
|
||||
cmd = _build_program_flash_cmd_base(flash_tool, config)
|
||||
cmd += ["-erase_all", "-erase_only"]
|
||||
cmd += ["-erase_only"] # Erase sectors matching the BIN size (safer than -erase_all)
|
||||
|
||||
try:
|
||||
result = _run_command(cmd, timeout=300, callback=callback)
|
||||
|
||||
Reference in New Issue
Block a user