Skip to content

feat(firmware): Mini firmware as mini/ variant on the root stewart-core - #30

Merged
knaufinator merged 2 commits into
phoenixfrom
feat/firmware-unification
Jul 19, 2026
Merged

feat(firmware): Mini firmware as mini/ variant on the root stewart-core#30
knaufinator merged 2 commits into
phoenixfrom
feat/firmware-unification

Conversation

@knaufinator

Copy link
Copy Markdown
Owner

Firmware unification — step 1

Folds the standalone Mini-6DOF firmware into this repo as a second build-time variant alongside Controller/, both sharing the single root stewart-core submodule. Source files were copied in (not a subtree/submodule of Mini-6DOF). Per 6dof/FIRMWARE_UNIFICATION.md + DECISIONS 2026-07-18.

Variant map

Variant Dir Backend MCU Servo rate
normal (full) Controller/ MCPWM step/dir → AASD-15A; W5500 PCBv1 ESP32 / PCBv2 ESP32-S3 250 Hz
mini (desktop) mini/ LEDC PWM → hobby servos ESP32 analog 50 Hz (→ digital 250 Hz via SERVO:RATE)

Both point at ../stewart-core via EXTRA_COMPONENT_DIRS + PRIV_REQUIRES stewart-core.

Changes

  • Copy Mini-6DOF Controller/mini/ (excludes .git, build/, generated sdkconfig, its own components/stewart-core).
  • Rewire mini/CMakeLists.txt to the root submodule (mirrors Controller/). No components/stewart-core reference remains.
  • Advance root stewart-core e5ef989 → a820e74 (origin/main head: "add output-stage intensity + per-axis gain/invert, schema v6"). Required — the mini Phase-3 firmware uses mcaGetIntensity/mcaSetAxisGain/mcaApplyOutputStage + axis_gain/axis_invert, which live in the shared core per the locked decision.
  • Mini 3D parts → cad/mini/.
  • firmware/README.md (variant map) + rewritten mini/README.md (hardware/pinout/geometry/commands). Both note the config-follows-flashed-features direction and the deferred Controller/normal/ + firmware/common/ refactor.

Build-verified (ESP-IDF v5.5, both "Project build complete" + fresh bin)

  • mini → esp32 → mini_6dof.bin
  • Controller → esp32s3 → stewart_platform.bin (unaffected by the submodule bump)

Deliberately NOT done

Mini-6DOF not archived · no hardware flashed · no handshake re-architecture · no Controller/normal/ move · draft, not merged.

🤖 Generated with Claude Code

knaufinator and others added 2 commits July 19, 2026 09:15
…root stewart-core

Fold the standalone Mini-6DOF firmware into this repo as a second build-time
firmware variant alongside `Controller/`, both sharing the single root
`stewart-core` submodule. Source files copied in (not a subtree/submodule of
Mini-6DOF). Part of the firmware-unification effort (6dof/FIRMWARE_UNIFICATION.md,
DECISIONS 2026-07-18).

Variant map
- `Controller/` = normal (full system): MCPWM step/dir -> AASD-15A; PCBv1 ESP32 /
  PCBv2 ESP32-S3; W5500 Ethernet.
- `mini/`       = mini (desktop): LEDC PWM -> hobby servos; analog 50 Hz,
  runtime-switchable to digital 250 Hz via SERVO:RATE.
- Both point at ../stewart-core (single source of truth = atan2f).

Changes
- Copy Mini-6DOF `Controller/` tree into `mini/` (main/, include/, CMakeLists.txt,
  partitions.csv, sdkconfig.defaults, embedded demo .m6p). Excludes .git, build/,
  generated sdkconfig, and the mini's own components/stewart-core submodule.
- Rewire `mini/CMakeLists.txt` to the root submodule via
  `set(EXTRA_COMPONENT_DIRS ".../stewart-core")`, mirroring Controller/. The mini's
  `main/CMakeLists.txt` already PRIV_REQUIRES stewart-core; it now resolves to the
  root component. No `components/stewart-core` reference remains.
- Advance the root `stewart-core` submodule e5ef989 -> a820e74 (origin/main head:
  "feat(mca): add output-stage intensity + per-axis gain/invert, schema v6").
  Required: the mini Phase-3 firmware calls mcaGetIntensity / mcaSetAxisGain /
  mcaApplyOutputStage and MotionCueingConfig.axis_gain/axis_invert, which the old
  pin predates. Per the locked decision these cue params live in the SHARED core.
- Copy mini 3D parts into `cad/mini/` (servo mount, seat rails, pcb mount).
- Add `firmware/README.md` (variant map + build) and rewrite `mini/README.md`
  (variant framing, hardware/pinout/geometry, servo-rate profile, commands).
  Both document the config-follows-flashed-features direction (FINGERPRINT
  advertises caps; app/bridge derive config) and the deferred Controller/->normal/
  + firmware/common/ refactor.

Build-verified on ESP-IDF v5.5 (both reach "Project build complete" with fresh bins):
- mini      -> esp32   -> mini_6dof.bin
- Controller -> esp32s3 -> stewart_platform.bin (unchanged by the submodule bump)

Not done here (deliberately): Mini-6DOF not archived; no hardware flashed; no
handshake re-architecture; no Controller/->normal/ + firmware/common/ move.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… job + close trigger gaps

Address coordinator review on the firmware-unification PR:

- Move firmware/README.md -> repo-root FIRMWARE.md (variant map lives next to
  mini/ and Controller/); remove the lonely firmware/ directory. Fix all
  relative links (../ prefixes) now that it sits at the root.
- Drop mini/build-esp-idf.ps1 (redundant with the 6dof-esp-build skill);
  mini/README.md now points at the skill for headless builds.
- CI (.github/workflows/ci.yml): add a "Build Mini Firmware (ESP-IDF)" job that
  builds mini/ for esp32 (mirrors the ESP32-S3 Controller job: recursive
  submodules, esp-idf-ci-action v5.5.2, uploads mini_6dof.* artifacts).
- Broaden path triggers so a shared-core bump can't slip past CI:
  * ci.yml (firmware + SIL): add mini/**, stewart-core (submodule gitlink),
    and the workflow file itself.
  * unit_tests.yml (C math tests): add stewart-core — the math under test now
    lives in the submodule, so a bump must retrigger the tests. This is the
    exact gap that let the e5ef989->a820e74 bump go unverified.

Re-verified: mini esp32 build still reaches "Project build complete" with a fresh
mini_6dof.bin. App/SIL tests confirmed 47/47 against a820e74 by the coordinator.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@knaufinator
knaufinator marked this pull request as ready for review July 19, 2026 13:30
@knaufinator
knaufinator merged commit d49bf2c into phoenix Jul 19, 2026
7 checks passed
@knaufinator
knaufinator deleted the feat/firmware-unification branch July 19, 2026 13:30
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