Technical Report
TinyRealTime—An EDF Kernel for the Atmel ATmega8L AVR
Dan Henriksson, Anton Cervin
Abstract
This report describes the design and implementation of TinyRealTime, an event-based real-time kernel for the Atmel AVR ATmega8L 8-bit micro-controller. The kernel is event-based and supports fully preemptive earliest-deadline-first scheduling of tasks. Semaphores are provided to support task synchronization. The focus of the report is on the memory management, timing, and internal workings of the kernel.
The flash memory footprint of the kernel is approximately 1200 bytes and it occupies 11 bytes of SRAM memory for the kernel data structure plus an additional 11 bytes for each task and one byte for each semaphore. An application example is described, where the real-time kernel is used to implement concurrent control of two ball and beam laboratory processes using six application tasks.
Keywords
Real-time kernel, Atmel AVR, Event-based, Earliest-deadline-first, Synchronization, Memory management, Control system application
Technical Report ISRN LUTFD2/TFRT--7608--SE, Department of Automatic Control, Lund University, Sweden, February 2004.