[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] lwip: Scan through the heap searching for a free block
From: |
address@hidden |
Subject: |
Re: [lwip-users] lwip: Scan through the heap searching for a free block that is big enough, beginning with the lowest free block. |
Date: |
Wed, 27 Mar 2019 20:06:27 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 |
Am 25.03.2019 um 10:52 schrieb vrnud:
Hi,
I am trying to impelement modbus over TCPIP.
I am using FreeRTOS + lwip +STM32f4 (cube Mx generated code).
Lwip version is 2.0.0.
Freertos version 9.0.0.
heap 4 is used. is it ok?
TCPIP echo server application is used.
while trying to connect from Modscan utility program stucks in
mem.c file . function mem_malloc.
What does "stuck" mean? Endless loop in mem_malloc? If so, that's an
indication that the list is broken, which in turn is an indication for
violating lwIP's threading rules.
Regards,
Simon
/* Scan through the heap searching for a free block that is big enough,
modbus_connect_problem.pcap
<http://lwip.100.n7.nabble.com/file/t2188/modbus_connect_problem.pcap>
* beginning with the lowest free block.
*/
under this loop.
for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED -
size;
ptr = ((struct mem *)(void *)&ram[ptr])->next) {
}
I have enabled the modbus_connect_problem.pcap
<http://lwip.100.n7.nabble.com/file/t2188/modbus_connect_problem.pcap>
CHECKSUM_GEN_IP 1
CHECKSUM_GEN_TCP 1
I have attached the wireshark report.
Kindly guide.