|
From: | Noam Weissman |
Subject: | Re: [lwip-users] lwIP with FreeRTOS memory problem |
Date: | Mon, 28 Nov 2016 11:14:18 +0000 |
Hi, I am not sure with my reply as this area is not so documented. What I can see in your lwipopts that you use tons of memory for the LwIP heap but
other defines are way to small
For example: #define MEMP_NUM_PBUF 16 <<< ? #define MEMP_NUM_UDP_PCB 4 #define MEMP_NUM_TCP_PCB 32 #define MEMP_NUM_TCP_PCB_LISTEN 8 I am using a micro (STM32F4 and F2) with limited memory and never had to use more than 20K RAM. LwIP own opts.h file has macro’s in it and there is a reason for that. Some values have relations with other values. I have attached my own lwipopts.h for your reference. Use it and hopefully it will help you. Do understand that I have set up RAW API and Socket API as well. I use mostly RAW API but as I am using PolarSSL I need the Socket API as well. Good luck, Noam. From: lwip-users [mailto:lwip-users-bounces+address@hidden
On Behalf Of pekez Hello people, 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. |
lwipopts.h
Description: lwipopts.h
[Prev in Thread] | Current Thread | [Next in Thread] |