Component-oriented software development poses a promising approach of controlling the increasingly growing complexity of computer programs. The application of reusable, debugged and thus fully developed software components can accelerate the development of complex computer programs and the quality of the final product is considerably increased by the assured quality of the individual component.

The usage of existing component technologies from the field of PC- respectively server-software like COM or Corba, however, is out of question for embedded systems with very limited resources for example on the basis of 8 or 6-bit microcontrollers as these technologies need a large amount of additional computer resources like memory capacity and computing time. Additionally required resources quickly enforce a more effective and thus more costly microcontroller as a consequence. This is not acceptable for devices that are produced in very high quantities.

In addition, a reusable software component always has to cover the greatest possible functional range for all imaginable applications in order to be applicable in the most flexible way without changes. If such software components are used for a certain application in existing component systems, a considerable part of the functional range is often not needed at all but just wastes unnecessary resources like memory capacity and computing time. For the above mentioned reasons this is unacceptable in computer systems with very limited resources.

In order to remove such unnecessary functional ranges from a component afterwards, software components for the embedded area have to be defined on the level of source code instead of on the level of binary code as in the PC and server-software area as all possibilities for optimization are still available then.

Some of these challenges can in principle be solved by the extensive use of C-pre-processors. However, the result of it is a hardly maintainable accumulation of deeply nested conditionally compiled code parts using the pre-processor constructs #if respectively #ifdef while these code parts are themselves in turn full of deeply nested macro definitions using the pre-processor construct #define.

As such a code turns out quickly to be hardly maintainable in the real design of C modules or C++ classes you typically restrict yourself to only a few special cases you consider to be important at that moment. Of course, the possibilities for the flexible reuse are then considerably limited.

Based on our long lasting efforts to program in a component-orientated and still maintainable way directly in C, for example by means of the smartest possible use of C pre-processor, we at SoftComponents have developed a solution to this challenge - Generi-C.