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

# TI CCS and XDS debugging

> Debug TI targets headlessly through your installed Code Composer Studio scripting support and an XDS probe.

Use this workflow to debug TI firmware through Code Composer Studio (CCS) and an XDS probe. Inlay runs your installed CCS scripting support headlessly. It doesn't open the CCS IDE or reuse the IDE's debugger session. The TI target definitions and drivers on your machine must support the exact device and probe. Inlay doesn't supply CCS.

Inlay can debug a TI target when you have a `.ccxml` target configuration for it, either from TI or from your project. Which devices and probes work depends on what your CCS installation supports, and Inlay hasn't been tested with every TI device and probe combination, so check readiness before you rely on a new setup.

* **C2000 (C28x):** Inlay can generate the `.ccxml` for qualified C28x devices, so the TI device name is enough.
* **Other targets, such as Sitara and MSP430:** supply a TI-authored `.ccxml`. On a multicore device, such as the Sitara AM2634, you also choose the core.

## Supported probes

| Probe | Value to use | CCS scripting | Call stack |
| - | - | - | - |
| XDS110 | `xds110` | Modern, so it needs CCS 20 or later | Available |
| XDS100v1 | `xds100v1` | Legacy | Not available |
| XDS100v2 | `xds100v2` | Modern with CCS 20 or later, legacy with earlier versions | With CCS 20 or later |
| XDS100v3 | `xds100v3` | Modern with CCS 20 or later, legacy with earlier versions | With CCS 20 or later |
| XDS100, version unknown | `xds100` | Inlay detects the connected version | Depends on the version |

Modern scripting is the scripting interface in CCS 20 and later. Legacy scripting is the Debug Server Scripting (DSS) in earlier versions, such as CCS 12, and it has a smaller feature set.

Give the value as `Debug Interface` in [INLAY.md](/docs/core-concepts/inlay-md.md), as `probe` in a script, or name the probe in your request. If your `.ccxml` names a probe, Inlay uses that probe. Other TI connections named in a `.ccxml` are kept as written. If no probe is named anywhere, Inlay uses XDS110. Inlay detects connected XDS110 and XDS100 probes with the utilities in your CCS installation.

## Prepare CCS

1. Install CCS with its scripting support, target database, and drivers for your probe and device.
2. Connect and power the target. Close any CCS IDE debug session that owns the probe, because Inlay opens its own connection.
3. Build a debug artifact that CCS can load, such as an ELF-format `.out` file, with matching symbols.
4. Identify the TI target configuration (`.ccxml`) for the board. For C28x, the TI device name is enough. For a multicore device, note the core you want from that configuration, such as `Cortex_R5_0`.
5. Run `/debug` and ask Inlay to check the installation, probe version, target configuration, and device before connecting.

Inlay looks for CCS in these folders, newest version first:

| Host | Folders searched |
| - | - |
| macOS | `/Applications/ti/ccs*/ccs`, `~/ti/ccs*/ccs` |
| Windows | `C:\ti\ccs*\ccs`, `%USERPROFILE%\ti\ccs*\ccs` |
| Linux | `/opt/ti/ccs*/ccs`, `/usr/local/ti/ccs*/ccs`, `~/ti/ccs*/ccs` |

If CCS is installed somewhere else, set `INLAY_CCS_ROOT` to the CCS folder that contains `ccs_base` and `scripting`, in the environment that launches Inlay. You can also give the folder in your request.

### Choose the target configuration

Inlay resolves the probe, device, and `.ccxml` from, in order of priority:

1. Values you give in your request.
2. The project's saved CCS configuration in `.inlay/ccs.json`.
3. `Debug Interface` and `Target MCU` in [INLAY.md](/docs/core-concepts/inlay-md.md).

When no `.ccxml` is given, Inlay searches the project, `.inlay/targetConfigs/`, and `~/ti` for one that matches the probe and device. If several match, Inlay lists them so you can choose one. If none match and the device is a qualified C28x device, it generates one at `.inlay/targetConfigs/<probe>-<device>.ccxml`.

For any other target, give the board's TI-authored `.ccxml`, such as the one from the TI SDK or your CCS project. Prefer it for multicore boards and boards that need GEL initialization. Inlay also can't generate a configuration for XDS100v1 with C28x devices that use ICEPick routing or a CLA.

Inlay saves the resolved setup in `.inlay/ccs.json` and reuses it. If you change boards or probes, give the new device, probe, and `.ccxml` explicitly, or delete `.inlay/ccs.json` to start discovery again.

## Program and debug

```text theme={"theme":"css-variables"}
Use CCS with targetConfigs/board.ccxml and the connected XDS110.
Load and verify build/app.out, run to main, and read the PC and registers.
Confirm the configured device and core before connecting.
```

Replace both paths and the probe with your actual setup. Inlay asks you to approve before it connects, unless your [approval settings](/docs/core-concepts/approvals.md) already allow it. A normal connection loads and verifies the program, then tries to stop at `main`. Starting a CCS session closes any open J-Link, OpenOCD, or XMOS debugger session.

Once connected, you can ask for:

* Breakpoints, run, and interrupt.
* Step, step over, and step out.
* Register and memory reads.
* Expression evaluation.
* Resets offered by the target.
* The call stack, with modern CCS scripting only. Frames don't include local variables; evaluate an expression to read a variable.

Raw GDB commands, thread lists, and RTOS task views aren't available in CCS sessions.

### Script the connection

For a repeatable check, save a [hardware script](/docs/debug-mode/hardware-scripts.md) under `.inlay/hardware/`:

```python theme={"theme":"css-variables"}
gdb.ccs_connect(
    elf="build/app.out",
    ccxml="targetConfigs/board.ccxml",
    probe="xds110",
    run_to_main=True,
)
print(gdb.read_registers())
```

Replace its values before asking Inlay to run it. This example programs the target. The CCS connection closes when the script ends, unless you pass `persistent=True`.

For a multicore Sitara target, pass the board's `.ccxml` and the core:

```python theme={"theme":"css-variables"}
gdb.ccs_connect(
    ccxml="targetConfigs/AM2634.ccxml",
    core="Cortex_R5_0",
    elf="Release/firmware.out",
)
print(gdb.list_cores())
print(gdb.status())
gdb.resume()
print(gdb.wait_for_halt(timeout_seconds=5))
gdb.disconnect(policy="preserve")
```

To debug another core, call `gdb.ccs_connect()` again with the same configuration and that `core`, then pass the core ID to later calls. After connecting, you can use the [shared debugger helpers](/docs/debug-mode/gdb.md#script-helpers).

| Option | Default | Effect |
| - | - | - |
| `elf` | None | Program or symbol file, relative to the project. Omit it to connect without loading anything |
| `ccxml` | Discovered | Target configuration file |
| `probe` | The `.ccxml` connection, otherwise `xds110` | Probe value from the table above |
| `device` | Discovered | TI device name |
| `core` | Saved, otherwise the only configured core | Full CCS core ID or an unambiguous core name, such as `Cortex_R5_0`. Required when the configuration has several cores |
| `ccs_root` | Discovered | CCS installation folder |
| `target_config_root` | Discovered | Folder to search for `.ccxml` files |
| `run_to_main` | `True` | Run to `main` after loading |
| `attach` | `False` | Load symbols only, without loading the program |
| `no_halt` | `False` | Don't halt after connecting |
| `persistent` | `False` | Keep the CCS session open for later scripts |

### Keep a session open between scripts

By default, each script opens and closes its own CCS connection. Pass `persistent=True` on the first `gdb.ccs_connect()` call to keep the session open, then use `gdb.*` helpers in later scripts without reconnecting. Inlay holds the hardware for that chat while the session is open.

The session ends when you call `gdb.disconnect()`, after five minutes without debugger operations, or when the chat or Inlay closes. Breakpoints still belong to the script that set them and are cleared when it exits.

`gdb.disconnect()` takes a `policy`: `preserve` requests no change, `resume` leaves the target running, and `halt` leaves it halted. TI disconnect and GEL behavior can still affect the target.

## Attach to existing firmware

For firmware already on the board, ask for attach-only with the matching artifact. Inlay loads symbols without loading the program, then halts the target. Ask for no-halt as well to skip that halt. Attach-only opens a new private connection. It doesn't join a CCS IDE session. The TI connection sequence and GEL initialization can still affect execution.

CCS handles no-halt on a programming connection differently from J-Link and OpenOCD: it loads the program, then starts execution. Don't use no-halt as a substitute for attach-only.

## Read memory

On C28x, memory addresses are target word addresses, and read sizes are in bytes. Each 16-bit word is returned low byte first, and the result is trimmed to the byte count you asked for.

Byte reads with `gdb.read_memory()` are qualified for C28x only. On other TI cores, use `gdb.read_memory_elements()` with an explicit `bit_size`, and a page from `gdb.memory_pages()` where the core needs one.

## Troubleshoot

* **No compatible CCS installation found:** repair the CCS installation so its scripting support, probe connection files, drivers, and device definitions for your target are present, or set `INLAY_CCS_ROOT`.
* **Probe is owned by another session:** close the CCS IDE debug session that uses the probe, then connect again.
* **Several cores are configured:** pass `core` with one of the core names the error lists.
* **Generic XDS100 is ambiguous:** specify `xds100v1`, `xds100v2`, or `xds100v3`, or supply the matching `.ccxml`.
* **Multiple target configurations match:** give the intended `.ccxml` explicitly.
* **Configuration conflicts with the requested device or probe:** use the correct TI configuration instead of forcing mismatched values.
* **A CCS device is required:** give the device name, or set `Target MCU` in `INLAY.md`.
* **Automatic target configuration is unavailable:** supply a TI-authored `.ccxml`. Inlay generates one only for qualified C28x devices.
* **Stack query is unsupported:** the session uses legacy CCS scripting. Use register, memory, and expression queries, or a modern CCS setup.


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