[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] LWIP client code causes hard fault error
From: |
shettys |
Subject: |
Re: [lwip-users] LWIP client code causes hard fault error |
Date: |
Tue, 26 Jun 2012 07:46:11 -0700 (PDT) |
I tried to intialize the tcp_err function as well but to no avail. However i
found out that it goes to the hard fault condition as soon as it begins to
execute the tcp_connect instruction in the TCPConnection_start function.
Also the impreciserr bit is set in the bus faults in the fault report.
Thanks.
Funk, Artur wrote:
>
>>Please correct me if i am wrong.
>
> No, you are not. I wasn't sure if the code is complete.
>
> I'm not sure if it could help, try to add a call back function to your
> TCPConnection_start function
>
> struct dataname
> {
> int length;
> char bytes[MAX_NAME_SIZE];
> };
>
>
> static void my_tcp_err(void *arg, err_t err)
> {
> struct dataname * dataname;
> dataname = (struct dataname*)arg;
> printf("\r\n Error occured");
> mem_free(dataname);
> }
>
>>>>> void TCPConnection_start(void)
>>>>> {
>>>>> struct ip_addr DestIPaddr;
>>>>>
>>>>> /* create new tcp pcb */
>>>>> pcb = tcp_new();
>>>>> if (pcb != NULL)
>>>>> {
>>>>> IP4_ADDR( &DestIPaddr, DEST_IP_ADDR0, DEST_IP_ADDR1,
>>>>> DEST_IP_ADDR2,
>>>>> DEST_IP_ADDR3 );
>>>>>
> tcp_err(pcb, my_tcp_err);
>>>>> /* connect to destination address/port */
>>>>>
> tcp_connect(pcb,&DestIPaddr,DEST_PORT,TCPConnection_Established);
>>>>> }
>>>>> }
>>>>>
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
--
View this message in context:
http://old.nabble.com/LWIP-client-code-causes-hard-fault-error-tp34071696p34072871.html
Sent from the lwip-users mailing list archive at Nabble.com.
- [lwip-users] LWIP client code causes hard fault error, shettys, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error, Sanchayan, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error, shettys, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error, shettys, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error, Sanchayan, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error, Funk, Artur, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error, shettys, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error, Funk, Artur, 2012/06/26
- Re: [lwip-users] LWIP client code causes hard fault error,
shettys <=
- Re: [lwip-users] LWIP client code causes hard fault error, shettys, 2012/06/26