cancel
Showing results for 
Search instead for 
Did you mean: 

Using LwIP's sockets with CubeMX ?

Someguy
Associate III

I would like to use plain sockets in my non OS STM32 application.  LwIP provides plain sockets.  I have used them in ESP32 applications where they work well.

LwIP sockets are not an option in CubeMX as far as I can tell.   One can manually enable sockets by changing LWIP_SOCKETS from 0 to 1 in Inc/lwipopts.h.   However, when I do this I get the build errors in the attached file.

STM has test for sockets in their github code:  https://github.com/STMicroelectronics/stm32_mw_lwip/blob/master/test/sockets/sockets_stresstest.c

Has anyone used LwIP's plain sockets in an STM32 application ?  If so, how did you get it to build ?

Thanks

 

 

2 REPLIES 2
Pavel A.
Evangelist III

 non OS STM32 application

From the source (sockets_stresstest.c) this test is intended for multi-threading environment  (aka RTOS). So, not suitable for non-OS setup.

Files in the test/ subtree come from the upstream LwIP project, not modified by ST.

Thanks for the reply.  I'll check with the LwIP group and see what is going on. 

BTW, really liking CubeMX and the fact that LwIP is part of the toolchain.   Saves work not having to get it set up ourselves.