cancel
Showing results for 
Search instead for 
Did you mean: 

Using LwIP stack with raw API on MBED TLS without RTOS (using CubeMX)

bully
Senior

Hello,

the documentation says that MBED TLS can be implemented without LwIP. If I enable LwIP usage in CubeMX, it only supports NetConn API and therefore requires also FREERTOS to be used...

But I'd like to do it without FREERTOS using raw API for LwIP.

I could probably add LwIP manually, but I need the way for CubeMX not to delete those files when regenerating project.

Any solution, example, doc on this?

Are there any other options for non-RTOS TCP protocol addition to MBED TLS ?

Thanks in advance,

regards,

Bulek.

1 ACCEPTED SOLUTION

Accepted Solutions
thierry BINIGUER
Associate III

Hello,

From my understanding, your question deals with several points.

First part is about the MBEDTLS : can Cube MX generate MBED TLS project code without LwIP ? yes, it can.

This is achievable by selecting MBEDTLS Middleware alone. All other Middlewares being disabled.

Second part is about the LwIP : Can Cube MX generate LwIP project code using raw API (without FreeRTOS) ? yes, it can

This is achievable by selecting LwIP Middleware alone. All other Middlewares being disabled.

Note LwIP raw API is enabled through the LWIP configuration : Key Options / Advanced Parameters / Callback - Raw Options

Independantly taken, MBEDTLS/LwIP can be enabled from Cube MX.

Third part is about the usage (or not especially here) of FreeRTOS with MBEDTLS

Can Cube MX generate MBED TLS project code using LwIP raw API ? yes, it can but this is provided FreeRTOS is previously selected.

It is because our cube applications program are natively development over FreeRTOS. Cube MX is aligned with Cube.

As you mention, it is then possible to rework and customize the project.

Note it was verified with Cube MX V5.2.0 and STM32F746NGHx.

Regards

View solution in original post

3 REPLIES 3
thierry BINIGUER
Associate III

Hello,

From my understanding, your question deals with several points.

First part is about the MBEDTLS : can Cube MX generate MBED TLS project code without LwIP ? yes, it can.

This is achievable by selecting MBEDTLS Middleware alone. All other Middlewares being disabled.

Second part is about the LwIP : Can Cube MX generate LwIP project code using raw API (without FreeRTOS) ? yes, it can

This is achievable by selecting LwIP Middleware alone. All other Middlewares being disabled.

Note LwIP raw API is enabled through the LWIP configuration : Key Options / Advanced Parameters / Callback - Raw Options

Independantly taken, MBEDTLS/LwIP can be enabled from Cube MX.

Third part is about the usage (or not especially here) of FreeRTOS with MBEDTLS

Can Cube MX generate MBED TLS project code using LwIP raw API ? yes, it can but this is provided FreeRTOS is previously selected.

It is because our cube applications program are natively development over FreeRTOS. Cube MX is aligned with Cube.

As you mention, it is then possible to rework and customize the project.

Note it was verified with Cube MX V5.2.0 and STM32F746NGHx.

Regards

DCtech
Associate II

How did you solve this, I couldnt use together lwip+tls and non-rtos (raw api)

Hello,

I didn't - but didn't try much. We went with FreeRTOS but then after few days of uptime saw, that LwIP locks core and stops working.

At that time we have abandoned this route, because we should change LwIP internals and this was something we didn't want to do....

Core API call was blocked indefinitely and process hanged. Happens rarely and only after few days. So it is not stable - at least at that time that we tried it.

It seems quite hard route to get it working and maybe only few developers got this working. I wasn't that good... 🙂

https://community.st.com/s/question/0D50X0000AhNBoWSQW/actually-working-stm32-ethernet-and-lwip-demonstration-firmware

HTH,

...