Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread goldsi...@gmx.de
Werner Motz wrote: tcpip_callback(tcp_write(pcb,ucrecBuff,supersize,TCP_WRITE_FLAG_COPY),NULL); tcpip_callback(tcp_output(pcb), NULL); Ouch! tcpip_callback() takes a void pointer as first argument. You are *first* calling tcp_write with the parameters supplied, then passing the return

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Dirk Ziegelmeier
The two APIs can coexist. regarding your code: Sorry, this code is so horribly wrong :-( I am sorry for being rude - you also need a LOT of education in C code. And, if your compiler compiles this, the warning settings are way too relaxed or you really should read and fix all compiler warnings.

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Werner Motz
I cannot because my webserver is already running with raw api. In my Send task I try now… tcpip_callback(tcp_write(pcb, ucrecBuff, supersize, TCP_WRITE_FLAG_COPY),NULL); tcpip_callback(tcp_output(pcb), NULL); but without success. After the first message sent the system crashed. I

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Dirk Ziegelmeier
Use socket API and you can use threads without problems. Possible alternative: http://www.nongnu.org/lwip/2_0_x/group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5 Dirk ___ lwip-users mailing list lwip-users@nongnu.org

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Werner Motz
...@nongnu.org] Im Auftrag von Dirk Ziegelmeier Gesendet: Donnerstag, 11. Mai 2017 12:54 An: Mailing list for lwIP users Betreff: Re: [lwip-users] lwip 2.0.2 + freertos + ARM7 Hello Werner, the following sentences are NOT meant in a harsh way, but as a good and polite advice to you: You

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Dirk Ziegelmeier
an I ensure that I am in the tcpip thread? > > > > > > *Von:* lwip-users [mailto:lwip-users-bounces+motz=smart-e-tech.de@nongnu. > org] *Im Auftrag von *Dirk Ziegelmeier > *Gesendet:* Mittwoch, 10. Mai 2017 19:04 > *An:* Mailing list for lwIP users > *Betreff:* Re: [l

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Werner Motz
] lwip 2.0.2 + freertos + ARM7 Sounds like you are calling lwIP functions from another thread than the lwIP thread, in your case the CAN thread. See http://www.nongnu.org/lwip/2_0_x/pitfalls.html Dirk ___ lwip-users mailing list lwip-users

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-10 Thread Dirk Ziegelmeier
Sounds like you are calling lwIP functions from another thread than the lwIP thread, in your case the CAN thread. See http://www.nongnu.org/lwip/2_0_x/pitfalls.html Dirk ___ lwip-users mailing list lwip-users@nongnu.org

[lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-10 Thread Werner Motz
Hello, I am using lwip 2.0.2 RAW API + freertos 8.2.3. I have to send a lot of data received by CAN to Ethernet. I receive CAN data in a CAN Interrupt and enque them here. In a 3ms task I periodically check the queue for new data and send them via tcp_write() and tcp_output(). It seems