> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/op8666/operational-information/program-and-debug.md).

# Program and Debug

The OP8666 uses **on-board ICP** (XDS100V2 Emulator) for **programming and debugging** using the **ICP USB connector**.

The **XDS100V2** programs the microcontroller via the **JTAG debug port**.

The **emulator** also provides a **USB to UART adapter** functionality to use as **virtual COM port** for monitoring purposes.

## Connections with microcontroller <a href="#connections-with-microcontroller" id="connections-with-microcontroller"></a>

<table data-search="false"><thead><tr><th>STLINK Function</th><th>Controller pin name</th><th>Controller pin</th></tr></thead><tbody><tr><td>JTAG_TRSTN</td><td>TRSTN</td><td>V14</td></tr><tr><td>JTAG_TCK</td><td>TCK</td><td>V15</td></tr><tr><td>JTAG_TDI</td><td>TDI</td><td>W13</td></tr><tr><td>JTAG_TMS</td><td>TMS</td><td>W14</td></tr><tr><td>JTAG_TDO</td><td>TDO</td><td>W15</td></tr><tr><td>Virtual Com Port RX</td><td>GPIO28 / SCIA_RXD</td><td>V11</td></tr><tr><td>Virtual Com Port TX</td><td>GPIO29 / SCIA_TXD</td><td>W11</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/op8666/operational-information/program-and-debug.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
