The ABCD Proto-Kernel™

Distribution Version 1.2





The ABCD Proto-Kernel™ is a software for deeply embedded systems. Such systems use a micro-controller or microprocessor to implement electronic monitoring and/or control of a device, but do not otherwise look like a computer.


The ABCD Proto-Kernel™ provides an elegant solution to the recurring problem of providing a “real-time operating system” for embedded projects small enough that the need for an operating system might be questioned in the first place. This solution is as simple as ABCD, respectively for

            a) interrupt dispatching,

            b) fixed priority scheduling,

            c) mutual-exclusion semaphores, and

            d) a queuing mechanism.

This is a coherent selection of a minimal subset of the myriad of programming facilities provided by full-blown real-time operating systems.

 

Note:   The ABCD Proto-Kernel™ distribution contains a number of additional software components, which are geared towards a comprehensive hardware/software prototyping kit. Click here to learn about the ABCD Proto-Kernel from this integrated solution perspective.




 

1.     Publicly Available Files


The ABCD Proto-Kernel™ Guide is the reference document. If you are interested in knowing more before looking at the complete distribution, this is recommended reading.


The complete ABCD Proto-Kernel™ distribution version 1.2 is available.




 

2.     Licensing


The Free Software Foundation licensing model has been adopted for the ABCD Proto-Kernel™ software library, with specific provisions to account for the practicalities of the embedded software products:

Developers using the ABCD Proto-Kernel™ software library expected to make products out of custom electronics, process know-how, and software. The software is made of two parts: 1) the ABCD Proto-Kernel™ library and 2) application-specific software. The ABCD Proto-Kernel™ licensing scheme is intended to support proprietary application-specific software, under certain conditions. Please refer to the specific licensing terms for the various software components put together in your application.




 

3.     Target Microprocessor Family


The ABCD Proto-Kernel™ is designed with sophisticated microprocessors in mind. The first implementation targets the PowerPC, and more specifically, the Motorola MPC8xx processor family. Even if the ABCD Proto-Kernel™ is defined and documented with some abstraction from the actual implementation, references to the MPC8xx processor family are sometimes unavoidable.


The specific hardware product targeted by the ABCD Proto-Kernel™ implementation is the PPCMB/850 processor board.




 

4.     ABCD “Proto”-Kernel Like “Protozoa,” Not Necessarily “Prototype”


Protozoa are “very small and simple living things found in water” and the ABCD Proto-Kernel™ versions are “very small and simple functional operating systems found in devices.” Protozoa species and ABCD Proto-Kernel™ versions share all the essential characteristics of their respective advanced counterparts (plants and animals for protozoa, overly complex real-time operating systems for the ABCD Proto-Kernel™).


After millions of years of evolution, the protozoa are still present on earth among the advanced life forms. The ABCD Proto-Kernel™ exhibits this capability to last, due to the right fit to the real-time challenges at the very beginning.


A prototype usually disappears when turned into a production product. The ABCD Proto-Kernel™ is not designed as the lasting foundation of deeply embedded systems.




 

5.     Basic ABCD Concepts


 

5.1     ‘A’ - Interrupt Dispatching


A basic function of any operating system or kernel is to handle the microprocessor interrupts. This is usually closely tied to the microprocessor architecture. The ABCD Proto-Kernel™ provides a unified handling of interrupts that logically dispatch the interrupt signals to the interrupt service routine (ISR) that correspond to the exact source of the interrupt, as if the microprocessor had a large number of independent interrupt vectors. In doing so, the ABCD Proto-Kernel™ prepares the ISR execution context (some limitations apply to the software statements that make up the ISR). Lastly, the interrupt handling includes ISR epilogue facilities that restore a normal software task context once the ISR processing is complete.


It is the application developers' responsibility to code the interrupt services routines required by the application, to register them with the ABCD Proto-Kernel™ interrupt dispatching, and to request the enabling of the interrupt source associated with each ISR.

top

 

5.2     ‘B’ - Fixed Priority Scheduling


Any operating system or kernel provides multi-tasking of some sort. The ABCD Proto-Kernel™ scheduling is a simple control program that supports multi-tasking with fixed priority and no time-slicing. This scheduling ensures that the highest priority task that is not blocked is indeed allowed to run until it preforms a blocking action. A task is blocked when it waits for an event to be signaled in a queue (the ‘D’ portion of ‘ABCD’) or for a mutual exclusion semaphore to be relinquished (the ‘C’ portion of ‘ABCD’).


Except for the ISRs, the application software is known by the ABCD Proto-Kernel™ as a fixed list of tasks, with a priority ordering. It is the application programmers' responsibility to code the tasks with appropriate blocking actions, so that the system functions are performed as intended.

top

 

5.3     ‘C’ - Mutual-Exclusion Semaphores


Mutual exclusion semaphores (mutexes) are a classical operating system textbook concept. They provide a guarantee that task scheduling will never induce occasional interfere between two or more tasks that must access a resource in turns. The ABCD Proto-Kernel™ mutex implementation includes the basic facilities of mutual exclusion semaphores, plus an ordering facility that enforces a discipline in the mutex reservation order (thus preventing potential deadlocks).


It is the application developers' responsibility to determine where mutexes should be used for orderly access to the application resources by multiple tasks. The definition of resources is strictly an application issue (e.g. a set of global variables that must remain coherent such as a x,y,z vector for a three dimensional position). Likewise, the association of a resource to a semaphore is also an application issue.

top

 

5.4     ‘D’ - A Queuing Mechanism


The queuing mechanism contributes a lot to the ABCD Proto-Kernel™ potential. At the outset, a queue is a simple memory-based FIFO which tasks and ISRs can access freely because the microprocessor memory is neither protected nor managed by the kernel. The queuing mechanism is used with the scheduling facilities to provide the preferred way of blocking a task, and the preferred ISR-to-task signaling method (queues can always be used independently of scheduling). It is possible for multiple tasks and ISRs to insert entries into the same queue, without any special coding for synchronization. We recommend to use the C++ interface to the queuing mechanism because the C++ type checking detects more software coding errors at compile-time (sparing valuable target system testing time).


The application developers should study the details of the ABCD Proto-Kernel™ queuing mechanism to understand how it shapes the design of the application software. Typically, the design will encompass one or two ‘event queues’ (a minor abuse of language since an event queue is no different from any other queue) on which the task will block. The application software design will then define for each queue, the specific events that trigger queue entry insertions.top





[ PPCMB/850 products | ABCD Proto-Kernel(tm) software | FlashCnL software | MPC8xx-POMP free compiler binaries | Industry Links ]


[ CONNOTECH home page: http://www.connotech.com | e-mail to: info@connotech.com ]