The communication and tasking infrastructure of a realtime application makes up a significant portion of any embedded control system. Traditionally, the tasking and communication constructs are provided by an RTOS. We present an approach to automatically generate a robust framework for a single-node application from its architectural description. This framework sits atop a Ravenscar-compliant runtime as opposed to a standard RTOS. Finally, we present an extension of our approach to support code generation for distributed applications.