# yongzhy/t32 architecture

> Architecture diagram of the GitHub repository yongzhy/t32, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yongzhy/t32
- Repository: https://github.com/yongzhy/t32

## Overview

t32 is a small Go/cgo wrapper for Lauterbach Trace32 Remote API. A Go program configures and initializes a session, attaches to a device, then issues commands or uses the wrapper’s target-control, inspection, memory, breakpoint, source, trace, and notification APIs. Those capabilities are exposed from one source file, so the nodes represent API responsibilities rather than separate modules. The README and excerpted calls establish the wrapper-to-API boundary; finer internal call flows are not shown.

Main entry points: [`t32.go`](https://github.com/yongzhy/t32/blob/master/t32.go) (Session setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_go_program(("Go program"))
node_session["Session setup<br/>[t32.go]"]
node_commands["Commands and control<br/>[t32.go]"]
node_target_data["Target inspection<br/>[t32.go]"]
node_memory_breakpoints["Memory and breakpoints<br/>[t32.go]"]
node_source_trace["Source and trace<br/>[t32.go]"]
node_notifications["State notifications<br/>[t32.go]"]
node_remote_api["Trace32 Remote API"]
node_trace32["Trace32 debugger"]

node_go_program -->|"configures and attaches"| node_session
node_go_program -->|"issues commands"| node_commands
node_go_program -.->|"reads target state"| node_target_data
node_go_program -.->|"accesses target"| node_memory_breakpoints
node_go_program -.->|"queries debug data"| node_source_trace
node_go_program -.->|"registers events"| node_notifications
node_session -->|"calls C API"| node_remote_api
node_commands -->|"calls C API"| node_remote_api
node_target_data -->|"calls C API"| node_remote_api
node_memory_breakpoints -->|"calls C API"| node_remote_api
node_source_trace -->|"calls C API"| node_remote_api
node_notifications -->|"calls C API"| node_remote_api
node_remote_api -->|"controls debugger"| node_trace32

click node_session "https://github.com/yongzhy/t32/blob/master/t32.go"
click node_commands "https://github.com/yongzhy/t32/blob/master/t32.go"
click node_target_data "https://github.com/yongzhy/t32/blob/master/t32.go"
click node_memory_breakpoints "https://github.com/yongzhy/t32/blob/master/t32.go"
click node_source_trace "https://github.com/yongzhy/t32/blob/master/t32.go"
click node_notifications "https://github.com/yongzhy/t32/blob/master/t32.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_go_program,node_trace32 toneIndigo
class node_session,node_commands,node_target_data,node_memory_breakpoints,node_source_trace,node_notifications toneTeal
class node_remote_api toneMint
```

## Components

### Other components

- **Go program**
- [Session setup](https://github.com/yongzhy/t32/blob/master/t32.go): `t32.go`
- [Commands and control](https://github.com/yongzhy/t32/blob/master/t32.go): `t32.go`
- [Target inspection](https://github.com/yongzhy/t32/blob/master/t32.go): `t32.go`
- [Memory and breakpoints](https://github.com/yongzhy/t32/blob/master/t32.go): `t32.go`
- [Source and trace](https://github.com/yongzhy/t32/blob/master/t32.go): `t32.go`
- [State notifications](https://github.com/yongzhy/t32/blob/master/t32.go): `t32.go`
- **Trace32 Remote API**
- **Trace32 debugger**

## Connections

- Go program → Session setup: configures and attaches (evidence: `README.md`)
- Go program → Commands and control: issues commands (evidence: `README.md`)
- Go program → Target inspection: reads target state
- Go program → Memory and breakpoints: accesses target
- Go program → Source and trace: queries debug data
- Go program → State notifications: registers events
- Session setup → Trace32 Remote API: calls C API (evidence: `t32.go`)
- Commands and control → Trace32 Remote API: calls C API (evidence: `t32.go`)
- Target inspection → Trace32 Remote API: calls C API (evidence: `t32.go`)
- Memory and breakpoints → Trace32 Remote API: calls C API (evidence: `t32.go`)
- Source and trace → Trace32 Remote API: calls C API (evidence: `t32.go`)
- State notifications → Trace32 Remote API: calls C API (evidence: `t32.go`)
- Trace32 Remote API → Trace32 debugger: controls debugger (evidence: `README.md`)
