2026-02-03 3:25 PM
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
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:
Is manually adding mbedTLS to Middlewares/Third_Party/mbedtls the recommended approach for STM32U3 projects?
Has anyone successfully integrated mbedTLS + STSAFE-A120 for a full TLS stack on STM32U375?
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.)?
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:
2026-02-04 2:51 AM
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.
2026-02-06 1:32 AM
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.
2026-02-06 9:35 AM
Hi Ghofrane, do you have a rough estimate when this feature will become available in CubeMX?