# theja0473/cc3200-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/theja0473/cc3200-sdk
- Repository: https://github.com/theja0473/cc3200-sdk

## Overview

This is a C SDK for CC3200 firmware that connects devices to the Paasmer IoT platform over mutually authenticated TLS and MQTT. The principal workflow is application firmware initializing the client, connecting, then publishing sensor data and subscribing for broker messages; the README also describes Shadow support as a separate device-state capability. MQTT packet operations share internal protocol helpers and a platform network interface. The tree and README identify TI-RTOS and Linux adapters; source excerpts are limited, so some adapter and sample links remain unverified.

Main entry points: [`include/aws_iot_mqtt_client_interface.h`](https://github.com/theja0473/cc3200-sdk/blob/master/include/aws_iot_mqtt_client_interface.h) (MQTT API), [`src/aws_iot_mqtt_client_common_internal.c`](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_common_internal.c) (Packet Helpers), [`src/aws_iot_shadow.c`](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow.c) (Shadow Operations), [`include/network_interface.h`](https://github.com/theja0473/cc3200-sdk/blob/master/include/network_interface.h) (TLS Network API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Device Firmware"]
  node_firmware["CC3200 Sample"]
end

subgraph group_mqtt["MQTT Client"]
  node_mqtt_api["MQTT API"]
  node_mqtt_core["Client State"]
  node_connect["Connect"]
  node_publish["Publish"]
  node_subscribe["Subscribe"]
  node_unsubscribe["Unsubscribe"]
  node_yield["Message Yield"]
  node_mqtt_internal["Packet Helpers"]
  node_json["JSON Utilities"]
  node_jsmn["JSMN Parser<br/>[jsmn.c]"]
end

subgraph group_shadow["Device Shadow"]
  node_shadow_api["Shadow API"]
  node_shadow_core["Shadow Operations<br/>[aws_iot_shadow.c]"]
  node_shadow_actions["Shadow Actions"]
  node_shadow_json["Shadow JSON"]
  node_shadow_records[("Shadow Records")]
end

subgraph group_platform["Platform Services"]
  node_transport["TLS Network API"]
  node_tirtos_net["TI Network Adapter<br/>[network_sl.c]"]
  node_linux_tls["Linux TLS Adapter"]
  node_timer["Timer Services<br/>[timer.c]"]
  node_threads["Thread Services"]
end

node_device(("CC3200 Device"))
node_broker(("Paasmer MQTT Broker"))

node_device -->|"runs"| node_firmware
node_firmware -->|"uses"| node_mqtt_api
node_mqtt_api -.->|"connects via"| node_connect
node_mqtt_api -.->|"publishes via"| node_publish
node_mqtt_api -.->|"subscribes via"| node_subscribe
node_mqtt_api -.->|"unsubscribes via"| node_unsubscribe
node_mqtt_api -.->|"yields via"| node_yield
node_connect -->|"connects through"| node_transport
node_connect -->|"serializes with"| node_mqtt_internal
node_publish -->|"uses packets"| node_mqtt_internal
node_subscribe -->|"uses packets"| node_mqtt_internal
node_unsubscribe -->|"uses packets"| node_mqtt_internal
node_yield -->|"uses packets"| node_mqtt_internal
node_mqtt_core -->|"uses helpers"| node_mqtt_internal
node_mqtt_core -->|"uses locks"| node_threads
node_transport -->|"times operations"| node_timer
node_transport -.->|"implemented by"| node_tirtos_net
node_transport -.->|"implemented by"| node_linux_tls
node_broker -.->|"accepts connection"| node_connect
node_publish -.->|"sends MQTT data"| node_broker
node_broker -.->|"delivers messages"| node_yield
node_firmware -.->|"may use"| node_shadow_api
node_shadow_api -->|"implemented by"| node_shadow_core
node_shadow_core -->|"uses MQTT"| node_mqtt_api
node_shadow_core -->|"dispatches actions"| node_shadow_actions
node_shadow_core -->|"builds messages"| node_shadow_json
node_shadow_core -->|"tracks requests"| node_shadow_records
node_shadow_actions -->|"uses JSON"| node_shadow_json
node_shadow_records -->|"uses JSON"| node_shadow_json
node_shadow_json -->|"parses with"| node_json
node_json -->|"parses with"| node_jsmn

click node_firmware "https://github.com/theja0473/cc3200-sdk/tree/master/samples/tirtos/subscribe_publish_sample/cc3200"
click node_mqtt_api "https://github.com/theja0473/cc3200-sdk/blob/master/include/aws_iot_mqtt_client_interface.h"
click node_mqtt_core "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client.c"
click node_connect "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_connect.c"
click node_publish "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_publish.c"
click node_subscribe "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_subscribe.c"
click node_unsubscribe "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_unsubscribe.c"
click node_yield "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_yield.c"
click node_mqtt_internal "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_common_internal.c"
click node_transport "https://github.com/theja0473/cc3200-sdk/blob/master/include/network_interface.h"
click node_tirtos_net "https://github.com/theja0473/cc3200-sdk/blob/master/platform/tirtos/network_sl.c"
click node_linux_tls "https://github.com/theja0473/cc3200-sdk/blob/master/platform/linux/mbedtls/network_mbedtls_wrapper.c"
click node_timer "https://github.com/theja0473/cc3200-sdk/blob/master/platform/tirtos/timer.c"
click node_threads "https://github.com/theja0473/cc3200-sdk/blob/master/platform/linux/pthread/threads_pthread_wrapper.c"
click node_json "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_json_utils.c"
click node_jsmn "https://github.com/theja0473/cc3200-sdk/blob/master/external_libs/jsmn/jsmn.c"
click node_shadow_api "https://github.com/theja0473/cc3200-sdk/blob/master/include/aws_iot_shadow_interface.h"
click node_shadow_core "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow.c"
click node_shadow_actions "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow_actions.c"
click node_shadow_json "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow_json.c"
click node_shadow_records "https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow_records.c"

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_firmware toneBlue
class node_mqtt_api,node_mqtt_core,node_connect,node_publish,node_subscribe,node_unsubscribe,node_yield,node_mqtt_internal,node_json,node_jsmn toneAmber
class node_shadow_api,node_shadow_core,node_shadow_actions,node_shadow_json,node_shadow_records toneMint
class node_transport,node_tirtos_net,node_linux_tls,node_timer,node_threads toneRose
class node_device,node_broker toneIndigo
```

## Components

### Device Firmware

- [CC3200 Sample](https://github.com/theja0473/cc3200-sdk/tree/master/samples/tirtos/subscribe_publish_sample/cc3200): `samples/tirtos/subscribe_publish_sample/cc3200`

### MQTT Client

- [MQTT API](https://github.com/theja0473/cc3200-sdk/blob/master/include/aws_iot_mqtt_client_interface.h): `include/aws_iot_mqtt_client_interface.h`
- [Client State](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client.c): `src/aws_iot_mqtt_client.c`
- [Connect](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_connect.c): `src/aws_iot_mqtt_client_connect.c`
- [Publish](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_publish.c): `src/aws_iot_mqtt_client_publish.c`
- [Subscribe](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_subscribe.c): `src/aws_iot_mqtt_client_subscribe.c`
- [Unsubscribe](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_unsubscribe.c): `src/aws_iot_mqtt_client_unsubscribe.c`
- [Message Yield](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_yield.c): `src/aws_iot_mqtt_client_yield.c`
- [Packet Helpers](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_mqtt_client_common_internal.c): `src/aws_iot_mqtt_client_common_internal.c`
- [JSON Utilities](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_json_utils.c): `src/aws_iot_json_utils.c`
- [JSMN Parser](https://github.com/theja0473/cc3200-sdk/blob/master/external_libs/jsmn/jsmn.c): `external_libs/jsmn/jsmn.c`

### Device Shadow

- [Shadow API](https://github.com/theja0473/cc3200-sdk/blob/master/include/aws_iot_shadow_interface.h): `include/aws_iot_shadow_interface.h`
- [Shadow Operations](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow.c): `src/aws_iot_shadow.c`
- [Shadow Actions](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow_actions.c): `src/aws_iot_shadow_actions.c`
- [Shadow JSON](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow_json.c): `src/aws_iot_shadow_json.c`
- [Shadow Records](https://github.com/theja0473/cc3200-sdk/blob/master/src/aws_iot_shadow_records.c): `src/aws_iot_shadow_records.c`

### Platform Services

- [TLS Network API](https://github.com/theja0473/cc3200-sdk/blob/master/include/network_interface.h): `include/network_interface.h`
- [TI Network Adapter](https://github.com/theja0473/cc3200-sdk/blob/master/platform/tirtos/network_sl.c): `platform/tirtos/network_sl.c`
- [Linux TLS Adapter](https://github.com/theja0473/cc3200-sdk/blob/master/platform/linux/mbedtls/network_mbedtls_wrapper.c): `platform/linux/mbedtls/network_mbedtls_wrapper.c`
- [Timer Services](https://github.com/theja0473/cc3200-sdk/blob/master/platform/tirtos/timer.c): `platform/tirtos/timer.c`
- [Thread Services](https://github.com/theja0473/cc3200-sdk/blob/master/platform/linux/pthread/threads_pthread_wrapper.c): `platform/linux/pthread/threads_pthread_wrapper.c`

### Other components

- **CC3200 Device**
- **Paasmer MQTT Broker**

## Connections

- CC3200 Device → CC3200 Sample: runs (evidence: `README.md`)
- CC3200 Sample → MQTT API: uses (evidence: `README.md`)
- MQTT API → Connect: connects via (evidence: `src/aws_iot_mqtt_client_connect.c`)
- MQTT API → Publish: publishes via
- MQTT API → Subscribe: subscribes via
- MQTT API → Unsubscribe: unsubscribes via
- MQTT API → Message Yield: yields via
- Connect → TLS Network API: connects through (evidence: `src/aws_iot_mqtt_client_connect.c`)
- Connect → Packet Helpers: serializes with (evidence: `src/aws_iot_mqtt_client_connect.c`)
- Publish → Packet Helpers: uses packets (evidence: `src/aws_iot_mqtt_client_publish.c`)
- Subscribe → Packet Helpers: uses packets (evidence: `src/aws_iot_mqtt_client_subscribe.c`)
- Unsubscribe → Packet Helpers: uses packets (evidence: `src/aws_iot_mqtt_client_unsubscribe.c`)
- Message Yield → Packet Helpers: uses packets (evidence: `src/aws_iot_mqtt_client_yield.c`)
- Client State → Packet Helpers: uses helpers (evidence: `src/aws_iot_mqtt_client.c`)
- Client State → Thread Services: uses locks (evidence: `src/aws_iot_mqtt_client.c`)
- TLS Network API → Timer Services: times operations (evidence: `include/network_interface.h`)
- TLS Network API → TI Network Adapter: implemented by
- TLS Network API → Linux TLS Adapter: implemented by (evidence: `platform/linux/mbedtls/network_mbedtls_wrapper.c`)
- Paasmer MQTT Broker → Connect: accepts connection
- Publish → Paasmer MQTT Broker: sends MQTT data
- Paasmer MQTT Broker → Message Yield: delivers messages
- CC3200 Sample → Shadow API: may use
- Shadow API → Shadow Operations: implemented by (evidence: `src/aws_iot_shadow.c`)
- Shadow Operations → MQTT API: uses MQTT (evidence: `src/aws_iot_shadow.c`)
- Shadow Operations → Shadow Actions: dispatches actions (evidence: `src/aws_iot_shadow.c`)
- Shadow Operations → Shadow JSON: builds messages (evidence: `src/aws_iot_shadow.c`)
- Shadow Operations → Shadow Records: tracks requests (evidence: `src/aws_iot_shadow.c`)
- Shadow Actions → Shadow JSON: uses JSON (evidence: `src/aws_iot_shadow_actions.c`)
- Shadow Records → Shadow JSON: uses JSON (evidence: `src/aws_iot_shadow_records.c`)
- Shadow JSON → JSON Utilities: parses with (evidence: `src/aws_iot_shadow_json.c`)
- JSON Utilities → JSMN Parser: parses with
