Use sftool for SiFli flashing, flash readback, JSON config generation, and serial troubleshooting on SF32LB52, SF32LB55, SF32LB56, and SF32LB58 devices.
Use this skill to drive the local sftool CLI for normal SiFli workflows.
SFTOOL_BIN when it is set; otherwise use sftool from PATH.if [ -n "${SFTOOL_BIN:-}" ]; then
"$SFTOOL_BIN" --version
elif command -v sftool >/dev/null 2>&1; then
sftool --version
else
exit 1
fi
if ($env:SFTOOL_BIN) {
& $env:SFTOOL_BIN --version
} elseif (Get-Command sftool -ErrorAction SilentlyContinue) {
sftool --version
} else {
exit 1
}
Error: sftool command not found in PATH or SFTOOL_BIN. Stop and ask the user to install sftool or fix the environment before continuing.sftool, invent a binary path, or continue with hypothetical commands after that error.--chip, --port, addresses, sizes, or file paths.write_flash --verify unless the user explicitly disables verification.erase_flash or write_flash --erase-all unless the user explicitly asks for an entire-flash erase.sftool --help or the relevant subcommand help in the current environment before constructing the final command whenever there is any doubt about the arguments or options.SFTOOL_BIN or sftool.sftool --help and the relevant subcommand help.write_flash for programming.read_flash for dumps and backups.erase_region for targeted erases.config for repeatable JSON-driven runs.nor unless the user says nand or sd.--compat only when the user reports repeated timeouts or verify failures, or asks for the safest transfer mode.stub workflows, inspect sftool stub --help in the current environment before advising.references/commands.md for normal command construction and examples.references/config-examples.md when the user wants JSON config files or automation-friendly templates.references/troubleshooting.md for missing commands, serial errors, timeout handling, and verify failures.assets/base-config.json, assets/write-flash-config.json, and assets/read-flash-config.json instead of recreating JSON templates from scratch.