How golioth/golioth-firmware-sdk works
Main Components
a. Platform Layer:
• Supported platforms (ESP-IDF, ModusToolbox, Zephyr/NCS, Linux) as base components
• Platform-specific ports (/port directory) for each supported system
• Platform abstraction through golioth_sys interface
b. Core SDK Layer:
• CoAP Client implementation (src/coap_client*.c files)
• Authentication mechanisms (src/Kconfig.authentication)
• Event handling system (src/event_group.c)
c. Service Layer:
• LightDB State (lightdb_state.c)
• Firmware Updates (fw_update.c)
• Logging (log.c)
• RPC (rpc.c)
• Settings (settings.c)
• Stream (stream.c)
• Location Services (location.c, location_wifi.c)
d. External Dependencies:
• libcoap (external/libcoap)
• zcbor (external/zcbor)
• Unity testing framework (external/unity)
Connection Flow
• Data flow from embedded device through platform layer
• Platform abstraction layer interaction with core services
• Service layer communication with Golioth cloud
• Authentication and security paths
Specific Implementation Details
• CoAP protocol implementation
• ZCBOR encoding/decoding
• Platform-specific network stacks
• Hardware abstraction layer
Testing Infrastructure
Separate section for:
• Hardware-in-Loop (HIL) testing
• Unit testing framework
• Continuous Integration paths
┌─────────────────────────────────────────────────────┐
• Golioth Cloud │
• ┘
• ▲
┌─────────────────────────────────────────────────────┐
• Security Layer (TLS/DTLS) │
• ┘
• ▲
┌─────────────────────────────────────────────────────┐
• Service Layer │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
• LightDB │ │ OTA │ │ Logs │ │ RPC │ │
• ┘ └─────────┘ └─────────┘ └─────────┘ │
• ┘
• ▲
┌─────────────────────────────────────────────────────┐
• Core SDK Layer │
• ┘
• ▲
┌─────────────────────────────────────────────────────┐
• Platform Abstraction Layer │
• ┘
• ▲
┌─────────────────────────────────────────────────────┐
• Platform Layer │
• ESP-IDF │ ModusToolbox │ Zephyr/NCS │ Linux │
• ┘
• Component relationships
• Testing coverage indicators