This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

init_TcpNet not working for RTX MCB1800 eval board

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);
}

Parents
  • 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.

Reply
  • 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.

Children