Build system
- must reference respective C files
- must setup include directory hierarchy properly.
Application
- must provide ao.h, that includes all required modules (and excludes everything that is not needed, therefore saving space and minimizing the footprint).
- must provide ao_boot() (in almost all but the simplest cases)
- must provide several callbacks (optional)
Main Function
- must call ao_boot()
- for it is a task itself, it should loop indefinitely or explicity ao_stop() itself.
Main Function as Idle Task
void main()
{
ao_boot();
while (1) { }
}
Main Function as Idle Task in Low-Power System
void main()
{
ao_boot();
while (1)
{
ao_sys_idle();
}
}
Main Function Stopping Itself
void main()
{
ao_boot();
// Start another task.
ao_task_start( /* ... */ );
// Stop.
ao_stop();
}
Memory management
- everything static
- no need to allocate anything dynamically
- no “create” or “delete” functions
Memory initialization
- basic initialization = clear object (set zeros)
- some data structures require the assignment of auxiliary objects (such as a store for buffers)
- global variables are zeroed on start-up.