cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable LWIP in CubeMX with a non ethernet STM32

bluscape
Associate III

I would like to implement PPPoS on a STM32 without ethernet (STM32F401RE) and need a TCP/IP stack to complete the networking, but CubeMX does not have the option to include LWIP. How can I add LWIP to my CubeMX project?

This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
waclawek.jan
Super User

This has nothing to do with CubeMX. As CubeMX is only a configurator for the pre-chewed code, as soon as you are outside of its scope, you proceed as with any other code - add the lwip files tree into your makefile or IDE or whatever are you using to build your project; and then add the required function calls to your initialization and main().

Of course you'll need to write the code for the net interface of your choice, and register that when starting lwip. AFAIK, there is support for PPP built into lwip; read the lwip documentation and perhaps look for additional info/help on the lwip mailing lists.

JW

Piranha
Chief II

https://habr.com/ru/post/419037/

It's in Russian, but Google Translate does a pretty good job with technical texts.

bluscape
Associate III

@JW: I've never been a big fan of these configurators. CubeMX supports LWIP (or at least you can select it) when your device does have a hardware ethernet interface. So if it is available I would at least expect the mighty "configurator" to allow you to add it to your project before going to the IDE. "THE ALL IN ONE SOLUTION" I mean it is a middleware that is supposedly supported by CubeMX. Anyways, I guess you can't have it all. Also see my response to Piranha.

@Piranha: Thanks, there is an english version of this article: https://weekly-geekly.github.io/articles/419037/index.html and it was exactly this article that created my question about CubeMX since the guy selects the LWIP as middleware in CubeMX for a non ethernet device.

Anyways. Thanks for the help. Guess I will do it my preferred way which is not using CubeMX.

Piranha
Chief II

Those translations are done by Google Translate anyway. :)

While STM32F4DISCOVERY doesn't have Ethernet, the STM32F407 on it has. But, as ST's lwIP implementation is flawed beyond repair anyway, implementing it on Your own should be better.