I am trying to configure RTX Kernel for LPC1768. I use RTX help from "http://www.keil.com/support/man/docs/rlarm/rlarm_ar_create_newapp.htm"
In the help a file named RTX_Config.c is suggested (but it is not there at the suggested place) then I imported RTX_Conf_CM.c. Rest of the steps I have followed.
But still Only one execution thread is running. here is structure of my code.
__task void CommandHandeler (void); __task void init(void); __task void MainThread(void); __task void init(void) { Print("Check 5."); os_tsk_create (MainThread, 2); Print("From thread 0"); os_tsk_create (CommandHandeler, 1); while(1) os_dly_wait (5); } __task void MainThread(void) { while(1) { delay(10000); Print("From thread 1."); } } __task void CommandHandeler(void) { Action Act; while(1) { delay(20000); Print("From thread 2."); } } int main (void) { SystemInit(); SystemClockUpdate(); UARTInit(0, 9600); /* baud rate setting */ os_sys_init(init); }
This is the Output of that coded: Check 5. From thread 1. From thread 1. From thread 1. : :
Rest of the print never comes.
Thanks in advance.
__task void init(void) { Print("Check 5."); os_tsk_create (MainThread, 1); Print("From thread 0"); os_tsk_create (CommandHandeler, 1); while(1) os_dly_wait (5); }
change the priority of MainThread to 1, as the above shows, then see what will happen.