Using sys bios6 from 6616 simulator..
Trying to create socket from a user defined task and getting error "
ti.sysbios.knl.Task: line 895: assertion failure: A_badPriority: An invalid task priority was used"
Task created like below:
taskParams.stackSize = 1024;
taskParams.priority = 15;
taskParams.arg0 = 2;
task = Task_create(taskFxn, &taskParams, &eb);
Socket function called and getting error from below line.
if(0 > (fd_ = ::socket(sockDomain, sockType, protocol)))
Please let me know why this is happening...Also this is not done in idle task as NDK may try to increase the priotiy. So why this problem is happening in a user defined task?
Do you setup a file descriptor (fd) session before calling the socket function? This can be done in the Task itself. e.g.:
static HANDLE hMyTask=0;
hMyTask = TaskCreate(taskFxn, "&tskFxn", OS_TASKPRINORM, OS_TASKSTKNORM, 0,0, 0);fdOpenSession(hMyTask);
The network stack subsystem internally uses tasks. It relies on task priorities to insure mutual exclusion so internal data structures are not corrupted. This means that application tasks that use networking need to have priorities lower than the network stack task(s) priority. This is documented in the NDK Reference Guide in Section 2.1.1. The default network task priority is 9, so your example above with priority of 15 will not work. It needs to be priority 7 or lower (explained in doc above). You can change the priority settings for the network stack through the graphical config tool (if you are using that) or via the C code that initializes the stack.
Hi Nick and Mark,
Thanks for your response.The priority problem is solved but still the socket is not getting created.
I saw at ROV that NDK task running at priority 5, i kept my app task priority at 1. Also I have used fdOpenSession() with task handle before creating the socket. But still the socket descriptor value is 0xffffffff. Also the fderror() output is also coming 0xffffffff.
I have put almost all the section in DDR3 still its OOM coming..is it the problem?
[TMS320C66x_0] 00000.000 fdOpenSession: OOM
[TMS320C66x_0] socket descriptor = ffffffff ffffffff
Please note I have configured my ccsv5 simulator as per http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Building_and_running_NDK_client_example_with_simulator.
Please help me to solve this problem.
if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))== INVALID_SOCKET)
System_printf(" socket descriptor = %x %x\n",s, fdError());
This looks like your heap is all used up. You can verify in ROV under heaps.
You can set/increase the heap size in your *.cfg file with the following:
BIOS.heapSize = <desired heap size>;
Well this got solved when I executed the same from the call back of Netstart.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.