flash_run
Flash firmware to Telink chips, read back flash content, or reset the chip using bdt.exe. Supports writing, reading, and erasing flash, core, analog, and OTP memory.
Instructions
Invoke Telink bdt.exe to write/read flash/core/otp/analog or reset the chip. Reads builder.json 'flash' section for defaults (chip, bdt_path). Use wf to flash firmware (auto-picks latest .bin from build_variants if no input_file), rst -f to reset, rf to read back. Auto-resets after wf unless reset_after_flash=false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chip | No | bdt chip prefix, e.g. 'TL721X','B80','TC321X'. Empty = builder.json flash.default_chip or inferred from presets. | |
| size | No | -s size like '512k','12k'. | |
| erase | No | Add -e (erase before write). | |
| address | No | Flash/core/analog address (decimal). | |
| command | No | bdt command. wf=write flash, rf=read flash, wc/rc=core, wa/ra=analog, wo/ro=otp, lf=lock flash, rst=reset (-f flash/-c core), pc=print code/PC (-i optional .lst), ac=analyze chip (evk), sws=set sws (evk), help=help. | wf |
| dry_run | No | Print bdt command without executing. | |
| project | No | Project root. Defaults to cwd. | |
| timeout | No | Override per-op timeout in seconds. | |
| input_file | No | -i input file path (.bin). Empty for wf = latest artifact under build_variants. | |
| output_file | No | -o output file path for rf/rc/ro. |