We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, All I tried to use http web service on MCB1800 eval board with RTX multi-tasking configuration, and found that init_TcpNet() never return if I call it in a task, the following is my code which I followed rtx example codehttp://www.keil.com/support/man/docs/rlarm/rlarm_tn_using_withkernel.htm I set breakpoints on init_TcpNet and it never returns, if I call it on main(), it worked. Any help will be appreciated. Thanks!
__task void tcp_tick (void) { os_itv_set (10); while (1) { os_itv_wait (); /* Timer tick every 1000 ms */ timer_tick (); } } __task void tcp_main (void) { while (1) { main_TcpNet (); os_tsk_pass (); } } __task void Httptcp_init (void) { //system_init (); init_TcpNet (); os_tsk_create (tcp_tick, 2); os_tsk_create_user (tcp_main, 1, Task1_Stack, sizeof(Task1_Stack)); /* Init done, terminate this task. */ os_tsk_delete_self (); } int main (void) { os_sys_init (Httptcp_init); }
Just to clarify my last post. The task-specific inits are for any priv mode chores that need to be done prior to task creation (the tasks have not yet been created, obviously).
For example, within Task1Init() could be the call to init_TCPNet() if that task will handle any TCPNet related processing. Sorry if there was any confusion, as I was not really clear on that point.
Thanks for clarification, I understand what you saying. For now, I will probably run on privillege mode since we are going to need update the system once a while.