Thanks David and Simon for these informations. Seems more clear in my mind now.

I tried to provide more MEM_SIZE memory without success.

Finally I got my error, I wrote tcp_write instruction with pointer on
a static memory. Removing the static solved my issue.



- #define PBUF_POOL_SIZE 256
- #define PBUF_POOL_BUFSIZE 1700

[..]

- The following line indicates me that the pbuf will be placed in RAM

tcp_pbuf_prealloc(layer, length, mx, os, pcb, api, fst) pbuf_alloc((layer),
(length), PBUF_RAM)

Just to add to Simon's post: please be aware that PBUF_RAM allocations never
draw from the PBUF POOL that you've defined above. If you want that to
happen, define a custom pool instead, and (if relevant) avoid PBUF_POOL
allocations in your own code. Otherwise you'll need a heap (ie MEM_SIZE). As
far as I can tell, although I'd love to be corrected, there is no way to
have a statically sized pool that is used for both PBUF_RAM and PBUF_POOL
allocations.

David
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to