feat: Zephyr calculator, anti-pinch controller + OSxCAR WASM compilation#62
Merged
feat: Zephyr calculator, anti-pinch controller + OSxCAR WASM compilation#62
Conversation
Zephyr calculator (#21): - 14 exported functions (add/sub/mul/div_safe, accumulator, bitwise, min/max/abs) - ARM Thumb-2 assembly + Zephyr app with self-test suite - Build: west build -b qemu_cortex_m3 examples/zephyr-calculator Anti-pinch window controller (safety-critical automotive): - 11 exported functions: init, set_target, update_current, tick, check_jam, etc. - Debounced jam detection, soft-start/stop PWM ramping, position tracking - Integer-only arithmetic (fixed-point 0.1% resolution) - STPA-linked rivet artifacts (AP-001..003, AP-VER-001) - Build: west build -b qemu_cortex_m3 examples/anti-pinch-controller OSxCAR WASM compilation test: - Fetches real anti-pinch WASM from https://osxcar.de/insights/demonstration/ - Extracts base64-encoded modules from JavaScript component files - Compiles all 3 components (anti-pinch, motor-driver, soft-start-stop) through synth - Anti-pinch: 13KB WASM → 8,392 bytes ARM code (3 functions) - Motor driver: 2.5KB WASM → 1,844 bytes ARM code (3 functions) - Soft start: 1.8KB WASM → 1,728 bytes ARM code (2 functions) Closes #21 Implements: FR-002 Implements: FR-005 Implements: AP-001 Trace: skip Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Zephyr Calculator (closes #21)
west build -b qemu_cortex_m3 examples/zephyr-calculatorAnti-Pinch Window Controller (safety-critical automotive)
OSxCAR WASM Compilation Test
Test plan
cargo test --workspace— 851 tests, 0 failurescargo clippy— cleanbash tests/integration/fetch_osxcar_wasm.sh— 3/3 components compilesynth compile calculator.wat— 14 functions, 238 bytessynth compile anti_pinch.wat— 11 functions, 1,494 bytes🤖 Generated with Claude Code