Problem socket() on mqx3.8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem socket() on mqx3.8

Jump to solution
749 Views
clemNantes
Contributor I

Hi everyone,

 

I have a problem using the socket() function in mqx 3.8 when program pass on this function it look like the processor have interruption pending every-time.

My code :

 

sock_handle = socket(AF_INET, SOCK_STREAM, 0);
                        if(sock_handle == RTCS_SOCKET_ERROR)
                        {
                            printf("socket failed\n\n");
                            //_mqx_exit(0);
                        }else

 

when I execute this code it launch the isr default function of mqx...

Is anyone have an idea? Or the same problem?

I use mqx 3.8 with codewarrior 10.2 on the TWR-K60N512 dev-Kit

 

Best regard,

 

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
532 Views
fcw
Contributor IV

I've found the most typical cause of the default interrupt trap is a stack overflow. I've also found (the hard way) that the yes/no Overflow indication shown in the stack usage MQX RTOS plug-in window isn't always correct. Take a look at task details to make sure.

View solution in original post

0 Kudos
Reply
3 Replies
533 Views
fcw
Contributor IV

I've found the most typical cause of the default interrupt trap is a stack overflow. I've also found (the hard way) that the yes/no Overflow indication shown in the stack usage MQX RTOS plug-in window isn't always correct. Take a look at task details to make sure.

0 Kudos
Reply
532 Views
CorderBollie
Contributor II

Shouldn't you use PF_INET (protcol family IP addressing) instead of AF_INET?

0 Kudos
Reply
532 Views
butok
NXP Employee
NXP Employee

>>Shouldn't you use PF_INET (protcol family IP addressing) instead of AF_INET?

Eventually, it is the same.

 

Best regards,

Andrey Butok

0 Kudos
Reply