Hi,
I've taken the webserver example and modified it somewhat for my needs. There is a task that starts RTCS and the HTTP server and both start just fine. At the end of the original example code a call to _task_block() is made. Due to my rearrangement of things none of the variables--like the parameters passed to the HTTP server start function--are on the stack so I thought I could remove _task_block() and let that task expire. However now I get the MQX_UNHANDLED_INTERRUPT when I try to connect to the server from a browser.
I tried using _int_install_expected_isr() but it does seem to want to print anything. Breaking in that routines shows vector 3 which I need to look up.
If interrupts are installed by the routines that configure and start the network are they somehow uninstalled if that task expires? Since the TCP/IP and HTTP tasks are spawned from this "boot" task why can't it go away?
Thanks,
Kenny
K64 IAR
Hi Kenny:
I think this issue is resulted from memory. main_task allocated some memory with _mem_alloc_zero, when the task is terminated, MQX RTOS returns the task's private memory blocks to memory. You can change the _mem_alloc_zero to _mem_alloc_system_zero, then the main task can be expired.
Please check the following line.
In main_task,
| indexes[i] = (char*) _mem_alloc_zero(sizeof("\\index_x.html")); |
In HTTPSRV_init, there are also 3 lines need to be changed
Have a great day,
Daniel
Thanks Daniel. I hope to give this a try soon.