flash

flash is a command for coding agents from JannLeo/telinksdk-builder-mcp. It costs 31 tokens per session (986 once invoked), scanned A, original, MIT.

A command for working with chips through Telink flashing tools. It can write firmware, read chip memory, reset devices, and run related device commands.

In plain words
What is it for?
Use it to flash the newest or a chosen firmware file, verify and retry a write, read a region of flash memory, erase a chip, or reset a connected device.
Why use it?
It removes the need to remember and assemble the underlying Python and chip-tool commands. It also supports checks, retries, selected input files, and device IDs when those are needed.

Command

Part of the telinksdk-builder plugin — 6 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jannleo/telinksdk-builder-mcp/flash
Clone the repo
git clone --depth 1 https://github.com/JannLeo/telinksdk-builder-mcp

Or install telinksdk-builder, the plugin that ships this one along with the rest of its 6 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flash

README.md
[![agentmods](https://agentmods.dev/badge/commands/jannleo/telinksdk-builder-mcp/flash.svg)](https://agentmods.dev/commands/jannleo/telinksdk-builder-mcp/flash)
Your own site
<a href="https://agentmods.dev/commands/jannleo/telinksdk-builder-mcp/flash"><img src="https://agentmods.dev/badge/commands/jannleo/telinksdk-builder-mcp/flash.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00031 $0.00986
Opus 5 $0.00015 $0.00493
Sonnet 5 $0.00006 $0.00197
Haiku 4.5 $0.00003 $0.00099

Measured 4d ago against content hash 195ffe966061, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

flash scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/flash.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

使用通用构建运行器 ${COCO_PLUGIN_ROOT}/trae_build_runner.pyflash 子命令,对 ${workspaceFolder} 仓库进行烧录/读/复位(调用 Telink bdt.exe / Cmd_download_tool.exe)。

参数路由

根据 $ARGUMENTS 构造一条 python 命令并用 Bash 工具执行:

  • 第一个参数视为 bdt 命令(wf/rf/rst/ac/lf/wc/rc/wa/ra/wo/ro/pc/sws/help),用 --command 传递。
  • 其余参数原样透传给 runner 的 flash 子命令。

常用调用

# 烧录最新固件(自动取 build_variants 下最新 .bin)
python "${COCO_PLUGIN_ROOT}/trae_build_runner.py" --project "${workspaceFolder}" flash --command wf

# 烧录并验证 + 失败重试 3 次 + 烧前预检(产线推荐组合)
python "${COCO_PLUGIN_ROOT}/trae_build_runner.py" --project "${workspaceFolder}" flash --command wf --pre-check --verify --retry 3

# 指定芯片和输入文件烧录
python "${COCO_PLUGIN_ROOT}/trae_build_runner.py" --project "${workspaceFolder}" flash --command wf --chip TC122X --input build_variants/app.bin --erase

# 多设备:用 SN 精确定位
python "${COCO_PLUGIN_ROOT}/trae_build_runner.py" --project "${workspaceFolder}" flash --command wf --device-id 61174f1a603

# 读 flash 前 16 字节
python "${COCO_PLUGIN_ROOT}/trae_build_runner.py" --project "${workspaceFolder}" flash --command rf --address 0 --size 16 --output read.bin

# 复位
python "${COCO_PLUGIN_ROOT}/trae_build_runner.py" --project "${workspaceFolder}" flash --command rst

# 预览命令不执行
python "${COCO_PLUGIN_ROOT}/trae_build_runner.py" --project "${workspaceFolder}" flash --command wf --dry-run

选项速查

选项 说明
--chip bdt 芯片名(TL721X/B80/TC321X;空=builder.json flash.default_chip 或从预设推断)
--command bdt 命令(默认 wf)
--address 地址,十进制(默认 0)
--input -i 输入文件(wf 空=最新 .bin)
--output -o 输出文件(rf/rc/ro)
--size -s 大小(如 512k)
--erase -e 写前擦除
--device-id BDT 设备 id:数字(1,2) 或 SN 十六进制串;空=配置默认(1)
--verify wf 后读回前 64 字节与文件对比
--retry N wf 失败时重试 N 次,每次先跑恢复序列(ac→rst→ac→lf)
--pre-check wf 前先 ac 探测芯片是否连接(仅 EVK 模式)
--timeout 覆盖超时秒数
--dry-run 只打印 bdt 命令不执行

汇报规范

解析 runner 的 JSON 输出后向用户汇报:

  • 成功:status、chip、device_id、耗时、attempts(重试次数);若有 verify,报告 verify_detail(match/mismatch)
  • 失败:exit_code、error_reason(结构化诊断,如 "chip not found"、"address out of range")、attempts
  • dry-run:展示完整 bdt 命令(含 cwd 提示:Cmd_download_tool.exe 需在自身目录执行)

Read the full file on GitHub · 66 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 66 lines · 31 tokens per session scan A 195ffe966061

Subscribe to this mod's changes

flash is a command published in the GitHub repository JannLeo/telinksdk-builder-mcp (1 stars, last pushed 25d ago), licensed MIT. It adds 31 tokens to every session and 986 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.