cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating mbedTLS into STM32CubeIDE (STM32U375 + STSAFE-A120)

achen2556
Associate II

Hi everyone,

I’m working on an STM32CubeIDE project generated with CubeMX and I’m trying to integrate mbedTLS to run a TLS stack.

Setup details:

  • MCU: STM32U375

  • Secure Element: STSAFE-A120

  • IDE: STM32CubeIDE (v2.0.0)

  • CubeMX (v6.16.1) used for project generation

  • Target IoT platform - AWS IoT Core

After generating the project with CubeMX, I see the following components:

  • Middlewares/ST/STM32_Cryptographic

  • Middlewares/ST/STSElib

  • X-CUBE-STSE01/Target folder at the project root

However, I can’t find any option in CubeMX → Middleware to enable or add mbedTLS. From what I can tell, CubeMX doesn’t expose mbedTLS as a selectable middleware for this MCU / configuration.

I’ve seen suggestions (including from Google AI) that mbedTLS needs to be added manually, for example by:

  • Adding the mbedTLS source to Middlewares/Third_Party/mbedtls

  • Updating include paths and compiler symbols

  • Configuring mbedtls_config.h

  • Potentially hooking mbedTLS crypto callbacks to the STM32 cryptographic drivers or STSAFE services

My questions:

  1. Is manually adding mbedTLS to Middlewares/Third_Party/mbedtls the recommended approach for STM32U3 projects?

  2. Has anyone successfully integrated mbedTLS + STSAFE-A120 for a full TLS stack on STM32U375?

  3. Are there any ST reference projects, application notes, or best practices for connecting mbedTLS with:

    • STM32 Cryptographic middleware

    • STSAFE-A120 (key storage, crypto offload, etc.)?

  4. Am I missing a CubeMX option or expansion package that would enable mbedTLS automatically?

Any guidance from someone who has already gone through this would be greatly appreciated.

Thanks in advance!


If you want, I can:

3 REPLIES 3
Ghofrane GSOURI
ST Employee

Hello @achen2556 

I'm currently reviewing your questions. I will get back to you ASAP with the answers.

THX

Ghofrane

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Ghofrane GSOURI
ST Employee

Hello @achen2556 

Manually adding mbedTLS and integrating it into your project (source files, include paths, compiler defines, mbedtls_config.h, and any required callbacks) is currently the recommended approach for STM32U3, since CubeMX does not yet provide an automatic or selectable mbedTLS middleware option for this family.

A request to add this support in CubeMX has been raised to the development team under ticket 226788.

THX

Ghofrane

 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi Ghofrane, do you have a rough estimate when this feature will become available in CubeMX?