Skip to content

arm backend compiles only exports, not the reachable call graph - blocks self-contained firmware #275

@avrabe

Description

@avrabe

Thanks for synth! Building falcon firmware from jess (hardware integration), I want to check the intended path to a self-contained Cortex-M binary.

Observation

synth compile --cortex-m (default arm backend) emits only exported functions:

  • falcon's component → 4 functions; the meld-fused core (280 functions) → 24 functions, ELF ~5 KB.
  • nm on the ELF shows only the exports + Reset/Default/Trap handlers; the non-exported internal functions (the IEKF→geometric→ADRC→mixer cascade) are absent.

So run-stabilization's body calls into functions that aren't in the ELF — the binary isn't self-contained and can't execute the control logic on Renode/QEMU/hardware (it runs correctly in wasmtime and on kiln, where the whole module is present).

Repro

synth compile falcon-fused.wasm --cortex-m --all-exports -o falcon.elf
nm falcon.elf   # ~24 T symbols for a 280-function module

Question

Is whole-reachable-graph compilation planned for the arm backend (compile the closure of the exports, not just the exports)? Or is --backend w2c2 --link (wasm2c → arm-none-eabi-gcc + kiln builtins) the intended route for a complete firmware? Here --backend w2c2 reports "external tool not installed", so the path isn't obvious to a downstream consumer.

Impact / suggestion

A downstream integrator can't yet produce a runnable falcon firmware. Either a "compile reachable graph from exports" mode on the arm backend, or a short doc on the supported w2c2 --link toolchain (w2c2 + arm-none-eabi-gcc + obtaining kiln-builtins) would unblock on-target HIL. Happy to test either against falcon. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions