thehardwarestore.ai

where AI agents shop for the right tools

$ show rokath/trice

[account ↗] [repo ↗] APPLICATION ★ 996 104 ● active (last update 4 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

Trice is an embedded logging and tracing toolchain consisting of a lightweight C instrumentation library for microcontrollers and a Go-based host CLI tool. The C library provides variadic macros that emit compact binary records (ID + values) instead of format strings, drastically reducing flash and bandwidth usage. The Go tool manages Trice IDs (insert, clean, bind), decodes incoming binary streams from targets over UART, RTT, TCP/UDP, or file, and displays formatted logs with timestamps, colors, and filtering. It supports multiple buffer strategies (stack, static, double, ring), framing protocols (COBS, TCOBS), optional XTEA encryption, and local logging on the target itself. The architecture is a classic host-target split: the target runs the C library, the host runs the Go CLI. The codebase is well-tested with a large matrix of CGO test configurations and CI pipelines for multiple STM32 example projects. It is actively maintained with frequent releases and a responsive issue tracker.

RATING8.6/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS25
VELOCITY1.00
OPEN ISSUES0
CLOSED ISSUES508
LAST COMMIT4 weeks ago
github.com/fsnotify/fsnotify (go) v1.6.0
github.com/kr/pretty (go) v0.1.0
github.com/mgutz/ansi (go) v0.0.0-20200706080929-d51e80ef957d
github.com/rokath/cobs (go) v0.0.0-20230425030040-4ebbe9b903b9
github.com/rokath/tcobs (go) v0.9.1
github.com/sabhiram/go-gitignore (go) v0.0.0-20210923224102-525f6e181f06
github.com/spf13/afero (go) v1.9.5
github.com/stretchr/testify (go) v1.8.4
github.com/udhos/equalfile (go) v0.3.0
go.bug.st/serial (go) v1.6.0
golang.org/x/crypto (go) v0.52.0
github.com/creack/goselect (go) v0.1.2
github.com/davecgh/go-spew (go) v1.1.1
github.com/kr/text (go) v0.1.0
github.com/mattn/go-colorable (go) v0.1.13
github.com/mattn/go-isatty (go) v0.0.19
github.com/pmezard/go-difflib (go) v1.0.0
golang.org/x/sys (go) v0.45.0
golang.org/x/text (go) v0.37.0
gopkg.in/yaml.v3 (go) v3.0.1
Files by Type (count)
C/C++ Header
720
Go
357
C
282
Markdown
159
Shell
98
JSON
52
Other (.PNG)
36
Other (.png)
31
Text
30
Other (.mak)
30
YAML
23
Git Ignore
16
Files by Type (size)
C/C++ Header
31MB
Other (.zip)
23MB
Other (.7z)
14MB
Other (.gif)
11MB
Other (.svd)
11MB
C
8MB
Other (.jpg)
6MB
Other (.pdf)
5MB
Other (.png)
5MB
Go
2MB
Other (.PNG)
2MB
Markdown
1MB

The LLM identified 5 files worth highlighting for reuse:

Implements XTEA encryption and decryption with a key derived via SHA1. The package is self-contained, has no internal dependencies beyond standard library, and provides a clean API (Encrypt/Decrypt on byte slices). It can be extracted and reused in any Go project needing lightweight symmetric encryption.

file: pkg/cipher/cipher.go ↗ | tags: #encryption #xtea #reusable-library

Provides a parallel file tree walker with configurable matchers, exclusion patterns, and error aggregation. Uses afero filesystem abstraction for testability. The design is generic and decoupled from trice-specific logic; it can be reused in any Go project that needs to recursively process files with filtering.

file: pkg/ant/ant.go ↗ | tags: #file-tree-walker #parallel-processing #reusable-pattern

Parses C printf format specifiers and normalizes them to Go fmt equivalents. Strips C length modifiers (l, ll, z, etc.) and handles width/precision. This is a standalone utility that could be reused in any tool that needs to interpret C format strings from embedded firmware.

file: internal/fmtspec/fmtspec.go ↗ | tags: #format-specifier-parser #c-printf #normalization

Implements a registry of decoders keyed by encoding type (COBS, TCOBS, dump, char). Decoders are registered via init() and instantiated via NewForEncoding(). This pattern allows easy addition of new framing decoders without modifying core logic. The registry is self-contained and could be extracted for any multi-format decoding system.

file: internal/decoder/registry.go ↗ | tags: #decoder-registry #pluggable-architecture #factory-pattern

Implements TCOBS (Trice COBS) encoding, a custom byte-stuffing algorithm that uses a sigil byte to mark boundaries. The code is a single C file with no dependencies beyond standard integer types. It is portable, efficient, and can be reused in any embedded project needing a lightweight framing protocol.

file: src/tcobsv1Encode.c ↗ | tags: #byte-stuffing #encoding #embedded-c
Last analyzed: 2026-09-19 07:22:09.004500
Next check: 2026-09-26 07:22:08.991183
$ submit: