ecrobot_device_terminate. The first one is called when the program starts and the second one when it stops. They usually initialize and deinitialize sensors, encoders, and other robot devices. The random number generator is initialized in
user_1ms_isr_type2function, which is called every millisecond.
TASK (OSEK_Task_Number_0). This is where most of the programming is done.