Staapl is a collection of abstractions for metaprogramming microcontrollers from within PLT Scheme. The core of the system is a programmable code generator structured around a functional concatenative macro language adapted to a 2-stack machine model. On top of this it includes a syntax frontend for creating Forth style languages, a backend code generator for the Microchip PIC18 microcontroller architecture, and interaction tools for shortening the edit-compile-run cycle. It is structured as a code library to facilitate integration into larger systems employing a model-based design approach. The primary, practical goal is to provide a tool chain for programming low-end (8-bit) microcontrollers in a Forth-style language extended with powerful metaprogramming facilities. The secondary goal is to generalize and modularize this approach and extend it in two directions: to provide a standard machine model as an abstraction point for a large class of small embedded processo