lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] lwIP with FreeRTOS memory problem


From: pekez
Subject: [lwip-users] lwIP with FreeRTOS memory problem
Date: Mon, 28 Nov 2016 11:17:31 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0

Hello people,

I've been trying to figure out how lwIP uses memory and it's really important to know exact (or maximum) amount of memory that lwIP uses. I am using lwIP v1.4.1 with FreeRTOS v8.2.3 on ZYNQ custom board. Right now, I am working with application examples provided by Xilinx (XAPP1026). On ZYNQ board, I am running iperf server, and on PC iperf client.

When both MEMP_MEM_MALLOC and MEM_LIBC_MALLOC are 0 then everything works completely expected. However, when I set MEMP_MEM_MALLOC to 1 (according to RAM usage article from lwIP wiki), so that every piece of dynamically allocated memory comes from heap of MEM_SIZE size, application always crashes, no matter how big or small MEM_SIZE is (I have a lot of RAM, so I tried to put MEM_SIZE to even more then 20 MB!). Application crashes because two of FreeRTOS asserts fail, I get these two prints: "Assert failed in file queue.c, line 1224" and "Assert failed in file port.c, line 424". According to call trace (which I provided in attachments), it crashes when XEmacPs_IntrHandler (I am using Xilinx layer 2 drivers) tries to allocate memory for pbuf.

Is this problem even related to lwIP or maybe to FreeRTOS or Xilinx drivers, what do you think? I am also providing the entire lwipopts.h, so that you can see whether some other options need to be changed in order to make application work with MEMP_MEM_MALLOC set to 1.

Thanks in advance.

Attachment: calltrace.PNG
Description: PNG image

Attachment: lwipopts.h
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]