This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TCPnet Memory Pool resize problem

Hi all,

First:
I am working on STM32F407 and I am using two iRAMs and one external SRAM with addresses: addr size
iRAM1: 0x20000000 0x20000
iRAM2: 0x10000000 0x10000
RAM1: 0x60000000 0x200000

C compiler, linker,.... v5.03.0.76
toolchain MDK-ARM Professional version 4.74.0.0

Problem:
After I created multiple connections from PC (TCP ethernet) to the device, program runs out of memory with ERR_SYS_ERR_MEM_ALLOC err. So I tried to increase size of Memory Pool by redefining macro MEM_SIZE from 2000 to 6000 but after this TCPnet does not call listener function.

I checked memory map and there is enough space (see net_config.o)

    0x20000d78   0x0000d008   Zero   RW         7444    .bss                .\obj\mozekvof_line.o
    0x2000dd80   0x00000010   Zero   RW        16376    .bss                .\obj\ui_stftpresponse.o
    0x2000dd90   0x00008430   Zero   RW        22795    .bss                .\obj\net_config.o
    0x200161c0   0x00000010   Zero   RW        29126    .bss                C:\Keil\ARM\RV31\LIB\TCP_CM3.lib(at_mem.o)
    0x200161d0   0x00000038   Zero   RW        29445    .bss                C:\Keil\ARM\RV31\LIB\RTX_CM4.LIB(rt_task.o)
    0x20016208   0x00000030   Zero   RW        29933    .bss                C:\Keil\ARM\RV31\LIB\RTX_CM4.LIB(rt_list.o)
    0x20016238   0x00000060   Zero   RW        30138    .bss                C:\Keil\ARM\ARMCC\bin\..\lib\armlib\c_w.l(libspace.o)

What works well is to assign address of the static array mem_pool exactly but it is not good solution....

static U32 mem_pool[MEM_SIZE] __attribute__((section(".ARM.__at_0x200138b0"), zero_init));

What causes this error? How can I get rid of this without assigning random variable addresss?