> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedded development workflows

> Take a firmware change from project setup through planning, build, flash, and hardware verification.

Follow this page to take a firmware change from setup to a verified result on the board. Treat each check as its own result: a passing build, a verified flash, and correct behavior on the board prove different things.

## Set up the project

1. Run `/project` and select a project. To start one, select **New project** in VS Code, or **+ Create new project** in the terminal UI.
2. Confirm the target platform. Then run `/peripheral`, or in VS Code select **Open project peripherals** in the chat header, to add the parts fitted to your board.
3. Run `/upload-schematics` if Inlay needs the board's connections.
4. Run `/init` and confirm the build, test, debug, and hardware details Inlay finds. It records them in `INLAY.md`.

See the [Quickstart](/docs/quickstart.md) for the full first-run flow.

## Plan a change with unknowns

Use Plan mode when a change spans several modules or depends on hardware details you haven't confirmed. Run `/plan`, then describe the behavior and constraints:

```text theme={"theme":"css-variables"}
Plan a DMA-based UART receiver. Trace the existing parser and buffer ownership,
check the MCU constraints, and propose tests for overflow and partial frames.
```

Review the affected files, assumptions, error handling, and verification steps. Reply in the chat to request changes. When the plan is ready, approve it, and Inlay starts implementing in Act mode. See [Agent modes](/docs/core-concepts/modes.md#plan-review-an-approach-before-implementation).

For a focused fix, stay in Act mode and be specific:

```text theme={"theme":"css-variables"}
In @drivers/uart.c, return UART_TIMEOUT when the receive deadline expires.
Keep the public header unchanged, add the missing test case, and run UART tests.
```

## Build and test

Ask for the checks recorded in `INLAY.md`:

```text theme={"theme":"css-variables"}
Run the recorded host tests, then build the debug image for the selected board.
Stop on failure. On success, report the build configuration and artifact path.
```

Check that the reported output comes from the current build. If a step fails, fix the first useful error before you move on to hardware.

## Flash and observe

Before you flash, confirm the board, the probe or [bench](/docs/integrations/benches.md), the power setup, and the serial connection. Then ask:

```text theme={"theme":"css-variables"}
Flash the verified debug image to the selected development board. Capture boot
output and wait up to 15 seconds for "self-test: pass". Report programming
verification and the observed boot result separately.
```

Inlay can read output the serial port has already captured, or watch for new output while the board runs:

* Ask it to check captured output when the message may already have appeared.
* Ask it to monitor live when it needs to wait for the message.

An open serial tab in the Inlay Monitor doesn't show that the expected message arrived. Ask Inlay to report the line it observed.

## Investigate a failure

Switch to Debug mode with `/debug` when you need a debugger on the target, for example to read registers, memory, or the call stack after a fault or hang. Start from the output that already exists. When the target's current state matters, tell Inlay not to disturb it:

```text theme={"theme":"css-variables"}
The board reset during the first SPI transfer. Read UART history and inspect
the reset reason. Do not reflash or reset it before collecting the current state.
```

For electrical or timing questions, ask for a bounded instrument capture. Name the channel assignments and the result you expect. Save the check as a [hardware script](/docs/debug-mode/hardware-scripts.md) so you can repeat it.

## Review the outcome

Ask Inlay to summarize the changed behavior, the files it changed, the checks it ran, and anything it couldn't verify. Each check answers a different question:

| Check | What it establishes |
| - | - |
| Build | The code compiles for the selected configuration. |
| Flash | The image was programmed to the target. |
| Runtime test | The board shows the behavior you asked for. |

Keep reusable commands in [INLAY.md](/docs/core-concepts/inlay-md.md) and confirmed constraints in [project memory](/docs/core-concepts/memory.md).

## Continue or change direction

| You want to | Do this |
| - | - |
| Add a constraint or correct course while Inlay works | Send a message. It joins the running turn at the next step. |
| Ask a side question without interrupting the task | Run `/btw <question>`. |
| Start unrelated work | In VS Code, run `/new` or select **+** in the chat header. In the terminal UI, run `/clear`. The previous conversation stays in `/history`. |

In VS Code, queued messages appear above the input under **Queued**. In the terminal UI, press `Ctrl+Q` to list them. Review or remove the ones that no longer apply before you switch tasks; `/clear` discards them. See [Sessions and context](/docs/core-concepts/sessions.md#send-prompts-during-a-turn).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.