Skip to content

feat: replace the C++ SDK with the serial transport implementation - #6

Closed
X-F-R wants to merge 1 commit into
mainfrom
feat/serial-sdk-on-main
Closed

X-F-R wants to merge 1 commit into
mainfrom
feat/serial-sdk-on-main

Conversation

@X-F-R

@X-F-R X-F-R commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the protobuf-based C++ client SDK on main with a complete port of the litearm Python SDK over the raw serial framing protocol (SOF 0xA5, CRC16-CCITT-FALSE).

The two trees share no git history, so this lands as a whole-tree replacement rather than as a patch on the existing SDK. This branch is parented on main at ff66587 specifically to make the change reviewable as a PR; the diff below is the replacement, and it is large by nature.

Breaks consumers of the previous C++ SDK. include/litearm/arm.hpp, protocol.hpp and transport.hpp are rewritten in place, and codec.hpp, device.hpp, types.hpp and exceptions.hpp are removed along with proto/litearm.proto. Any caller of the current SDK stops compiling. Under this repository's version policy the commit carries no BREAKING CHANGE: marker, so it publishes as a minor.

Changes

  • Added the serial SDK: include/litearm/ (23 headers), src/ (18 translation units), examples/ (7 programs), tests/ (27 binaries), plus build.sh, env.sh, run_example.sh and the PowerShell equivalents.
  • Added cmake/litearmConfig.cmake.in, cmake/litearm.pc.in and cmake/toolchain-aarch64-linux-gnu.cmake for find_package, pkg-config and aarch64 cross builds.
  • Added TROUBLESHOOTING.md and UNVERIFIED_REGISTER.md, the latter listing 22 inherited gaps each with a file:line reference and machine-checked by tests/test_register.cpp.
  • Removed with the previous SDK: proto/litearm.proto, the codec, device, types and exceptions layers, tests/test_arm.cpp, test_arm_direct.cpp, test_codec.cpp, test_device.cpp, and docs/DEVELOPER_GUIDE.zh-CN.md.
  • Preserved unchanged: LICENSE, .github/workflows/ci.yml, .github/workflows/release.yml, .releaserc.json, .markdownlint.json.
  • Merged .gitignore is the union of both files, so neither side's build artifacts become trackable.

Known deviation from the repository documentation standard: docs/DEVELOPER_GUIDE.md and TROUBLESHOOTING.md are Chinese, where main keeps an English guide plus a .zh-CN variant. README.md follows the convention and is English.

Testing

The suite was run on this branch after the commit and before the push:

$ ./build.sh
...
100% tests passed, 0 tests failed out of 27

Total Test time (real) =  10.62 sec

The following tests did not run:
	 21 - test_protocol_sync (Skipped)

test_protocol_sync is skipped, not passing. It cross-checks the protocol constants against the firmware sources, which sit behind Gitee enterprise permissions. The skip is pre-existing and unrelated to this change; it is recorded as item 17 in UNVERIFIED_REGISTER.md.

The hardware claims in the commit message come from a separate real-arm session on firmware Litearm1.8.0-7J, reported in full in the accompanying verification report. They are not reproducible from CI, because the probes used are not committed.

The suite also passed in all three additional build modes on this commit:

$ ./build.sh --clean --werror    # 27/27 passed, test_protocol_sync skipped
$ ./build.sh --clean --asan      # 27/27 passed, test_protocol_sync skipped
$ ./build.sh --clean --tsan      # 27/27 passed, test_protocol_sync skipped

--werror is this repository's baseline: the library compiles under -Wall -Wextra with zero warnings.

Issues

None. No issue is referenced and this PR closes nothing.

This branch is a complete port of the litearm Python SDK over the raw
serial framing protocol. It shares no git history with main, so it
lands as a whole-tree replacement rather than as a patch on the
existing SDK.

Removed with the previous SDK: proto/litearm.proto, the codec,
device, types and exceptions layers, tests/test_arm.cpp,
test_arm_direct.cpp, test_codec.cpp, test_device.cpp, and
docs/DEVELOPER_GUIDE.zh-CN.md.

Preserved unchanged: LICENSE, .github/workflows/ci.yml,
.github/workflows/release.yml, .releaserc.json, .markdownlint.json.
.gitignore is the union of both files.

Scope: 49 commands, 27 test binaries, 379 cases, verified against a
7-axis arm on firmware Litearm1.8.0-7J.

Known deviation: docs/DEVELOPER_GUIDE.md and TROUBLESHOOTING.md are
Chinese, where main keeps an English guide plus a .zh-CN variant.
README.md follows the repository convention and is English.
@X-F-R X-F-R closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant