I am trying to use NDK to port some socket code to C6678. The code currently has a stack overflow when calling connect().
The code is very basic, calls
- s=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP)
- sets up (struct sockaddr *) with the host's IP and hard-coded port number
- connect(s,&sock_addr_in,sizeof(sock_addr_in))
If useful, here is the executable
I've tried changing the stack size in the linker options but this seems to have no effect - it still overflows. Is there something I'm doing wrong?
Here is a log with error report
[C66xx_0] ### Starting boot sequence
[C66xx_0] QMSS successfully initialized
[C66xx_0] CPPI successfully initialized
[C66xx_0] PA successfully initialized
[C66xx_0] Using hard wired IP address
[C66xx_0] PASS successfully initialized
[C66xx_0] Ethernet subsystem successfully initialized
[C66xx_0] Ethernet eventId : 48 and vectId (Interrupt) : 7
[C66xx_0] Verify_Init: Expected 0 entry count for Queue number = 911, found 1 entries
[C66xx_0] Verify_Init: Expected 0 entry count for Queue number = 913, found 1 entries
[C66xx_0] Registration of the EMAC Successful, waiting for link up ..
[C66xx_0] Network Added: If-1:192.168.1.181
[C66xx_0] Hello from processor 0
[C66xx_0] HOST IS 192.168.1.180
[C66xx_0] makeInetConnect b401a8c0 4000
[C66xx_0] trying..
[C66xx_0] ti.sysbios.knl.Task: line 330: E_stackOverflow: Task 0x8006cba8 stack overflow.
[C66xx_0] xdc.runtime.Error.raise: terminating execution