Skip to main content
ESawa.1
Associate III
July 27, 2021
Question

LwIP Build Analyzer

Hey there,

I have a question regarding the output of the build analyzer. When I set up freeRTOS + lwIP , like explained here:

on my STM32H753 everything works as expected but the build analyzer shows that RAM D2 is almost full.

0693W00000D0hLKQAZ.pngWhen I check the Memory Details, I see that there are only the assigned descriptors inside and the 6k for the RxBuffer. There is also 512B for an internal buffer I need.

0693W00000D0hMqQAJ.pngBut why is the build analyzer showing that the RAM D2 is almost full?

This topic has been closed for replies.

5 replies

ESawa.1
ESawa.1Author
Associate III
July 27, 2021

Hey there,

sorry I forgot to add the part of the linker script. Please see the modifications in the linker script below:

 /* Modification start */
 .lwip_sec (NOLOAD) : {
 . = ABSOLUTE(0x30040000);
 *(.RxDecripSection) 
 
 . = ABSOLUTE(0x30040060);
 *(.TxDecripSection)
 
 . = ABSOLUTE(0x30040200);
 *(.RxArraySection) 
 } >RAM_D2
 /* Modification end */

DWeb_2
Associate III
July 27, 2021

Your LwIP section begins right after the D2 RAM (is automatically placed there) . You can change the start of the section in the linker script to an absolute address. Keep in mind to include the LwIP heap.

ESawa.1
ESawa.1Author
Associate III
July 27, 2021

Dear DWeb_2,

thanks for your fast answer. This is great. Could you maybe share an example with me how to place the lwip_sec into an absoulte address and keeping the heap safe. My heap is set to "MEM_SIZE to 16360" as explained in the link above. The LWIP_RAM_HEAP_POINTER is set to 0x30044000. Do I have to take care also of the amount of TCP, UDP connections I allow? I have set MEMP_NUM_UDP_PCB to 3 and MEMP_NUM_TCP_PCB to 6.

DWeb_2
Associate III
July 27, 2021

Try this snippet for the linker script:

.lwip_sec 0x30040000 (NOLOAD) :

I can't help you considering the LwIP config

ESawa.1
ESawa.1Author
Associate III
July 28, 2021

Dear DWeb_2,

okay got it. Thanks a lot for your support.