Chapter 3. Requirements for programs

Table of Contents
main() versus cyg_user_start()
Necessary headers
Necessary link instructions
Interrupt and exception handlers
Memory allocation
Assertions and bad parameter handling

eCos programs do not have to satisfy any unusual requirements, but there are always some differences between a program written for a real-time operating system as opposed to one written for a time sharing, virtual memory system like UNIX or Windows NT.

We present here a checklist of things to remember when writing eCos programs.

main() versus cyg_user_start()

The entry point for eCos user programs is usually cyg_user_start() instead of main(), although main() can be used if the ISO C library package is selected. Complete detail on the startup sequence is given in Chapter 4.