How nimblemachines/muforth works
muforth is a host-side, indirect-threaded Forth used primarily as a tethered cross-compiler and interactive tool for embedded systems. The documented workflow is to start the host, load its Forth environment, choose a target build environment, compile code on the host, then transfer and execute the result on a device. The README documents this workflow and supported architecture families; source excerpts show the executable entry point and core runtime responsibilities, but do not expose most target-specific call paths.
Main entry points: muforth.h Runtime definitions · target Target environments · spleen_font.c Spleen font data · main.c Host executable
Components 23
Host Forth runtime
- Host executable
src/main.c - Forth initialization
src/muforth.c - Forth startup
mu/startup.mu4 - Dictionary
src/dict.c - ITC engine
src/engine-itc.c - Core primitives
src/kernel.c - Extended arithmetic
src/mp-math.c - Spleen font data
src/spleen_font.c - 8×16 font table
src/spleen8x16.h - 12×24 font table
src/spleen12x24.h - Runtime definitions
src/muforth.h
Cross compilation
- Target environments
mu/target - Assemblers
mu/target - Target tools
mu/target - Bitmap fonts
mu/bitmap-font
Embedded targets
- Compiled code
mu/target - Microcontroller
- MIDI projects
mu/target/6809/midi
Host interfaces
- File primitives
src/file.c - Terminal support
src/tty.c - Linux USB
src/usb-linux.c - macOS USB
src/usb-darwin.c
Other components
- Developer
Connections 17
- Developer → Host executable: starts
README.md - Host executable → Forth initialization: calls init/start
src/main.c - Forth initialization → Forth startup: loads at startup
README.md - Developer → Target environments: chooses target
README.md - Target environments → Assemblers: provides tools
README.md - Target environments → Target tools: provides tools
README.md - Developer → Forth startup: interacts with
README.md - Assemblers → Compiled code: compiles for
README.md - Target tools → Microcontroller: supports bring-up
- Compiled code → Microcontroller: transfers and runs
README.md - File primitives → Runtime definitions: uses declarations
src/file.c - Terminal support → Runtime definitions: uses declarations
src/tty.c - Linux USB → Runtime definitions: uses declarations
src/usb-linux.c - macOS USB → Runtime definitions: uses declarations
src/usb-darwin.c - Spleen font data → 8×16 font table: includes table
src/spleen_font.c - Spleen font data → 12×24 font table: includes table
src/spleen_font.c - Bitmap fonts → Compiled code: supports font generation