Showing posts with label Embedded C. Show all posts
Showing posts with label Embedded C. Show all posts

The “super loop” software architecture



What is the minimum software environment you need to create an
embedded C program?

Solution


void main(void)
{
/* Prepare for task X */
X_Init();
while(1) /* 'for ever' (Super Loop) */
{
X(); /* Perform the task */
}
}

why c ?

* It is 'mid-level', with 'high-level' features (such as support for functions and modules), and 'low-level' features (such as good access to hardware via pointers);




* It is very efficient;

* It is popular and well understood;

* Even desktop developers who have used only java or c++ can soon understand c syntax;

* Good, well-proven compilers are available for every embedded processor(8-bit to 32 bit or more);

* Experienced staff are available;