Chat to Chip Firmware Flashing

Chat to Chip hardware chain: PLT-106, Test Agent PER-101, Flashr PER-401, and a Tag-Connect TC2030-IDC cable to the DUT

Chat to Chip is the path from a conversation with a coding/chat agent to firmware programmed onto your DUT. The agent writes a YAML test plan using the PLT AI Kit, the PLT runs it, and a Test Agent with an attached Flashr programs the target through a Tag-Connect cable.

Hardware chain

Stage

Part

Role

Production Line Tool

PLT-106

Orchestrates the test. Runs the YAML test plan and drives the Test Agent over USB.

Test Agent

PER-101

Linux SBC running agentOS.

Flashr

PER-401

USB programming device running flashOS. Communicates with the MCU in real time over I2C, JTAG, SPI, or SWD.

DUT

Bento Board

The target being programmed. The Bento Board (RP2350B) is the example programming target; see its Flashr test plan.

Connections

  • Connect the Test Agent’s Type-C USB port to one of the PLT’s peripheral Type-A USB ports, and power the Test Agent externally. See Blue Clover Test Agent PER-101.

  • Connect the Flashr to a USB port on the Test Agent. Attach only one Flashr to each Test Agent.

  • Connect the Flashr to the DUT’s programming port.

From chat to chip

  1. Chat: Install the PLT AI Kit in your agent. Its skills carry the PLT command reference, so the agent can write and debug test plans for this hardware.

  2. Plan: The agent produces a YAML test plan that sends the firmware image to the Test Agent with agentCfg - Configure Agent and programs it with agentExec - Execute command on Agent.

  3. Deploy: The agent uploads the test plan and firmware to PLTcloud Reference as a release with pltutil CLI, and deploys it to the PLT.

  4. Flash: The PLT runs the plan. The Test Agent executes flashr-flash - Program a target through Flashr, and the Flashr writes, verifies, and resets the target.

  5. Report: pltutil waits for the test report, so the agent can read the result and debug any failing step.

Working with PLTcloud

Agents can interact with PLTcloud through pltutil CLI. Before starting, enroll your PLT and create a project and deployment group. See Getting Started.

Set PLTCLOUD_API_TOKEN as described in pltutil CLI, then upload, deploy, run, and wait for the report in one command:

$ pltutil -p "${PROJECT_UUID}" -d "${DPG_UUID}" -utcDateVersion -a -wait-report -jsonp -report-save-dir . -f "dist/*"

This runs the test plan on every PLT in the deployment group, and on the hardware attached to them.

pltutil needs a terminal, so the agent must be able to run shell commands. Without one, upload and deploy the release from the web console.

Note

Coming soon: an MCP server that lets agents work with PLTcloud directly.

Example test plan

title: "Program DUT with Flashr"
suite:

 - title: "Setup Test Agent"
   steps:
    - command: agentCfg AGENT
      with:
       - firmware.hex

 - title: "Program DUT"
   steps:
    - command: agentExec AGENT "flashr-flash nrf52 /run/pltagent/mnt/firmware.hex"
      timeout: 2m