Skip to content

fix: medium ARM bugs + cross-compilation pipeline design#60

Merged
avrabe merged 2 commits intomainfrom
feat/medium-fixes-pipeline-plan
Mar 21, 2026
Merged

fix: medium ARM bugs + cross-compilation pipeline design#60
avrabe merged 2 commits intomainfrom
feat/medium-fixes-pipeline-plan

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Mar 21, 2026

Summary

Medium Bug Fixes (7 issues)

  • M2: B.W branch offset J1/J2 follows ARM T4 encoding spec
  • M3: Binary reset handler implements .data copy + .bss zero loops with MOVW/MOVT
  • M4/M5: ELF entry point and STT_FUNC symbols have Thumb bit set
  • M6: R10 (memory size) initialized in startup code
  • M8: Vector table alignment 256 bytes (was 128, too small for 34 entries)
  • M10: MPU device() preset distinct from strongly_ordered() (bufferable=true)

Cross-Compilation Pipeline Design

  • Design doc: docs/design/cross-compilation-pipeline.md — 3-phase plan from bare-metal through Zephyr to real hardware
  • 12 cross-compilation artifacts (XC-001..009): kiln-builtins stub, Bazel build, linker detection, --link flag, board-specific scripts, 4-level test progression
  • 9 gale integration artifacts (GI-001..005): Zephyr module co-deployment, target triple compat, WASM task isolation via gale primitives, WIT interfaces
  • rivet.yaml: added gale external for cross-repo traceability

Test plan

  • cargo test --workspace — 851 tests, 0 failures
  • cargo clippy — clean
  • cargo fmt --check — clean

🤖 Generated with Claude Code

avrabe and others added 2 commits March 21, 2026 17:28
Medium bug fixes (7 issues from embedded code review):
- M2: B.W branch offset J1/J2 encoding follows ARM T4 spec
- M3: Binary reset handler uses MOVW/MOVT, .data copy + .bss zero loops
- M4: ELF entry point has Thumb bit set for ARM targets
- M5: STT_FUNC symbol values have Thumb bit set
- M6: R10 (memory size) initialized in startup code via MOVW/MOVT
- M8: Vector table alignment increased to 256 bytes (was 128)
- M10: MPU device() preset sets bufferable=true (was identical to strongly_ordered)

Cross-compilation pipeline design:
- docs/design/cross-compilation-pipeline.md — 3-phase plan:
  Phase 1: bare-metal (synth → module.o → ld → firmware.elf → Renode)
  Phase 2: Zephyr (assembly path via west build + gale module)
  Phase 3: hardware (STM32F4-Discovery, nRF52840-DK)
- artifacts/cross-compilation.yaml — 12 artifacts (XC-001..009, XC-TR-001..003)
- artifacts/gale-integration.yaml — 9 artifacts (GI-001..005, GI-TR-001..002, GI-VER-001..002)
- rivet.yaml — added gale as external reference

Implements: FR-005
Fixes: NFR-002
Trace: skip

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
252 artifacts across 17 types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit cad2825 into main Mar 21, 2026
6 checks passed
@avrabe avrabe deleted the feat/medium-fixes-pipeline-plan branch March 21, 2026 17:06
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