Each sample application contains a p2_init() function that gets called before uC/OS-II starts. Since not all OS services are available, only the following operations are permitted in p2_init():

Some things you should not do:

Operations not permitted in p2_init() need to be done in your tasks before the while(1) loop. If Task A requires Task B to do something, then a semaphore should be used to provide synchronization.