HI
Hi,
at first look on your main.c - there is no clock init. Also it looks like that the PEX_RTOS_INIT macro (where may be clock init) is not defined too.
Anyway - good starting point is FreeRTOS example - part of SDK:
Hope it helps.
Jiri