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

# XMOS xSCOPE

> Select an XMOS application, monitor xSCOPE output, and enable supported host input.

Use xSCOPE for output from an XMOS `.xe` application on hardware or in the simulator. Add a Serial tab to the Monitor and select the XMOS target and artifact.

## Prepare the target

Install XMOS XTC Tools for the hardware host and build the `.xe` with xSCOPE support. For hardware, connect and power the board and its xTAG. For a simulated run, choose the simulator explicitly.

Set the artifact and target in `.embedder/xmos.json`. Merge these fields into the file if it already exists:

```json .embedder/xmos.json theme={"system"}
{
  "xe": "build/my_app.xe",
  "target": "hardware"
}
```

Replace `build/my_app.xe` with the artifact's path relative to the project root. If several xTAGs are attached, select the intended adapter or add its ID as `"adapterId"` in the same file. Use `"target": "simulator"` only for a simulated run. XMOS settings such as `xmos_xe` in `EMBEDDER.md` are no longer used.

## Start a monitored run

<Warning>
  A fresh xSCOPE Monitor connection launches the selected `.xe` on the chosen xTAG or simulator. An existing matching debugger console can be reused; the Monitor reports `Attached to xgdbserver console` when that happens. To preserve a running target or fault, verify reuse of the existing console or read already captured history before starting a new connection.
</Warning>

```text theme={"system"}
Launch build/my_app.xe on the selected xTAG and monitor its xSCOPE output
until the startup test finishes. Report any errors.
```

Confirm the selected artifact, hardware or simulator target, and expected startup output before interpreting the result. Simulator output is evidence about that simulated run, not the connected board.

See [XMOS debugging](/debug-mode/xmos-debugging) for debugger setup and `.xe` execution controls.

## Record probes and prints in Trace

An xSCOPE event recording captures values from the firmware's registered probes and its xSCOPE prints. Use the matching `.xe`, select hardware or simulator explicitly, and enable realtime xSCOPE with `"xscope": true` before preparing a shared Monitor connection.

```text theme={"system"}
Record xSCOPE probes and prints from build/my_app.xe on the selected xTAG.
Reuse the matching active realtime session if available. Stop after I
reproduce the issue, open the recording in Trace, and show the probe values
and prints around the event.
```

A compatible active Monitor or debugger session can be shared. A fresh recording can launch the application, just like a fresh Monitor connection. A stdout-only session must be prepared for realtime recording before it can supply these events; preserve existing fault evidence before restarting it.

After reproduction, ask Embedder to stop the recording. In **Trace**, registered numeric probe values appear as counters and prints as events. Check the expected probe names and any dropped-record warnings before interpreting the timeline. You can query the saved recording without launching the application again.

For instruction execution rather than application probes, see [XMOS xsim](/debug-mode/xsim) and [Coverage and trace](/debug-mode/coverage-and-trace).

## Send supported input

Add `"xscope": true` to `.embedder/xmos.json` and connect the Monitor in realtime xSCOPE mode. The firmware must be built with xSCOPE enabled and receive input through `xscope_data_from_host`.

Enter a command the firmware recognizes in the Monitor's send control, using the newline convention it expects. Check the firmware response afterward. Stdout-only monitoring cannot send input.

Changing from an existing stdout-only session may require disconnecting and starting a new connection, which can launch the selected application again. Baud rate, DTR, and RTS settings do not apply to xSCOPE.

## Read an existing run

```text theme={"system"}
Read the last 50 lines already captured on the active xSCOPE connection.
Do not launch another application or reset the target.
```

Use history for output already captured, and a live request with a duration or stop string for future output.

## Troubleshoot

* **xrun missing:** install XTC Tools, launch Embedder from its tools environment, or set `EMBEDDER_XTC_PATH` to the XTC installation.
* **Artifact missing or wrong:** rebuild, check `xe` in `.embedder/xmos.json`, and confirm the Monitor's selected application.
* **Several xTAGs found:** select the intended adapter ID explicitly.
* **Probe busy:** finish the competing hardware task, or use the matching existing debugger console where available.
* **Input unavailable:** check `"xscope": true`, the active realtime connection, and the firmware's `xscope_data_from_host` receiver.
* **No output:** confirm the selected build enables xSCOPE and reaches its logging code.
