netosStartTCP: error configuring eth0 IP address or mask

I am trying (still) to reduce the amount of memory (RAM and ROM) that is used by netos. Since the system isn’t modular in any way i am primarily trying to decrease the different variables to decrease the size. The first parameter that i tried to decrease was the APP_NET_HEAP_SIZE. The TCP/IP stack allocates 512KB (!!!) of memory by default. I will only use UDP and only one channel at one time so I thought that i could decease this a great deal, but I can’t decrease it to more than 256KB. If i go lower than the 256KB the ll_config function returns error and the system prints “netosStartTCP: error configuring eth0 IP address or mask”, why?? Does the TCP/IP stack really need minimum 256KB no matter what? PS. The reason that I need to decrease the size is that my system can’t use SDRAM because of power consumption. I have to use SRAM and then I don’t have 16MB of RAM as the development board.

When netos starts tcp/ip stack, it will allocate memory for socket pointer table, structures for ARP, igmp,device table, ppp, various timers, router related, and DMA receive buffers, totally using about 140K. Once ethernet receive task running and a lot of packets coming, more memory is needed for these packets and rapidly reduces the available memory in heap for other task. Maybe that is why it fails when you configured 256k heap. We tested using 160k without problem.

I am currently testing with an APP_NET_HEAP_SIZE at 256K also. “ping” and “socket” connection work but the simple web server or the AWS do not server up the web pages. Any one any ideas on the extra RAM required to run these servers ? My application continues to run ok. I am running from ROM with 2M SRAM. Thank you, Regards Michael

I don’t think I tested anything between 128K and 256K but I will do that after the weekend to see if I can reduce the size a little bit more. I looked a little bit in the API code and found very interesting “define:s”, like USE_TCP and USE_UDP. But it looks like they are not used anywhere in the code. Will future releases (6.0 or later) enable you to disable, for example TCP and only use UDP, thus decreasing the size of the stack a great deal? I tested to set USE_TCP to 0 instead of 1 but it didn’t have any effect. I don’t know if I am the only one that would like NetOS to be a little more modular so that you would have greater control of the resulting code, but are there any plans for making NetOS more modular?